On Fri, Jan 6, 2023 at 2:40 PM Maxime Coquelin
<maxime.coque...@redhat.com> wrote:
> On 1/5/23 21:24, David Marchand wrote:
> > @@ -2589,34 +2534,27 @@ netdev_dpdk_filter_packet_len(struct netdev_dpdk 
> > *dev, struct rte_mbuf **pkts,
> >
> >   static inline void
> >   netdev_dpdk_vhost_update_tx_counters(struct netdev_dpdk *dev,
> > -                                     struct dp_packet **packets,
> > -                                     int attempted,
> >                                        struct netdev_dpdk_sw_stats 
> > *sw_stats_add)
> >   {
> >       int dropped = sw_stats_add->tx_mtu_exceeded_drops +
> >                     sw_stats_add->tx_qos_drops +
> >                     sw_stats_add->tx_failure_drops +
> >                     sw_stats_add->tx_invalid_hwol_drops;
> > -    struct netdev_stats *stats = &dev->stats;
> > -    int sent = attempted - dropped;
> > -    int i;
> > -
> > -    stats->tx_packets += sent;
> > -    stats->tx_dropped += dropped;
> > +    struct netdev_dpdk_sw_stats *sw_stats;
> >
> > -    for (i = 0; i < sent; i++) {
> > -        stats->tx_bytes += dp_packet_size(packets[i]);
> > +    if (OVS_LIKELY(!dropped)) {
>
> You also need to check there were no tx_retries.

Indeed, I am testing the fix.

>
> > +        return;
> >       }
> >


-- 
David Marchand

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to