test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V3] fix check packet failure by lldp have different packet size
@ 2017-05-15  4:13 xu,huilong
  2017-05-15  5:09 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,huilong @ 2017-05-15  4:13 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

fortville will send different size lldp packet, so should update chcek function.
now we know lldp size is 110 or 100 in dpdk17.05 by debug.

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 framework/pmd_output.py | 6 +++++-
 framework/settings.py   | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index ca361a7..4667e77 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -203,8 +203,12 @@ 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']
+        # error_flage is true means tx_bytes different with expect bytes
+        error_flage = 1
+        for size in  PROTOCOL_PACKET_SIZE['lldp']:
+            error_flage = error_flage and  (tx_bytes - exp_bytes) % size
 
+        return not error_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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-15  5:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15  4:13 [dts] [PATCH V3] fix check packet failure by lldp have different packet size xu,huilong
2017-05-15  5:09 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).