Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ethtool: add support to set/get tx copybreak buf size via ethtool

Add support for ethtool to set/get tx copybreak buf size.

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>

authored by

Hao Chen and committed by
David S. Miller
448f413a 89f97118

+3
+1
include/uapi/linux/ethtool.h
··· 231 231 ETHTOOL_RX_COPYBREAK, 232 232 ETHTOOL_TX_COPYBREAK, 233 233 ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */ 234 + ETHTOOL_TX_COPYBREAK_BUF_SIZE, 234 235 /* 235 236 * Add your fresh new tunable attribute above and remember to update 236 237 * tunable_strings[] in net/ethtool/common.c
+1
net/ethtool/common.c
··· 89 89 [ETHTOOL_RX_COPYBREAK] = "rx-copybreak", 90 90 [ETHTOOL_TX_COPYBREAK] = "tx-copybreak", 91 91 [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout", 92 + [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size", 92 93 }; 93 94 94 95 const char
+1
net/ethtool/ioctl.c
··· 2396 2396 switch (tuna->id) { 2397 2397 case ETHTOOL_RX_COPYBREAK: 2398 2398 case ETHTOOL_TX_COPYBREAK: 2399 + case ETHTOOL_TX_COPYBREAK_BUF_SIZE: 2399 2400 if (tuna->len != sizeof(u32) || 2400 2401 tuna->type_id != ETHTOOL_TUNABLE_U32) 2401 2402 return -EINVAL;