amd-xgbe: Add additional ethtool statistics
Add some additional statistics for tracking VXLAN packets and checksum errors. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1a510ccf58
commit
3010608d03
@@ -1805,10 +1805,13 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel)
|
||||
packet->length);
|
||||
}
|
||||
|
||||
if (vxlan)
|
||||
if (vxlan) {
|
||||
XGMAC_SET_BITS_LE(rdesc->desc3, TX_NORMAL_DESC3, VNP,
|
||||
TX_NORMAL_DESC3_VXLAN_PACKET);
|
||||
|
||||
pdata->ext_stats.tx_vxlan_packets += packet->tx_packets;
|
||||
}
|
||||
|
||||
for (i = cur_index - start_index + 1; i < packet->rdesc_count; i++) {
|
||||
cur_index++;
|
||||
rdata = XGBE_GET_DESC_DATA(ring, cur_index);
|
||||
@@ -1981,6 +1984,7 @@ static int xgbe_dev_read(struct xgbe_channel *channel)
|
||||
if (XGMAC_GET_BITS_LE(rdesc->desc2, RX_NORMAL_DESC2, TNP)) {
|
||||
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
||||
TNP, 1);
|
||||
pdata->ext_stats.rx_vxlan_packets++;
|
||||
|
||||
l34t = XGMAC_GET_BITS_LE(rdesc->desc3, RX_NORMAL_DESC3, L34T);
|
||||
switch (l34t) {
|
||||
@@ -2018,11 +2022,13 @@ static int xgbe_dev_read(struct xgbe_channel *channel)
|
||||
CSUM_DONE, 0);
|
||||
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
||||
TNPCSUM_DONE, 0);
|
||||
pdata->ext_stats.rx_csum_errors++;
|
||||
} else if (tnp && ((etlt == 0x09) || (etlt == 0x0a))) {
|
||||
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
||||
CSUM_DONE, 0);
|
||||
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
||||
TNPCSUM_DONE, 0);
|
||||
pdata->ext_stats.rx_vxlan_csum_errors++;
|
||||
} else {
|
||||
XGMAC_SET_BITS(packet->errors, RX_PACKET_ERRORS,
|
||||
FRAME, 1);
|
||||
|
Reference in New Issue
Block a user