test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jiaqi Min <jiaqix.min@intel.com>
To: dts@dpdk.org
Cc: Jiaqi Min <jiaqix.min@intel.com>
Subject: [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter
Date: Mon, 24 Feb 2020 04:39:04 +0000	[thread overview]
Message-ID: <20200224043904.54140-1-jiaqix.min@intel.com> (raw)

support for add and remove vf mac address in ixgbe

Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
---
 tests/TestSuite_vf_macfilter.py | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py
index fe64f44..dc30059 100644
--- a/tests/TestSuite_vf_macfilter.py
+++ b/tests/TestSuite_vf_macfilter.py
@@ -192,7 +192,10 @@ class TestVfMacFilter(TestCase):
         What's more, send packets with a wrong MAC address to the VF, check
         the VF will not RX packets.
         """
-        self.verify(self.nic.startswith('fortville') == True, "NIC is [%s], skip this case" %self.nic)
+        if 'niantic' == self.nic: 
+            self.verify(self.nic.startswith('niantic') == True, "NIC is [%s], skip this case" %self.nic)
+        else:
+            self.verify(self.nic.startswith('fortville') == True, "NIC is [%s], skip this case" %self.nic)
         self.setup_2pf_2vf_1vm_env(False,driver='igb_uio')
         self.send_packet_and_verify()
 
@@ -245,13 +248,24 @@ class TestVfMacFilter(TestCase):
         print("\nshow port stats in testpmd for double check: \n", self.vm0_testpmd.execute_cmd('show port stats all'))
         self.verify(result2 != False, "VF0 failed to forward packets to VF1")
 
-        print("\nThirdly, negative test, send packets to a wrong MAC, expected result is RX packets=0\n")
-        dst_mac = self.vf0_wrongmac
+        print ("\Thirdly, remove the added mac address then send packets to the deleted MAC, expected result is RX packets=0\n")
+        ret = self.vm0_testpmd.execute_cmd('mac_addr remove 0 %s' %self.vf0_setmac)
+        # check the operation is supported or not.
+        print (ret)
+
+        dst_mac = self.vf0_setmac
         pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]
         result3 = self.tester.check_random_pkts(tgen_ports, pktnum=100, allow_miss=False, params=pkt_param)
         print("\nshow port stats in testpmd for double check: \n", self.vm0_testpmd.execute_cmd('show port stats all'))
         self.verify(result3 != True, "VF0 failed to forward packets to VF1")
 
+        print ("\nFourthly, negative test, send packets to a wrong MAC, expected result is RX packets=0\n")
+        dst_mac = self.vf0_wrongmac
+        pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]
+        result4 = self.tester.check_random_pkts(tgen_ports, pktnum=100, allow_miss=False, params=pkt_param)
+        print ("\nshow port stats in testpmd for double check: %s\n" % self.vm0_testpmd.execute_cmd('show port stats all'))
+        self.verify(result4 != True, "VF0 failed to forward packets to VF1")
+
  
     def tear_down(self):
 
-- 
2.17.1


             reply	other threads:[~2020-02-24  4:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  4:39 Jiaqi Min [this message]
2020-02-25  1:31 ` Tu, Lijuan
2020-02-25  6:47 ` He, Zhiwei

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=20200224043904.54140-1-jiaqix.min@intel.com \
    --to=jiaqix.min@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).