Commit 3aade31b authored by Kittipon Meesompop's avatar Kittipon Meesompop Committed by David S. Miller

s390/qeth: add stats counter for RX csum offload

This matches the statistics we gather for the TX offload path.
Signed-off-by: default avatarKittipon Meesompop <kmeesomp@linux.vnet.ibm.com>
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b339c24e
...@@ -148,6 +148,7 @@ struct qeth_perf_stats { ...@@ -148,6 +148,7 @@ struct qeth_perf_stats {
unsigned int tx_csum; unsigned int tx_csum;
unsigned int tx_lin; unsigned int tx_lin;
unsigned int tx_linfail; unsigned int tx_linfail;
unsigned int rx_csum;
}; };
/* Routing stuff */ /* Routing stuff */
...@@ -868,10 +869,13 @@ static inline void qeth_rx_csum(struct qeth_card *card, struct sk_buff *skb, ...@@ -868,10 +869,13 @@ static inline void qeth_rx_csum(struct qeth_card *card, struct sk_buff *skb,
u8 flags) u8 flags)
{ {
if ((card->dev->features & NETIF_F_RXCSUM) && if ((card->dev->features & NETIF_F_RXCSUM) &&
(flags & QETH_HDR_EXT_CSUM_TRANSP_REQ)) (flags & QETH_HDR_EXT_CSUM_TRANSP_REQ)) {
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
else if (card->options.performance_stats)
card->perf_stats.rx_csum++;
} else {
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
}
} }
static inline void qeth_tx_csum(struct sk_buff *skb, u8 *flags) static inline void qeth_tx_csum(struct sk_buff *skb, u8 *flags)
......
...@@ -6005,7 +6005,8 @@ static struct { ...@@ -6005,7 +6005,8 @@ static struct {
{"tx lin"}, {"tx lin"},
{"tx linfail"}, {"tx linfail"},
{"cq handler count"}, {"cq handler count"},
{"cq handler time"} {"cq handler time"},
{"rx csum"}
}; };
int qeth_core_get_sset_count(struct net_device *dev, int stringset) int qeth_core_get_sset_count(struct net_device *dev, int stringset)
...@@ -6067,6 +6068,7 @@ void qeth_core_get_ethtool_stats(struct net_device *dev, ...@@ -6067,6 +6068,7 @@ void qeth_core_get_ethtool_stats(struct net_device *dev,
data[35] = card->perf_stats.tx_linfail; data[35] = card->perf_stats.tx_linfail;
data[36] = card->perf_stats.cq_cnt; data[36] = card->perf_stats.cq_cnt;
data[37] = card->perf_stats.cq_time; data[37] = card->perf_stats.cq_time;
data[38] = card->perf_stats.rx_csum;
} }
EXPORT_SYMBOL_GPL(qeth_core_get_ethtool_stats); EXPORT_SYMBOL_GPL(qeth_core_get_ethtool_stats);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment