提交 d06db05a 编写于 作者: S Shannon Nelson 提交者: Zheng Zengkai

ionic: count csum_none when offload enabled

stable inclusion
from stable-5.10.56
commit 7eefa0b74f3e55dec85edfe5f5270c6f8b598155
bugzilla: 176004 https://gitee.com/openeuler/kernel/issues/I4DYZ4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7eefa0b74f3e55dec85edfe5f5270c6f8b598155

--------------------------------

[ Upstream commit f07f9815 ]

Be sure to count the csum_none cases when csum offload is
enabled.

Fixes: 0f3154e6 ("ionic: Add Tx and Rx handling")
Signed-off-by: NShannon Nelson <snelson@pensando.io>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 df4dbf29
...@@ -197,12 +197,11 @@ static void ionic_rx_clean(struct ionic_queue *q, ...@@ -197,12 +197,11 @@ static void ionic_rx_clean(struct ionic_queue *q,
} }
} }
if (likely(netdev->features & NETIF_F_RXCSUM)) { if (likely(netdev->features & NETIF_F_RXCSUM) &&
if (comp->csum_flags & IONIC_RXQ_COMP_CSUM_F_CALC) { (comp->csum_flags & IONIC_RXQ_COMP_CSUM_F_CALC)) {
skb->ip_summed = CHECKSUM_COMPLETE; skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = (__force __wsum)le16_to_cpu(comp->csum); skb->csum = (__force __wsum)le16_to_cpu(comp->csum);
stats->csum_complete++; stats->csum_complete++;
}
} else { } else {
stats->csum_none++; stats->csum_none++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册