DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mlx4: remove old VMware compatibility code
@ 2015-03-25 10:34 Adrien Mazarguil
  2015-03-25 10:39 ` Neil Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Adrien Mazarguil @ 2015-03-25 10:34 UTC (permalink / raw)
  To: dev

CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE has no effect since this option enables
MLX4_PMD_COMPAT_VMWARE. This macro is not used by the PMD which expects
MLX4_COMPAT_VMWARE instead.

Because this option does not work and the related code is no longer useful
for VMware (as it actually supports the flow steering API), remove it
entirely.

Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 config/common_bsdapp                         |  1 -
 config/common_linuxapp                       |  1 -
 doc/guides/prog_guide/mlx4_poll_mode_drv.rst | 11 -----
 lib/librte_pmd_mlx4/Makefile                 |  4 --
 lib/librte_pmd_mlx4/mlx4.c                   | 64 +---------------------------
 lib/librte_pmd_mlx4/mlx4.h                   |  8 ----
 6 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 8ff4dc2..5c7ca43 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -208,7 +208,6 @@ CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N=4
 CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE=0
 CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1
-CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE=1
 
 #
 # Compile burst-oriented Cisco ENIC PMD driver
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 09a58ac..5cbb8c3 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -205,7 +205,6 @@ CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N=4
 CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE=0
 CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1
-CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE=1
 
 #
 # Compile burst-oriented Cisco ENIC PMD driver
diff --git a/doc/guides/prog_guide/mlx4_poll_mode_drv.rst b/doc/guides/prog_guide/mlx4_poll_mode_drv.rst
index 35570c3..b26c219 100644
--- a/doc/guides/prog_guide/mlx4_poll_mode_drv.rst
+++ b/doc/guides/prog_guide/mlx4_poll_mode_drv.rst
@@ -125,11 +125,6 @@ Compilation options
   Toggle software counters. No counters are available if this option is
   disabled since hardware counters are not supported.
 
-- ``CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE`` (default **1**)
-
-  Toggle VMware compatibility code. It also requires the environment
-  variable ``MLX4_COMPAT_VMWARE`` set to a nonzero value at runtime.
-
 Environment variables
 ~~~~~~~~~~~~~~~~~~~~~
 
@@ -139,12 +134,6 @@ Environment variables
   significantly improve performance in some cases but lower it in
   others. Requires careful testing.
 
-- ``MLX4_COMPAT_VMWARE``
-
-  Only supported when compiled with
-  ``CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE=1``. Adds workarounds to run in
-  VMware systems that do not support the flows API properly.
-
 Run-time configuration
 ~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/lib/librte_pmd_mlx4/Makefile b/lib/librte_pmd_mlx4/Makefile
index 6666813..97b364a 100644
--- a/lib/librte_pmd_mlx4/Makefile
+++ b/lib/librte_pmd_mlx4/Makefile
@@ -87,10 +87,6 @@ ifdef CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS
 CFLAGS += -DMLX4_PMD_SOFT_COUNTERS=$(CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS)
 endif
 
-ifdef CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE
-CFLAGS += -DMLX4_PMD_COMPAT_VMWARE=$(CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE)
-endif
-
 include $(RTE_SDK)/mk/rte.lib.mk
 
 # Generate and clean-up mlx4_autoconf.h.
diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c
index 3a45746..fa749f4 100644
--- a/lib/librte_pmd_mlx4/mlx4.c
+++ b/lib/librte_pmd_mlx4/mlx4.c
@@ -278,9 +278,6 @@ struct priv {
 	unsigned int hw_tss:1; /* TSS is supported. */
 	unsigned int hw_rss:1; /* RSS is supported. */
 	unsigned int rss:1; /* RSS is enabled. */
-#ifdef MLX4_COMPAT_VMWARE
-	unsigned int vmware:1; /* Use VMware compatibility. */
-#endif
 	unsigned int vf:1; /* This is a VF device. */
 #ifdef INLINE_RECV
 	unsigned int inl_recv_size; /* Inline recv size */
@@ -1825,7 +1822,7 @@ rxq_free_elts(struct rxq *rxq)
 static void
 rxq_mac_addr_del(struct rxq *rxq, unsigned int mac_index)
 {
-#if defined(NDEBUG) || defined(MLX4_COMPAT_VMWARE)
+#ifndef NDEBUG
 	struct priv *priv = rxq->priv;
 	const uint8_t (*mac)[ETHER_ADDR_LEN] =
 		(const uint8_t (*)[ETHER_ADDR_LEN])
@@ -1842,16 +1839,6 @@ rxq_mac_addr_del(struct rxq *rxq, unsigned int mac_index)
 	      (void *)rxq,
 	      (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5],
 	      mac_index);
-#ifdef MLX4_COMPAT_VMWARE
-	if (priv->vmware) {
-		union ibv_gid gid = { .raw = { 0 } };
-
-		memcpy(&gid.raw[10], *mac, sizeof(*mac));
-		claim_zero(ibv_detach_mcast(rxq->qp, &gid, 0));
-		BITFIELD_RESET(rxq->mac_configured, mac_index);
-		return;
-	}
-#endif
 	assert(rxq->mac_flow[mac_index] != NULL);
 	claim_zero(ibv_exp_destroy_flow(rxq->mac_flow[mac_index]));
 	rxq->mac_flow[mac_index] = NULL;
@@ -1960,22 +1947,6 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index)
 	      (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5],
 	      mac_index,
 	      vlans);
-#ifdef MLX4_COMPAT_VMWARE
-	if (priv->vmware) {
-		union ibv_gid gid = { .raw = { 0 } };
-
-		/* Call multicast attach with unicast mac to get traffic. */
-		memcpy(&gid.raw[10], *mac, sizeof(*mac));
-		errno = 0;
-		if (ibv_attach_mcast(rxq->qp, &gid, 0)) {
-			if (errno)
-				return errno;
-			return EINVAL;
-		}
-		BITFIELD_SET(rxq->mac_configured, mac_index);
-		return 0;
-	}
-#endif
 	/* Create related flow. */
 	errno = 0;
 	flow = ibv_exp_create_flow(rxq->qp, attr);
@@ -2173,13 +2144,6 @@ rxq_allmulticast_enable(struct rxq *rxq)
 		.flags = 0
 	};
 
-#ifdef MLX4_COMPAT_VMWARE
-	if (rxq->priv->vmware) {
-		ERROR("%p: allmulticast mode is not supported in VMware",
-		      (void *)rxq);
-		return EINVAL;
-	}
-#endif
 	DEBUG("%p: enabling allmulticast mode", (void *)rxq);
 	if (rxq->allmulti_flow != NULL)
 		return EBUSY;
@@ -2208,13 +2172,6 @@ rxq_allmulticast_enable(struct rxq *rxq)
 static void
 rxq_allmulticast_disable(struct rxq *rxq)
 {
-#ifdef MLX4_COMPAT_VMWARE
-	if (rxq->priv->vmware) {
-		ERROR("%p: allmulticast mode is not supported in VMware",
-		      (void *)rxq);
-		return;
-	}
-#endif
 	DEBUG("%p: disabling allmulticast mode", (void *)rxq);
 	if (rxq->allmulti_flow == NULL)
 		return;
@@ -2243,13 +2200,6 @@ rxq_promiscuous_enable(struct rxq *rxq)
 		.flags = 0
 	};
 
-#ifdef MLX4_COMPAT_VMWARE
-	if (rxq->priv->vmware) {
-		ERROR("%p: promiscuous mode is not supported in VMware",
-		      (void *)rxq);
-		return EINVAL;
-	}
-#endif
 	if (rxq->priv->vf)
 		return 0;
 	DEBUG("%p: enabling promiscuous mode", (void *)rxq);
@@ -2280,13 +2230,6 @@ rxq_promiscuous_enable(struct rxq *rxq)
 static void
 rxq_promiscuous_disable(struct rxq *rxq)
 {
-#ifdef MLX4_COMPAT_VMWARE
-	if (rxq->priv->vmware) {
-		ERROR("%p: promiscuous mode is not supported in VMware",
-		      (void *)rxq);
-		return;
-	}
-#endif
 	if (rxq->priv->vf)
 		return;
 	DEBUG("%p: disabling promiscuous mode", (void *)rxq);
@@ -4594,12 +4537,7 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		}
 #endif /* INLINE_RECV */
 
-#ifdef MLX4_COMPAT_VMWARE
-		if (mlx4_getenv_int("MLX4_COMPAT_VMWARE"))
-			priv->vmware = 1;
-#else /* MLX4_COMPAT_VMWARE */
 		(void)mlx4_getenv_int;
-#endif /* MLX4_COMPAT_VMWARE */
 		priv->vf = vf;
 		if (ibv_query_gid(ctx, port, 0, &temp_gid)) {
 			ERROR("ibv_query_gid() failure");
diff --git a/lib/librte_pmd_mlx4/mlx4.h b/lib/librte_pmd_mlx4/mlx4.h
index af3683d..433aa3b 100644
--- a/lib/librte_pmd_mlx4/mlx4.h
+++ b/lib/librte_pmd_mlx4/mlx4.h
@@ -80,14 +80,6 @@
 #define MLX4_PMD_SOFT_COUNTERS 1
 #endif
 
-/*
- * If defined, enable VMware compatibility code. It also requires the
- * environment variable MLX4_COMPAT_VMWARE set to a nonzero value at runtime.
- */
-#ifndef MLX4_COMPAT_VMWARE
-#define MLX4_COMPAT_VMWARE 1
-#endif
-
 enum {
 	PCI_VENDOR_ID_MELLANOX = 0x15b3,
 };
-- 
2.1.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mlx4: remove old VMware compatibility code
  2015-03-25 10:34 [dpdk-dev] [PATCH] mlx4: remove old VMware compatibility code Adrien Mazarguil
@ 2015-03-25 10:39 ` Neil Horman
  2015-03-27 10:57   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2015-03-25 10:39 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dev

On Wed, Mar 25, 2015 at 11:34:31AM +0100, Adrien Mazarguil wrote:
> CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE has no effect since this option enables
> MLX4_PMD_COMPAT_VMWARE. This macro is not used by the PMD which expects
> MLX4_COMPAT_VMWARE instead.
> 
> Because this option does not work and the related code is no longer useful
> for VMware (as it actually supports the flow steering API), remove it
> entirely.
> 
> Signed-off-by: Olga Shern <olgas@mellanox.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mlx4: remove old VMware compatibility code
  2015-03-25 10:39 ` Neil Horman
@ 2015-03-27 10:57   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-03-27 10:57 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dev

> > CONFIG_RTE_LIBRTE_MLX4_COMPAT_VMWARE has no effect since this option enables
> > MLX4_PMD_COMPAT_VMWARE. This macro is not used by the PMD which expects
> > MLX4_COMPAT_VMWARE instead.
> > 
> > Because this option does not work and the related code is no longer useful
> > for VMware (as it actually supports the flow steering API), remove it
> > entirely.
> > 
> > Signed-off-by: Olga Shern <olgas@mellanox.com>
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-27 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 10:34 [dpdk-dev] [PATCH] mlx4: remove old VMware compatibility code Adrien Mazarguil
2015-03-25 10:39 ` Neil Horman
2015-03-27 10:57   ` Thomas Monjalon

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).