On Thu, Feb 13, 2025 at 11:55:25AM +0800, Jijie Shao wrote:
This patch implements the rx checksum offload feature...
including NETIF_F_IP_CSUM NETIF_F_IPV6_CSUM and NETIF_F_RXCSUM
Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_txrx.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_txrx.cnit: I think this would be better expressed in a way that
index 8c631a9bcb6b..aa1d128a863b 100644
--- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_txrx.c
+++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_txrx.c
@@ -202,8 +202,11 @@ static int hbg_napi_tx_recycle(struct napi_struct *napi, int budget)
}
static bool hbg_rx_check_l3l4_error(struct hbg_priv *priv,
- struct hbg_rx_desc *desc)
+ struct hbg_rx_desc *desc,
+ struct sk_buff *skb)
{
+ bool rx_checksum_offload = priv->netdev->features & NETIF_F_RXCSUM;
rx_checksum_offload is assigned a boolean value (completely untested).
bool rx_checksum_offload = !!(priv->netdev->features & NETIF_F_RXCSUM);
+
if (likely(!FIELD_GET(HBG_RX_DESC_W4_L3_ERR_CODE_M, desc->word4) &&
!FIELD_GET(HBG_RX_DESC_W4_L4_ERR_CODE_M, desc->word4)))
return true;