OSDN Git Service

net: hns3: add linearizing checking for TSO case
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 6 May 2019 02:48:44 +0000 (10:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 17:37:13 +0000 (10:37 -0700)
commitdb4970aa92a148389826057290cd45bb30f5650e
treee5e37fd7844c691f71cee412930990053f865adc
parentd21ff4f90d975f5027678eb84e0d53fb8ca19c9b
net: hns3: add linearizing checking for TSO case

HW requires every continuous 8 buffer data to be larger than MSS,
we simplify it by ensuring skb_headlen + the first continuous
7 frags to to be larger than GSO header len + mss, and the
remaining continuous 7 frags to be larger than MSS except the
last 7 frags.

This patch adds hns3_skb_need_linearized to handle it for TSO
case.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c