git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mlx5: support promiscuous and allmulticast Rx modes
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_rxq.c
diff --git
a/drivers/net/mlx5/mlx5_rxq.c
b/drivers/net/mlx5/mlx5_rxq.c
index
620ec70
..
1cd28c2
100644
(file)
--- a/
drivers/net/mlx5/mlx5_rxq.c
+++ b/
drivers/net/mlx5/mlx5_rxq.c
@@
-398,6
+398,8
@@
rxq_cleanup(struct rxq *rxq)
¶ms));
}
if (rxq->qp != NULL) {
¶ms));
}
if (rxq->qp != NULL) {
+ rxq_promiscuous_disable(rxq);
+ rxq_allmulticast_disable(rxq);
rxq_mac_addrs_del(rxq);
claim_zero(ibv_destroy_qp(rxq->qp));
}
rxq_mac_addrs_del(rxq);
claim_zero(ibv_destroy_qp(rxq->qp));
}
@@
-580,8
+582,12
@@
rxq_rehash(struct rte_eth_dev *dev, struct rxq *rxq)
}
/* Remove attached flows if RSS is disabled (no parent queue). */
if (!priv->rss) {
}
/* Remove attached flows if RSS is disabled (no parent queue). */
if (!priv->rss) {
+ rxq_allmulticast_disable(&tmpl);
+ rxq_promiscuous_disable(&tmpl);
rxq_mac_addrs_del(&tmpl);
/* Update original queue in case of failure. */
rxq_mac_addrs_del(&tmpl);
/* Update original queue in case of failure. */
+ rxq->allmulti_flow = tmpl.allmulti_flow;
+ rxq->promisc_flow = tmpl.promisc_flow;
memcpy(rxq->mac_flow, tmpl.mac_flow, sizeof(rxq->mac_flow));
}
/* From now on, any failure will render the queue unusable.
memcpy(rxq->mac_flow, tmpl.mac_flow, sizeof(rxq->mac_flow));
}
/* From now on, any failure will render the queue unusable.
@@
-621,7
+627,13
@@
rxq_rehash(struct rte_eth_dev *dev, struct rxq *rxq)
if (!priv->rss) {
if (priv->started)
rxq_mac_addrs_add(&tmpl);
if (!priv->rss) {
if (priv->started)
rxq_mac_addrs_add(&tmpl);
+ if (priv->started && priv->promisc_req)
+ rxq_promiscuous_enable(&tmpl);
+ if (priv->started && priv->allmulti_req)
+ rxq_allmulticast_enable(&tmpl);
/* Update original queue in case of failure. */
/* Update original queue in case of failure. */
+ rxq->allmulti_flow = tmpl.allmulti_flow;
+ rxq->promisc_flow = tmpl.promisc_flow;
memcpy(rxq->mac_flow, tmpl.mac_flow, sizeof(rxq->mac_flow));
}
/* Allocate pool. */
memcpy(rxq->mac_flow, tmpl.mac_flow, sizeof(rxq->mac_flow));
}
/* Allocate pool. */