From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 808DAA00B8; Mon, 28 Oct 2019 07:07:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AB561BEFA; Mon, 28 Oct 2019 07:07:57 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 849D31BEF9; Mon, 28 Oct 2019 07:07:55 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Oct 2019 23:07:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,239,1569308400"; d="scan'208";a="205102748" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by FMSMGA003.fm.intel.com with ESMTP; 27 Oct 2019 23:07:52 -0700 Date: Mon, 28 Oct 2019 14:04:26 +0800 From: Ye Xiaolong To: Ying Wang Cc: qi.z.zhang@intel.com, dev@dpdk.org, wenzhuo.lu@intel.com, qiming.yang@intel.com, stable@dpdk.org Message-ID: <20191028060426.GD33024@intel.com> References: <20191024213959.80645-1-ying.a.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024213959.80645-1-ying.a.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/ice: modify packet type table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/25, Ying Wang wrote: >The original packet type table's hw-ptype index to sw-ptype >mapping is wrong. This patch fixed the issue. > >Fixes: ab9dccf09af9 ("net/ice: support packet type getting") >Cc: stable@dpdk.org > >Signed-off-by: Ying Wang >--- > drivers/net/ice/ice_rxtx.c | 312 ++++++++++++++++++++++++--------------------- > 1 file changed, 169 insertions(+), 143 deletions(-) > >diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c >index 8d4820d3c..82ae67d34 100644 >--- a/drivers/net/ice/ice_rxtx.c >+++ b/drivers/net/ice/ice_rxtx.c >@@ -1773,9 +1773,42 @@ ice_recv_scattered_pkts(void *rx_queue, > const uint32_t * > ice_dev_supported_ptypes_get(struct rte_eth_dev *dev) > { >- static const uint32_t ptypes[] = { >+ struct ice_adapter *ad = >+ ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >+ const uint32_t *ptypes; >+ >+ static const uint32_t ptypes_os[] = { >+ /* refers to ice_get_default_pkt_type() */ >+ RTE_PTYPE_L2_ETHER, >+ RTE_PTYPE_L2_ETHER_TIMESYNC, >+ RTE_PTYPE_L2_ETHER_LLDP, >+ RTE_PTYPE_L2_ETHER_ARP, >+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, >+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN, >+ RTE_PTYPE_L4_FRAG, >+ RTE_PTYPE_L4_ICMP, >+ RTE_PTYPE_L4_NONFRAG, >+ RTE_PTYPE_L4_SCTP, >+ RTE_PTYPE_L4_TCP, >+ RTE_PTYPE_L4_UDP, >+ RTE_PTYPE_TUNNEL_GRENAT, >+ RTE_PTYPE_TUNNEL_IP, >+ RTE_PTYPE_INNER_L2_ETHER, >+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN, >+ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN, >+ RTE_PTYPE_INNER_L4_FRAG, >+ RTE_PTYPE_INNER_L4_ICMP, >+ RTE_PTYPE_INNER_L4_NONFRAG, >+ RTE_PTYPE_INNER_L4_SCTP, >+ RTE_PTYPE_INNER_L4_TCP, >+ RTE_PTYPE_INNER_L4_UDP, >+ RTE_PTYPE_UNKNOWN >+ }; >+ >+ static const uint32_t ptypes_comms[] = { > /* refers to ice_get_default_pkt_type() */ > RTE_PTYPE_L2_ETHER, >+ RTE_PTYPE_L2_ETHER_TIMESYNC, > RTE_PTYPE_L2_ETHER_LLDP, > RTE_PTYPE_L2_ETHER_ARP, > RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, >@@ -1789,7 +1822,6 @@ ice_dev_supported_ptypes_get(struct rte_eth_dev *dev) > RTE_PTYPE_TUNNEL_GRENAT, > RTE_PTYPE_TUNNEL_IP, > RTE_PTYPE_INNER_L2_ETHER, >- RTE_PTYPE_INNER_L2_ETHER_VLAN, > RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN, > RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN, > RTE_PTYPE_INNER_L4_FRAG, >@@ -1800,9 +1832,15 @@ ice_dev_supported_ptypes_get(struct rte_eth_dev *dev) > RTE_PTYPE_INNER_L4_UDP, > RTE_PTYPE_TUNNEL_GTPC, > RTE_PTYPE_TUNNEL_GTPU, >+ RTE_PTYPE_L2_ETHER_PPPOE, > RTE_PTYPE_UNKNOWN > }; > >+ if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS) >+ ptypes = ptypes_comms; >+ else >+ ptypes = ptypes_os; >+ > if (dev->rx_pkt_burst == ice_recv_pkts || > #ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC > dev->rx_pkt_burst == ice_recv_pkts_bulk_alloc || >@@ -2770,7 +2808,6 @@ ice_set_rx_function(struct rte_eth_dev *dev) > } > > #endif >- Minor nit, it's an unrelated change, remove it while merging. For the reset, Reviewed-by: Xiaolong Ye Applied to dpdk-next-net-intel. Thanks.