summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/google/gve/gve_ethtool.c
diff options
context:
space:
mode:
authorCatherine Sullivan <csully@google.com>2020-12-07 14:45:26 -0800
committerDavid S. Miller <davem@davemloft.net>2020-12-08 16:06:28 -0800
commit6f007c6486d69967ac1d9e67df9ae9c77d49f1cc (patch)
treefcaa4784b3e2541ffa6319c37a2040e4ae3265c3 /drivers/net/ethernet/google/gve/gve_ethtool.c
parent02b0e0c18ba75227e0482600950c6abe71ace30f (diff)
gve: Add support for raw addressing in the tx path
During TX, skbs' data addresses are dma_map'ed and passed to the NIC. This means that the device can perform DMA directly from these addresses and the driver does not have to copy the buffer content into pre-allocated buffers/qpls (as in qpl mode). Reviewed-by: Yangchun Fu <yangchun@google.com> Signed-off-by: Catherine Sullivan <csully@google.com> Signed-off-by: David Awogbemila <awogbemila@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/google/gve/gve_ethtool.c')
-rw-r--r--drivers/net/ethernet/google/gve/gve_ethtool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 2fb197fd3daf..0901fa6853ca 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -51,6 +51,7 @@ static const char gve_gstrings_rx_stats[][ETH_GSTRING_LEN] = {
static const char gve_gstrings_tx_stats[][ETH_GSTRING_LEN] = {
"tx_posted_desc[%u]", "tx_completed_desc[%u]", "tx_bytes[%u]",
"tx_wake[%u]", "tx_stop[%u]", "tx_event_counter[%u]",
+ "tx_dma_mapping_error[%u]",
};
static const char gve_gstrings_adminq_stats[][ETH_GSTRING_LEN] = {
@@ -323,6 +324,7 @@ gve_get_ethtool_stats(struct net_device *netdev,
data[i++] = tx->stop_queue;
data[i++] = be32_to_cpu(gve_tx_load_event_counter(priv,
tx));
+ data[i++] = tx->dma_mapping_error;
/* stats from NIC */
if (skip_nic_stats) {
/* skip NIC tx stats */