test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter
@ 2020-02-24  4:39 Jiaqi Min
  2020-02-25  1:31 ` Tu, Lijuan
  2020-02-25  6:47 ` He, Zhiwei
  0 siblings, 2 replies; 3+ messages in thread
From: Jiaqi Min @ 2020-02-24  4:39 UTC (permalink / raw)
  To: dts; +Cc: Jiaqi Min

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


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

end of thread, other threads:[~2020-02-25  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  4:39 [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter Jiaqi Min
2020-02-25  1:31 ` Tu, Lijuan
2020-02-25  6:47 ` He, Zhiwei

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).