[dts] [PATCH 01/12] fix check packet failure by lldp have different packet size
xu,huilong
huilongx.xu at intel.com
Thu May 11 09:37:36 CEST 2017
Signed-off-by: xu,huilong <huilongx.xu at intel.com>
---
framework/pmd_output.py | 5 ++++-
framework/settings.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index ca361a7..8fdf4c9 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -203,8 +203,11 @@ class PmdOutput():
so should used (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
for check tx_bytes count right
"""
- return not (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
+ flage = 1
+ for size in PROTOCOL_PACKET_SIZE['lldp']:
+ flage = flage and (tx_bytes - exp_bytes) % size
+ return not flage
def get_port_vlan_offload(self, port_id):
"""
Function: get the port vlan settting info.
diff --git a/framework/settings.py b/framework/settings.py
index 342314d..3839859 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -173,7 +173,7 @@ HEADER_SIZE = {
dpdk send protocol packet size.
"""
PROTOCOL_PACKET_SIZE = {
- 'lldp': 110,
+ 'lldp': [110,100],
}
"""
--
1.9.3
More information about the dts
mailing list