public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v0] net: mvpp2: use slab_build_skb for oversized frames
@ 2024-06-10  3:53 Aryan Srivastava
  2024-06-12  2:33 ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Aryan Srivastava @ 2024-06-10  3:53 UTC (permalink / raw)
  To: linux
  Cc: netdev, linux-kernel, Aryan Srivastava, Marcin Wojtas,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni

Setting frag_size to 0 to indicate kmalloc has been deprecated,
use slab_build_skb directly.

Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index aca17082b9ec..05f4aa11b95c 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4001,7 +4001,10 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi,
 			}
 		}
 
-		skb = build_skb(data, frag_size);
+		if (frag_size)
+			skb = build_skb(data, frag_size);
+		else
+			skb = slab_build_skb(data);
 		if (!skb) {
 			netdev_warn(port->dev, "skb build failed\n");
 			goto err_drop_frame;
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-14  0:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10  3:53 [PATCH v0] net: mvpp2: use slab_build_skb for oversized frames Aryan Srivastava
2024-06-12  2:33 ` Jakub Kicinski
2024-06-13  2:49   ` [PATCH v1] " Aryan Srivastava
2024-06-13  3:05     ` Kees Cook
2024-06-13  3:13       ` Aryan Srivastava
2024-06-13  3:34         ` Kees Cook
2024-06-13  3:39           ` Aryan Srivastava
2024-06-14  0:20     ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox