patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Ying Wang <ying.a.wang@intel.com>
Cc: qi.z.zhang@intel.com, dev@dpdk.org, wenzhuo.lu@intel.com,
	qiming.yang@intel.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/ice: modify packet type table
Date: Mon, 28 Oct 2019 14:04:26 +0800	[thread overview]
Message-ID: <20191028060426.GD33024@intel.com> (raw)
In-Reply-To: <20191024213959.80645-1-ying.a.wang@intel.com>

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 <ying.a.wang@intel.com>
>---
> 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 <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.

      reply	other threads:[~2019-10-28  6:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 21:39 Ying Wang
2019-10-28  6:04 ` Ye Xiaolong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191028060426.GD33024@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=ying.a.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).