[dpdk-dev] [PATCH v2 10/23] mlx4: remove provision for flow creation failure in DMFS A0 mode

Adrien Mazarguil adrien.mazarguil at 6wind.com
Tue Jun 30 11:27:56 CEST 2015


From: Or Ami <ora at mellanox.com>

Starting from MLNX_OFED 3.0 FW 2.34.5000 when working with optimized
steering mode (-7) QPs can be attached to the port's MAC, therefore no need
for the check.

Signed-off-by: Or Ami <ora at mellanox.com>
Signed-off-by: Olga Shern <olgas at mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
 drivers/net/mlx4/mlx4.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index c87facb..8da21cd 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -272,7 +272,6 @@ struct priv {
 	uint8_t port; /* Physical port number. */
 	unsigned int started:1; /* Device started, flows enabled. */
 	unsigned int promisc:1; /* Device in promiscuous mode. */
-	unsigned int promisc_ok:1; /* Promiscuous flow is supported. */
 	unsigned int allmulti:1; /* Device receives all multicast packets. */
 	unsigned int hw_qpg:1; /* QP groups are supported. */
 	unsigned int hw_tss:1; /* TSS is supported. */
@@ -1983,25 +1982,6 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index)
 	errno = 0;
 	flow = ibv_create_flow(rxq->qp, attr);
 	if (flow == NULL) {
-		int err = errno;
-
-		/* Flow creation failure is not fatal when in DMFS A0 mode.
-		 * Ignore error if promiscuity is already enabled or can be
-		 * enabled. */
-		if (priv->promisc_ok)
-			return 0;
-		if ((rxq->promisc_flow != NULL) ||
-		    (rxq_promiscuous_enable(rxq) == 0)) {
-			if (rxq->promisc_flow != NULL)
-				rxq_promiscuous_disable(rxq);
-			WARN("cannot configure normal flow but promiscuous"
-			     " mode is fine, assuming promiscuous optimization"
-			     " is enabled"
-			     " (options mlx4_core log_num_mgm_entry_size=-7)");
-			priv->promisc_ok = 1;
-			return 0;
-		}
-		errno = err;
 		/* It's not clear whether errno is always set in this case. */
 		ERROR("%p: flow configuration failed, errno=%d: %s",
 		      (void *)rxq, errno,
-- 
2.1.0



More information about the dev mailing list