[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240610035300.2366893-1-aryan.srivastava@alliedtelesis.co.nz>
Date: Mon, 10 Jun 2024 15:53:00 +1200
From: Aryan Srivastava <aryan.srivastava@...iedtelesis.co.nz>
To: linux@...linux.org.uk
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Aryan Srivastava <aryan.srivastava@...iedtelesis.co.nz>,
Marcin Wojtas <mw@...ihalf.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH v0] net: mvpp2: use slab_build_skb for oversized frames
Setting frag_size to 0 to indicate kmalloc has been deprecated,
use slab_build_skb directly.
Signed-off-by: Aryan Srivastava <aryan.srivastava@...iedtelesis.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
Powered by blists - more mailing lists