From patchwork Mon Apr 17 17:41:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 126171 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 53B174296B; Mon, 17 Apr 2023 11:24:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E698410E4; Mon, 17 Apr 2023 11:24:27 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 0054140144 for ; Mon, 17 Apr 2023 11:24:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681723465; x=1713259465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fx0oVAZjz7MypWS/Yd2TvS0vos/udtKhko88esSBF5I=; b=ajs0Zs1U+eQWG+F/0RmrU7vAZarnrAArOy3uDOAn/PoOUUP7ARhqqbYM 5gikYyXtM0Pbx9TGZx+3KVQbX9B5IddRfbHlZ3PhW75enpwmiTMxKbTXG vsrtlA6w/AOkuvMKD9XYY+SoJwAz5pfjc3IPTn9oCofrJFRsTsUVeaFJ2 22/DgT4WHqzQ/MfmNyQT6uOrHywSFn8jgDO49rJp8yps0fDPCVfOwxsAn u+s+kRgIZMYE1+elctczocfzwUPbSNcduV3GpQSNIXDU59PEL+ccnG8SY 30uo0+ZHwMtvLghIXvcCd74QBFzhrMYlDnq/vZ3Mm6soAlRQZHTk/mBbB w==; X-IronPort-AV: E=McAfee;i="6600,9927,10682"; a="333642304" X-IronPort-AV: E=Sophos;i="5.99,203,1677571200"; d="scan'208";a="333642304" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2023 02:24:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10682"; a="640897829" X-IronPort-AV: E=Sophos;i="5.99,203,1677571200"; d="scan'208";a="640897829" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2023 02:24:23 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1 3/4] test_plans/dual_vlan: add a case to test vlan priority value Date: Mon, 17 Apr 2023 17:41:54 +0000 Message-Id: <20230417174155.146540-4-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230417174155.146540-1-songx.jiale@intel.com> References: <20230417174155.146540-1-songx.jiale@intel.com> 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 Signed-off-by: Jiale Song --- test_plans/dual_vlan_test_plan.rst | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst index 11dfa332..e8e54eac 100644 --- a/test_plans/dual_vlan_test_plan.rst +++ b/test_plans/dual_vlan_test_plan.rst @@ -445,3 +445,40 @@ Choose the above table's item randomly 30 times and verify that the result is ri At last, stop packet forwarding and quit the application:: testpmd> stop testpmd> quit + +Test Case: dual vlan priority rx/tx test +======================================== + +#. blind port to vfio-pci:: + + ./usertools/dpdk-devbind.py -b vfio-pci {pf0_pci} {pf1_pci} + +#. launch testpmd with NICs:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -a {pf0_pci} -a {pf1_pci} -n 4 -- -i + +#. set testpmd:: + + testpmd> set verbose 1 + testpmd> set fwd mac + testpmd> start + +#. start tcpdump with tester rx port:: + + tcpdump -ei {rx_iface} + +#. send dual vlan packet with tester tx port:: + + sendp(Ether(dst="FE:EF:65:4C:2C:D0",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480),iface="{tx_iface}",count=1,inter=0,verbose=False) + +#. check the pkts can be received:: + + testpmd> port 0/queue 0: received 1 packets + src=00:00:00:00:00:00 - dst=FE:EF:65:4C:2C:D0 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN - l2_len=18 - inner_l2_len=4 - Receive queue=0x0 + ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN + +#. check the tcpdump packet:: + + check the pkts can be received by PF and fwd to tester with inner and outer correct vlan ID and priority value. + 16:50:38.807217 FE:EF:65:4C:2C:D0 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 1, ethertype 802.1Q, vlan 2, p 2, ethertype 0x0800, +