summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8a4a11c)
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>
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_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
#
# Compile burst-oriented Cisco ENIC PMD driver
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_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
#
# Compile burst-oriented Cisco ENIC PMD driver
Toggle software counters. No counters are available if this option is
disabled since hardware counters are not supported.
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
~~~~~~~~~~~~~~~~~~~~~
Environment variables
~~~~~~~~~~~~~~~~~~~~~
significantly improve performance in some cases but lower it in
others. Requires careful testing.
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
~~~~~~~~~~~~~~~~~~~~~~
Run-time configuration
~~~~~~~~~~~~~~~~~~~~~~
CFLAGS += -DMLX4_PMD_SOFT_COUNTERS=$(CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS)
endif
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.
include $(RTE_SDK)/mk/rte.lib.mk
# Generate and clean-up mlx4_autoconf.h.
unsigned int hw_tss:1; /* TSS is supported. */
unsigned int hw_rss:1; /* RSS is supported. */
unsigned int rss:1; /* RSS is enabled. */
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 */
unsigned int vf:1; /* This is a VF device. */
#ifdef INLINE_RECV
unsigned int inl_recv_size; /* Inline recv size */
static void
rxq_mac_addr_del(struct rxq *rxq, unsigned int mac_index)
{
static void
rxq_mac_addr_del(struct rxq *rxq, unsigned int mac_index)
{
-#if defined(NDEBUG) || defined(MLX4_COMPAT_VMWARE)
struct priv *priv = rxq->priv;
const uint8_t (*mac)[ETHER_ADDR_LEN] =
(const uint8_t (*)[ETHER_ADDR_LEN])
struct priv *priv = rxq->priv;
const uint8_t (*mac)[ETHER_ADDR_LEN] =
(const uint8_t (*)[ETHER_ADDR_LEN])
(void *)rxq,
(*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5],
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;
assert(rxq->mac_flow[mac_index] != NULL);
claim_zero(ibv_exp_destroy_flow(rxq->mac_flow[mac_index]));
rxq->mac_flow[mac_index] = NULL;
(*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5],
mac_index,
vlans);
(*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);
/* Create related flow. */
errno = 0;
flow = ibv_exp_create_flow(rxq->qp, attr);
-#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;
DEBUG("%p: enabling allmulticast mode", (void *)rxq);
if (rxq->allmulti_flow != NULL)
return EBUSY;
static void
rxq_allmulticast_disable(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;
DEBUG("%p: disabling allmulticast mode", (void *)rxq);
if (rxq->allmulti_flow == NULL)
return;
-#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);
if (rxq->priv->vf)
return 0;
DEBUG("%p: enabling promiscuous mode", (void *)rxq);
static void
rxq_promiscuous_disable(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);
if (rxq->priv->vf)
return;
DEBUG("%p: disabling promiscuous mode", (void *)rxq);
}
#endif /* INLINE_RECV */
}
#endif /* INLINE_RECV */
-#ifdef MLX4_COMPAT_VMWARE
- if (mlx4_getenv_int("MLX4_COMPAT_VMWARE"))
- priv->vmware = 1;
-#else /* MLX4_COMPAT_VMWARE */
-#endif /* MLX4_COMPAT_VMWARE */
priv->vf = vf;
if (ibv_query_gid(ctx, port, 0, &temp_gid)) {
ERROR("ibv_query_gid() failure");
priv->vf = vf;
if (ibv_query_gid(ctx, port, 0, &temp_gid)) {
ERROR("ibv_query_gid() failure");
#define MLX4_PMD_SOFT_COUNTERS 1
#endif
#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,
};
enum {
PCI_VENDOR_ID_MELLANOX = 0x15b3,
};