On Thu, Sep 1, 2022 at 6:16 AM Robin Jarry <[email protected]> wrote:
>
> Packets that could not be transmitted because the TXQ are full should be
> taken into account in the global ovs_tx_failure_drops as it was the case
> before commit 29b94e12d57d ("netdev-dpdk: Refactor the DPDK transmit
> path.").
>
> netdev_dpdk_eth_tx_burst() returns the number of packets that were *not*
> transmitted. Add that number to stats.tx_failure_drops and only include
> the packets that were dropped in previous steps afterwards.
>
> Fixes: 29b94e12d57d ("netdev-dpdk: Refactor the DPDK transmit path.")
> Signed-off-by: Robin Jarry <[email protected]>

Looks good to me.

Acked-by: Mike Pattrick <[email protected]>

> ---
>
> Notes:
>     v2 -> v3: fixed double count of tx_failure_drops
>
>  lib/netdev-dpdk.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 0dd655507b50..ff241e02fe48 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -2882,9 +2882,9 @@ netdev_dpdk_eth_send(struct netdev *netdev, int qid,
>
>      cnt = netdev_dpdk_common_send(netdev, batch, &stats);
>
> -    dropped = batch_cnt - cnt;
> -
> -    dropped += netdev_dpdk_eth_tx_burst(dev, qid, pkts, cnt);
> +    dropped = netdev_dpdk_eth_tx_burst(dev, qid, pkts, cnt);
> +    stats.tx_failure_drops += dropped;
> +    dropped += batch_cnt - cnt;
>      if (OVS_UNLIKELY(dropped)) {
>          struct netdev_dpdk_sw_stats *sw_stats = dev->sw_stats;
>
> --
> 2.37.2
>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to