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 9A7F7A0508; Wed, 13 Apr 2022 10:12:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3990C410E1; Wed, 13 Apr 2022 10:11:33 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C0F2040E2D for ; Wed, 13 Apr 2022 10:11:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649837490; x=1681373490; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gnym2WRTAAtHqye+S7YpwHniEXJezVknPJvvlsGJ5j8=; b=VvtpguIo/tCGrqJh30RHroz9W9czmrS2vm1yzmN910XZT0WsaJpen27G dnixFKF9Vw2B2bU1Ab/Xe4QK0sR1aijRV4KKEM+uGUrzXqjHxW+O7zGr3 TLSfk2zKg7DiHp/3JyNRAd/2OhbkXr5XZL/1dku33FK9qNmyzXNDjxQi6 CDze7JEX0C2TirWM9BMlA1gOEILbXSipeBV2YJjv5atEcojQoKnRPxeZt H7Ysm9TAswtPGVE1aVg9BAosrQB34dKfiWRXfok9d9z1hkvwH7I6RzZAu dXr8NfbMZ5pufEMXOo73ItW7YDyQQ9AElOC48/O3wZ9JYWIlpTNFSxKSG Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="287630052" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="287630052" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:29 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="526847723" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:27 -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 v2 18/33] net/ice/base: support new patterns of TCP and UDP Date: Wed, 13 Apr 2022 16:09:17 +0000 Message-Id: <20220413160932.2074781-19-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413160932.2074781-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> <20220413160932.2074781-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 f444a2da07..c742dba138 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -8568,6 +8568,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; @@ -8575,6 +8581,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