OSDN Git Service

net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver
authorHao Chen <chenhao288@hisilicon.com>
Thu, 18 Nov 2021 12:12:41 +0000 (20:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 12:31:47 +0000 (12:31 +0000)
commite445f08af2b15035474439fbbb8649f466ad2501
tree284016beb7f68cb1da5e8c01ead12fccdaf8071f
parent448f413a8bdc727d25d9a786ccbdb974fb85d973
net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver

Tx copybreak buf size is used for tx copybreak feature, the feature is
used for small size packet or frag. It adds a queue based tx shared
bounce buffer to memcpy the small packet when the len of xmitted skb is
below tx_copybreak(value to distinguish small size and normal size),
and reduce the overhead of dma map and unmap when IOMMU is on.

Support setting it via ethtool --set-tunable parameter and getting
it via ethtool --get-tunable parameter.

Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@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
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c