From patchwork Thu Jan 12 09:15:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 121882 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62E72423B5; Thu, 12 Jan 2023 10:15:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3912B40156; Thu, 12 Jan 2023 10:15:28 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 9FE53400EF for ; Thu, 12 Jan 2023 10:15:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673514926; x=1705050926; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hzfM7fKc60+Azun4KGRw4oi7Ze4pVVxIXzQ5JnHGZBg=; b=RgvlCe7ZoxqZgVzxtg16r0MAcu2rNx2IVhzjFXfk4It68ylo7q0QYOqN 34lWqA8HqMm/R3CjGL/ZUOogxvQd140YQE016w8pvegP13iZ3yPbVan5r EvtAvhgy0dY2fRz9byTYFExENjOvJ8JeErXBvzHnO7Bck/EXb/SKq4fgg Mq0ASw3bD7H//7c13BUVN1ipCMhw014+29xS60peOkRP3FZ8FrwPPogtp sIp5kGv9hKpbgCngCKAki6TLqS+vAYB7LieJT4N6pxMuLviett0SQf/SQ ohYI52nraBjCyACJ520MY7IItc8ZHd4bTmFVliPt6Ndpxr+d+pGlgKRMK w==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="303356070" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="303356070" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 01:15:25 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659710224" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="659710224" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 01:15:24 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 1/2] test_plans/mac_filter: add the vlan filter check after setting multicast filter Date: Thu, 12 Jan 2023 17:15:18 +0800 Message-Id: <20230112091519.29607-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Add the vlan filter check after setting multicast filter. 1. Enable vlan filter and add vlan id. Send a packet with multicast dst mac and vlan tag can receive packet. 2. Disable vlan filter and remove vlan id. Send a packet with multicast dst mac can receive packet. Signed-off-by: Weiyuan Li --- test_plans/mac_filter_test_plan.rst | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/test_plans/mac_filter_test_plan.rst b/test_plans/mac_filter_test_plan.rst index 09335930..58acda39 100644 --- a/test_plans/mac_filter_test_plan.rst +++ b/test_plans/mac_filter_test_plan.rst @@ -162,6 +162,37 @@ Send a packet with multicast destination MAC address to port 0:: src=52:00:00:00:00:00 - dst=01:00:5E:00:00:00 - type=0x0800 - length=60 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0 ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN +Enable vlan filter and add vlan id:: + + testpmd> vlan set filter on 0 + testpmd> rx_vlan add 4012 0 + +Send a packet with multicast destination MAC address and vlan tag to port 0:: + + sendp([Ether(dst='01:00:5E:00:00:00', src='00:00:20:00:00:00')/Dot1Q(vlan=2960, prio=0)/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXX')],iface="ens256f0",count=1,inter=0,verbose=False) + +Check can receive the packet:: + + port 0/queue 0: received 1 packets + src=00:00:20:00:00:00 - dst=01:00:5E:00:00:00 - pool=mb_pool_0 - type=0x8100 - length=60 - nb_segs=1 - VLAN tci=0x0 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP - l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x0 + ol_flags: RTE_MBUF_F_RX_VLAN RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN + +Send a packet with multicast destination MAC address and wrong vlan tag to port 0:: + + sendp([Ether(dst='01:00:5E:00:00:00', src='00:00:20:00:00:00')/Dot1Q(vlan=2959, prio=0)/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXX')],iface="ens256f0",count=4,inter=0,verbose=False) + +Check can't receive the packet. + +Disable vlan filter and remove vlan id:: + + testpmd> rx_vlan remove 4012 0 + testpmd> vlan set filter off 0 + +Send a packet with multicast destination MAC address to port 0:: + + port 0/queue 0: received 1 packets + src=52:00:00:00:00:00 - dst=01:00:5E:00:00:00 - type=0x0800 - length=60 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0 + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN Remove the multicast MAC address from the multicast filter::