DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 18/51] net/mlx4: drop packet type recognition support
Date: Fri,  1 Sep 2017 10:06:33 +0200	[thread overview]
Message-ID: <45666d2cdc6d76f1cfb076777df6a2de9364ea74.1504252977.git.adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <cover.1504252977.git.adrien.mazarguil@6wind.com>

The Verbs API used to implement packet type recognition is deprecated.
Support will be added back after refactoring the PMD.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 doc/guides/nics/features/mlx4.ini |  1 -
 drivers/net/mlx4/mlx4.c           | 70 +---------------------------------
 2 files changed, 2 insertions(+), 69 deletions(-)

diff --git a/doc/guides/nics/features/mlx4.ini b/doc/guides/nics/features/mlx4.ini
index 08a2e17..27c7ae3 100644
--- a/doc/guides/nics/features/mlx4.ini
+++ b/doc/guides/nics/features/mlx4.ini
@@ -14,7 +14,6 @@ MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
 SR-IOV               = Y
-Packet type parsing  = Y
 Basic stats          = Y
 Stats per queue      = Y
 Other kdrv           = Y
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 06fe22d..f026bcd 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -96,12 +96,6 @@ typedef union {
 
 #define WR_ID(o) (((wr_id_t *)&(o))->data)
 
-/* Transpose flags. Useful to convert IBV to DPDK flags. */
-#define TRANSPOSE(val, from, to) \
-	(((from) >= (to)) ? \
-	 (((val) & (from)) / ((from) / (to))) : \
-	 (((val) & (from)) * ((to) / (from))))
-
 /** Configuration structure for device arguments. */
 struct mlx4_conf {
 	struct {
@@ -2088,47 +2082,6 @@ rxq_cleanup(struct rxq *rxq)
 	memset(rxq, 0, sizeof(*rxq));
 }
 
-/**
- * Translate RX completion flags to packet type.
- *
- * @param flags
- *   RX completion flags returned by poll_length_flags().
- *
- * @note: fix mlx4_dev_supported_ptypes_get() if any change here.
- *
- * @return
- *   Packet type for struct rte_mbuf.
- */
-static inline uint32_t
-rxq_cq_to_pkt_type(uint32_t flags)
-{
-	uint32_t pkt_type;
-
-	if (flags & IBV_EXP_CQ_RX_TUNNEL_PACKET)
-		pkt_type =
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_OUTER_IPV4_PACKET,
-				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_OUTER_IPV6_PACKET,
-				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV4_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) |
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV6_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN);
-	else
-		pkt_type =
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV4_PACKET,
-				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
-			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV6_PACKET,
-				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN);
-	return pkt_type;
-}
-
 static uint16_t
 mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n);
 
@@ -2315,7 +2268,7 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		NB_SEGS(pkt_buf) = j;
 		PORT(pkt_buf) = rxq->port_id;
 		PKT_LEN(pkt_buf) = pkt_buf_len;
-		pkt_buf->packet_type = rxq_cq_to_pkt_type(flags);
+		pkt_buf->packet_type = 0;
 		pkt_buf->ol_flags = 0;
 
 		/* Return packet. */
@@ -2470,7 +2423,7 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		NEXT(seg) = NULL;
 		PKT_LEN(seg) = len;
 		DATA_LEN(seg) = len;
-		seg->packet_type = rxq_cq_to_pkt_type(flags);
+		seg->packet_type = 0;
 		seg->ol_flags = 0;
 
 		/* Return packet. */
@@ -3369,24 +3322,6 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	priv_unlock(priv);
 }
 
-static const uint32_t *
-mlx4_dev_supported_ptypes_get(struct rte_eth_dev *dev)
-{
-	static const uint32_t ptypes[] = {
-		/* refers to rxq_cq_to_pkt_type() */
-		RTE_PTYPE_L3_IPV4,
-		RTE_PTYPE_L3_IPV6,
-		RTE_PTYPE_INNER_L3_IPV4,
-		RTE_PTYPE_INNER_L3_IPV6,
-		RTE_PTYPE_UNKNOWN
-	};
-
-	if (dev->rx_pkt_burst == mlx4_rx_burst ||
-	    dev->rx_pkt_burst == mlx4_rx_burst_sp)
-		return ptypes;
-	return NULL;
-}
-
 /**
  * DPDK callback to get device statistics.
  *
@@ -3768,7 +3703,6 @@ static const struct eth_dev_ops mlx4_dev_ops = {
 	.stats_get = mlx4_stats_get,
 	.stats_reset = mlx4_stats_reset,
 	.dev_infos_get = mlx4_dev_infos_get,
-	.dev_supported_ptypes_get = mlx4_dev_supported_ptypes_get,
 	.rx_queue_setup = mlx4_rx_queue_setup,
 	.tx_queue_setup = mlx4_tx_queue_setup,
 	.rx_queue_release = mlx4_rx_queue_release,
-- 
2.1.4

  parent reply	other threads:[~2017-09-01  8:07 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 16:53 [dpdk-dev] [PATCH v1 00/48] net/mlx4: trim and refactor entire PMD Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 01/48] net/mlx4: add consistency to copyright notices Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 02/48] net/mlx4: remove limitation on number of instances Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 03/48] net/mlx4: check max number of ports dynamically Adrien Mazarguil
2017-08-01 17:35   ` Legacy, Allain
2017-08-02  7:52     ` Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 04/48] net/mlx4: remove useless compilation checks Adrien Mazarguil
2017-08-18 13:39   ` Ferruh Yigit
2017-09-01 10:19     ` Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 05/48] net/mlx4: remove secondary process support Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 06/48] net/mlx4: remove useless code Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 07/48] net/mlx4: remove soft counters compilation option Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 08/48] net/mlx4: remove scatter mode " Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 09/48] net/mlx4: remove Tx inline " Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 10/48] net/mlx4: remove allmulti and promisc support Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 11/48] net/mlx4: remove VLAN filter support Adrien Mazarguil
2017-08-01 16:53 ` [dpdk-dev] [PATCH v1 12/48] net/mlx4: remove MAC address configuration support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 13/48] net/mlx4: drop MAC flows affecting all Rx queues Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 14/48] net/mlx4: revert flow API RSS support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 15/48] net/mlx4: revert RSS parent queue refactoring Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 16/48] net/mlx4: drop RSS support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 17/48] net/mlx4: drop checksum offloads support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 18/48] net/mlx4: drop packet type recognition support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 19/48] net/mlx4: drop scatter/gather support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 20/48] net/mlx4: drop inline receive support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 21/48] net/mlx4: use standard QP attributes Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 22/48] net/mlx4: revert resource domain support Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 23/48] net/mlx4: revert multicast echo prevention Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 24/48] net/mlx4: revert fast Verbs interface for Tx Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 25/48] net/mlx4: revert fast Verbs interface for Rx Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 26/48] net/mlx4: simplify link update function Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 27/48] net/mlx4: standardize on negative errno values Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 28/48] net/mlx4: clean up coding style inconsistencies Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 29/48] net/mlx4: remove control path locks Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 30/48] net/mlx4: remove unnecessary wrapper functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 31/48] net/mlx4: remove mbuf macro definitions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 32/48] net/mlx4: use standard macro to get array size Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 33/48] net/mlx4: separate debugging macros Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 34/48] net/mlx4: use a single interrupt handle Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 35/48] net/mlx4: rename alarm field Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 36/48] net/mlx4: refactor interrupt FD settings Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 37/48] net/mlx4: clean up interrupt functions prototypes Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 38/48] net/mlx4: compact interrupt functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 39/48] net/mlx4: separate interrupt handling Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 40/48] net/mlx4: separate Rx/Tx definitions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 41/48] net/mlx4: separate Rx/Tx functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 42/48] net/mlx4: separate device control functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 43/48] net/mlx4: separate Tx configuration functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 44/48] net/mlx4: separate Rx " Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 45/48] net/mlx4: group flow API handlers in common file Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 46/48] net/mlx4: rename private functions in flow API Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 47/48] net/mlx4: separate memory management functions Adrien Mazarguil
2017-08-01 16:54 ` [dpdk-dev] [PATCH v1 48/48] net/mlx4: clean up includes and comments Adrien Mazarguil
2017-08-18 13:28 ` [dpdk-dev] [PATCH v1 00/48] net/mlx4: trim and refactor entire PMD Ferruh Yigit
2017-09-01  8:06 ` [dpdk-dev] [PATCH v2 00/51] " Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 01/51] net/mlx4: add consistency to copyright notices Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 02/51] net/mlx4: remove limitation on number of instances Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 03/51] net/mlx4: check max number of ports dynamically Adrien Mazarguil
2017-09-01 10:57     ` Legacy, Allain
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 04/51] net/mlx4: remove useless compilation checks Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 05/51] net/mlx4: remove secondary process support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 06/51] net/mlx4: remove useless code Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 07/51] net/mlx4: remove soft counters compilation option Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 08/51] net/mlx4: remove scatter mode " Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 09/51] net/mlx4: remove Tx inline " Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 10/51] net/mlx4: remove allmulti and promisc support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 11/51] net/mlx4: remove VLAN filter support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 12/51] net/mlx4: remove MAC address configuration support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 13/51] net/mlx4: drop MAC flows affecting all Rx queues Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 14/51] net/mlx4: revert flow API RSS support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 15/51] net/mlx4: revert RSS parent queue refactoring Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 16/51] net/mlx4: drop RSS support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 17/51] net/mlx4: drop checksum offloads support Adrien Mazarguil
2017-09-01  8:06   ` Adrien Mazarguil [this message]
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 19/51] net/mlx4: drop scatter/gather support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 20/51] net/mlx4: drop inline receive support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 21/51] net/mlx4: use standard QP attributes Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 22/51] net/mlx4: revert resource domain support Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 23/51] net/mlx4: revert multicast echo prevention Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 24/51] net/mlx4: revert fast Verbs interface for Tx Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 25/51] net/mlx4: revert fast Verbs interface for Rx Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 26/51] net/mlx4: simplify Rx buffer handling Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 27/51] net/mlx4: simplify link update function Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 28/51] net/mlx4: standardize on negative errno values Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 29/51] net/mlx4: clean up coding style inconsistencies Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 30/51] net/mlx4: remove control path locks Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 31/51] net/mlx4: remove unnecessary wrapper functions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 32/51] net/mlx4: remove mbuf macro definitions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 33/51] net/mlx4: use standard macro to get array size Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 34/51] net/mlx4: separate debugging macros Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 35/51] net/mlx4: use a single interrupt handle Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 36/51] net/mlx4: rename alarm field Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 37/51] net/mlx4: refactor interrupt FD settings Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 38/51] net/mlx4: clean up interrupt functions prototypes Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 39/51] net/mlx4: compact interrupt functions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 40/51] net/mlx4: separate interrupt handling Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 41/51] net/mlx4: separate Rx/Tx definitions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 42/51] net/mlx4: separate Rx/Tx functions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 43/51] net/mlx4: separate device control functions Adrien Mazarguil
2017-09-01  8:06   ` [dpdk-dev] [PATCH v2 44/51] net/mlx4: separate Tx configuration functions Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 45/51] net/mlx4: separate Rx " Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 46/51] net/mlx4: group flow API handlers in common file Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 47/51] net/mlx4: rename private functions in flow API Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 48/51] net/mlx4: separate memory management functions Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 49/51] net/mlx4: clean up includes and comments Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 50/51] net/mlx4: remove isolated mode constraint Adrien Mazarguil
2017-09-01  8:07   ` [dpdk-dev] [PATCH v2 51/51] net/mlx4: rely on ethdev for Tx/Rx queue arrays Adrien Mazarguil
2017-09-01 11:24   ` [dpdk-dev] [PATCH v2 00/51] net/mlx4: trim and refactor entire PMD Ferruh Yigit
2017-09-01 11:56     ` Adrien Mazarguil
2017-09-05  9:59   ` Ferruh Yigit

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=45666d2cdc6d76f1cfb076777df6a2de9364ea74.1504252977.git.adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    /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).