Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Eric Dumazet
Fri, 09 Oct 2026 08:45
[PATCH net-next] hinic3: use skb_put_padto()
Author: Eric Dumazet
Date: Fri, 09 Oct 2026 08:45
Date: Fri, 09 Oct 2026 08:45
34 lines
6173 bytes
6173 bytes
hinic3_send_one_skb() pads short frames with skb_pad(), then
sets skb->len directly, leaving skb->tail stale.
Use skb_put_padto(), which updates both.
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
---
Medium term goal : remove skb_pad() in favor of more robust alternatives.
drivers/net/ethernet/huawei/hinic3/hinic3_tx.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
index d19cfbe3ed3b372136e64d767dea366bc4f46637..f92568f0f00b74e28c789b7ef444db9d4fab4d0c 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
@@ -541,12 +541,8 @@ static netdev_tx_t hinic3_send_one_skb(struct sk_buff *skb,
u32 offload;
int err;
- if (unlikely(skb->len < MIN_SKB_LEN)) {
- if (skb_pad(skb, MIN_SKB_LEN - skb->len))
- goto err_out;
-
- skb->len = MIN_SKB_LEN;
- }
+ if (skb_put_padto(skb, MIN_SKB_LEN))
+ goto err_out;
offload = hinic3_tx_offload(skb, &task, &queue_info, txq);
num_sge = skb_shinfo(skb)->nr_frags + 1;
--
2.53.0
Re: [PATCH net-next] hinic3: use skb_put_padto()
Author: patchwork-bot+netdevbpf
Date: Thu, 15 Oct 2026 10:20
Date: Thu, 15 Oct 2026 10:20
24 lines
6073 bytes
6073 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Fri, 9 Oct 2026 10:45:33 +0200 you wrote:
> hinic3_send_one_skb() pads short frames with skb_pad(), then
> sets skb->len directly, leaving skb->tail stale.
>
> Use skb_put_padto(), which updates both.
>
> Signed-off-by: Eric Dumazet <edumazet@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] hinic3: use skb_put_padto()
https://git.kernel.org/netdev/net-next/c/6329e8232aa8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads