diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2020-06-29 21:47:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-29 17:42:48 -0700 |
commit | 4c96c0ac16e046ad3625d7b7228664ba478541a5 (patch) | |
tree | 898ba40d7f06c81a10eafb9cfda48085a3ee25e2 /drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | |
parent | dpaa2-eth: send a scatter-gather FD instead of realloc-ing (diff) | |
download | linux-dev-4c96c0ac16e046ad3625d7b7228664ba478541a5.tar.xz linux-dev-4c96c0ac16e046ad3625d7b7228664ba478541a5.zip |
dpaa2-eth: add software counter for Tx frames converted to S/G
With the previous commit, in case of insufficient SKB headroom on the Tx
path instead of reallocing the SKB we now send a S/G frame descriptor.
Export the number of occurences of this case as a per CPU counter (in
debugfs) and a total number in the ethtool statistics - "tx converted sg
frames'.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 4a264b75c035..bc1f1e0117b6 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -960,6 +960,8 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev) err = build_sg_fd_single_buf(priv, skb, &fd); percpu_extras->tx_sg_frames++; percpu_extras->tx_sg_bytes += skb->len; + percpu_extras->tx_converted_sg_frames++; + percpu_extras->tx_converted_sg_bytes += skb->len; } else { err = build_single_fd(priv, skb, &fd); } |