Re: [PATCH net-next v12 1/8] hinic3: Fix drop skb when skb_checksum_help() fails

From: Larysa Zaremba

Date: Thu Jul 30 2026 - 07:55:12 EST


On Mon, Jul 27, 2026 at 02:54:52PM +0800, Fan Gong wrote:
> Changes hinic3_tx_csum()/hinic3_tx_offload() to propagate
> skb_checksum_help() failures into a TX drop.
>
> Co-developed-by: Wu Di <wudi234@xxxxxxxxxx>
> Signed-off-by: Wu Di <wudi234@xxxxxxxxxx>
> Co-developed-by: Teng Peisen <tengpeisen@xxxxxxxxxx>
> Signed-off-by: Teng Peisen <tengpeisen@xxxxxxxxxx>
> Signed-off-by: Fan Gong <gongfan1@xxxxxxxxxx>

Regarding patch 1/8 and 2/8 in this series. A change either fixes a bug or it
does not. If it does, the patch must go the net tree and contain a Fixes: tag.
If it is a prerequisite for your -next series, you need the fixes to be merged
first (but it's usually not that long). If you are rather sure that the code
inconsistency that you are correcting does not have any real negative impact
(e.g. failure is only for features not supported by the netdev), it can go in a
normal -next patch series, but it's best to explain, why it has no real
functional impact and avoid using the word "fix", otherwise both humans and AIs
can get confused.

> ---
> drivers/net/ethernet/huawei/hinic3/hinic3_tx.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> index 9306bf0020ca..53c065194136 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> @@ -261,8 +261,7 @@ static int hinic3_tx_csum(struct hinic3_txq *txq, struct hinic3_sq_task *task,
> ((struct udphdr *)skb_transport_header(skb))->dest !=
> VXLAN_OFFLOAD_PORT_LE) {
> /* Unsupported tunnel packet, disable csum offload */
> - skb_checksum_help(skb);
> - return 0;
> + return skb_checksum_help(skb);
> }
> }
>
> @@ -412,6 +411,10 @@ static u32 hinic3_tx_offload(struct sk_buff *skb, struct hinic3_sq_task *task,
> offload |= HINIC3_TX_OFFLOAD_TSO;
> } else {
> tso_cs_en = hinic3_tx_csum(txq, task, skb);
> + if (tso_cs_en < 0) {
> + offload = HINIC3_TX_OFFLOAD_INVALID;
> + return offload;
> + }
> if (tso_cs_en)
> offload |= HINIC3_TX_OFFLOAD_CSUM;
> }
> --
> 2.54.0
>
>