Message ID | 20240610035300.2366893-1-aryan.srivastava@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v0] net: mvpp2: use slab_build_skb for oversized frames | expand |
On Mon, 10 Jun 2024 15:53:00 +1200 Aryan Srivastava wrote: > Setting frag_size to 0 to indicate kmalloc has been deprecated, > use slab_build_skb directly. Makes sense but please repost with a Fixes tag added. Presumably pointing at the commit which started rejecting 0-length frag from build_skb().
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;
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(-)