Caught by code review, rx queue fill was wrong in case some ingress policing
was in place since nb_rx could get updated.
Fixes: 8492adc270fd ("netdev: Add optional qfill output parameter to
rxq_recv()")
Signed-off-by: David Marchand <[email protected]>
Acked-by: Mike Pattrick <[email protected]>
Acked-by: Kevin Traynor <[email protected]>
---
lib/netdev-dpdk.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 687e1196b5..3704145a57 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -3019,6 +3019,14 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct
dp_packet_batch *batch,
return EAGAIN;
}
+ if (qfill) {
+ if (nb_rx == NETDEV_MAX_BURST) {
+ *qfill = rte_eth_rx_queue_count(rx->port_id, rxq->queue_id);
+ } else {
+ *qfill = 0;
+ }
+ }
+
if (policer) {
dropped = nb_rx;
nb_rx = ingress_policer_run(policer,
@@ -3038,14 +3046,6 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct
dp_packet_batch *batch,
batch->count = nb_rx;
netdev_dpdk_batch_init_packet_fields(batch);
- if (qfill) {
- if (nb_rx == NETDEV_MAX_BURST) {
- *qfill = rte_eth_rx_queue_count(rx->port_id, rxq->queue_id);
- } else {
- *qfill = 0;
- }
- }
-
return 0;
}
--
2.51.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev