test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,huilong" <huilongx.xu@intel.com>
Subject: [dts] PATCH V4] fix check packet failure by lldp have different packet size
Date: Tue, 23 May 2017 14:31:02 +0800	[thread overview]
Message-ID: <1495521063-58639-2-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1495521063-58639-1-git-send-email-huilongx.xu@intel.com>

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 | 7 ++++++-
 framework/settings.py   | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index ca361a7..260f42c 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -203,7 +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):
         """
diff --git a/framework/settings.py b/framework/settings.py
index 342314d..f0f3c8f 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

  reply	other threads:[~2017-05-23  6:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23  6:31 [dts] [PATCH V4 1/2] add link bonding rss dynamic config test plane xu,huilong
2017-05-23  6:31 ` xu,huilong [this message]
2017-05-25 10:41   ` [dts] PATCH V4] fix check packet failure by lldp have different packet size Liu, Yong
2017-05-23  6:31 ` [dts] PATCH V4 2/2] add link bond slave dynamic config test case xu,huilong
2017-05-25 10:46   ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495521063-58639-2-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).