]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: hns3: Add skb chain when num of RX buf exceeds MAX_SKB_FRAGS
authorPeng Li <lipeng321@huawei.com>
Thu, 15 Nov 2018 09:29:24 +0000 (09:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2018 17:44:46 +0000 (09:44 -0800)
commit81ae0e0491f31775d086e24a7cd2a4a4ec29f346
tree66ec71daf0099a363d02a65f4f2d80bbfeccb95d
parent5c9f6b3935f808afdabac560250bcf4333311efc
net: hns3: Add skb chain when num of RX buf exceeds MAX_SKB_FRAGS

MAX_SKB_FRAGS in protocol stack is defined as:

MAX_SKB_FRAGS is 17 when PAGE_SIZE is 4K. If HW enable GRO, it may
merge small packets and the rx buffer may be more than
MAX_SKB_FRAGS. So driver will add skb chain when RX buffer num.
more than MAX_SKB_FRAGS.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h