From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9947A0508; Thu, 7 Apr 2022 05:00:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEB00428A2; Thu, 7 Apr 2022 04:59:19 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 15787428A5 for ; Thu, 7 Apr 2022 04:59:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649300359; x=1680836359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tAqQmeTbcGdnvbt9sinf9be0uX4+y/29qD1w3zzNFT4=; b=lA1Fhz8VZMAeNWdDwhTLoSodJO4cVwF6OO3QnQ0AqoEEiDxiVFVLEYK8 N6LGbXOcDpKfnWuXjdkr1vK8okRBTdMVTyBSy0LDGblFEqTFolR2aMRM3 1cL5vOICBKGu8EaaKU4OP9RhFrPghNiyTldKS8k5evhOwjNDizVe+mPun QoMo8dz3Fdudc1EZHb5+bXHd6dVYYcesfrHPzpCEDZZAR2LgSDv03Iw4I oXlSMy1jy16LpWSEqhzxfcAGa32Sr+CJypjYxVh0z403hmiUfPhDRwJdn YkqjMxs/4+3XaEGuoOqxoYHlKszseoraHqIMCv2keGR0mmezNgnyTwyU0 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248738414" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="248738414" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:18 -0700 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="570850685" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:16 -0700 From: Kevin Liu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, Alvin Zhang , Junfeng Guo , Kevin Liu Subject: [PATCH 22/39] net/ice/base: support new patterns of TCP and UDP Date: Thu, 7 Apr 2022 10:56:49 +0000 Message-Id: <20220407105706.18889-23-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220407105706.18889-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Alvin Zhang Find training packets for below TCP and UDP patterns: MAC/VLAN/IPv4/TCP MAC/VLAN/IPv4/UDP Signed-off-by: Junfeng Guo Signed-off-by: Alvin Zhang Signed-off-by: Kevin Liu --- drivers/net/ice/base/ice_switch.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index e3658117fc..75cc861e93 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -8616,6 +8616,12 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, } if (tun_type == ICE_SW_IPV4_TCP) { + if (vlan && tcp) { + *pkt = dummy_vlan_tcp_packet; + *pkt_len = sizeof(dummy_vlan_tcp_packet); + *offsets = dummy_vlan_tcp_packet_offsets; + return; + } *pkt = dummy_tcp_packet; *pkt_len = sizeof(dummy_tcp_packet); *offsets = dummy_tcp_packet_offsets; @@ -8623,6 +8629,12 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, } if (tun_type == ICE_SW_IPV4_UDP) { + if (vlan && udp) { + *pkt = dummy_vlan_udp_packet; + *pkt_len = sizeof(dummy_vlan_udp_packet); + *offsets = dummy_vlan_udp_packet_offsets; + return; + } *pkt = dummy_udp_packet; *pkt_len = sizeof(dummy_udp_packet); *offsets = dummy_udp_packet_offsets; -- 2.33.1