Skip to content

Commit

Permalink
net/af_xdp: remove unused local statistic
Browse files Browse the repository at this point in the history
The rx_dropped statistic is never incremented so its existence
is pointless. Remove it.

Fixes: f1debd7 ("net/af_xdp: introduce AF_XDP PMD")
cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
cloftus authored and ovsrobot committed May 14, 2024
1 parent 987f70d commit c65b690
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/af_xdp/rte_eth_af_xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ struct xsk_umem_info {
struct rx_stats {
uint64_t rx_pkts;
uint64_t rx_bytes;
uint64_t rx_dropped;
uint64_t imissed_offset;
};

Expand Down Expand Up @@ -876,7 +875,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

stats->ipackets += stats->q_ipackets[i];
stats->ibytes += stats->q_ibytes[i];
stats->imissed += rxq->stats.rx_dropped;
stats->oerrors += txq->stats.tx_dropped;
fd = process_private->rxq_xsk_fds[i];
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
Expand Down

0 comments on commit c65b690

Please sign in to comment.