From: Adrien Mazarguil Date: Wed, 25 Mar 2015 10:34:31 +0000 (+0100) Subject: mlx4: remove old VMware compatibility code X-Git-Tag: spdx-start~9381 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ad37b97d8d755b4d53c7d1e6903da4bdecbae291;p=dpdk.git mlx4: remove old VMware compatibility code 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 Signed-off-by: Adrien Mazarguil Acked-by: Neil Horman --- diff --git a/config/common_bsdapp b/config/common_bsdapp index 93d2f9e12e..a8ba48424b 100644 --- a/config/common_bsdapp +++ b/config/common_bsdapp @@ -209,7 +209,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 19de75fd0f..0b25f340e7 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -206,7 +206,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 35570c3685..b26c2198f9 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 6666813134..97b364aa27 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 3a45746418..fa749f4541 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 af3683d8cb..433aa3b7e3 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, };