Commit 8778372
net: hns3: fix ethtool tx copybreak buf size indicating not aligned issue
When use ethtoool set tx copybreak buf size to a large value
which causes order exceeding 10 or memory is not enough,
it causes allocating tx copybreak buffer failed and print
"the active tx spare buf is 0, not enabled tx spare buffer",
however, use --get-tunable parameter query tx copybreak buf
size and it indicates setting value not 0.
So, it's necessary to change the print value from setting
value to 0.
Set kinfo.tx_spare_buf_size to 0 when set tx copybreak buf size failed.
Fixes: e445f08 ("net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver")
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>1 parent b50d3b4 commit 8778372
2 files changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
| 1031 | + | |
1031 | 1032 | | |
1032 | 1033 | | |
1033 | | - | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | | - | |
1038 | 1037 | | |
1039 | 1038 | | |
1040 | 1039 | | |
| |||
1044 | 1043 | | |
1045 | 1044 | | |
1046 | 1045 | | |
1047 | | - | |
| 1046 | + | |
1048 | 1047 | | |
1049 | 1048 | | |
1050 | 1049 | | |
1051 | 1050 | | |
1052 | 1051 | | |
1053 | 1052 | | |
1054 | | - | |
1055 | | - | |
| 1053 | + | |
1056 | 1054 | | |
1057 | 1055 | | |
1058 | 1056 | | |
1059 | 1057 | | |
1060 | 1058 | | |
1061 | 1059 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
| 1060 | + | |
1065 | 1061 | | |
1066 | 1062 | | |
1067 | 1063 | | |
1068 | 1064 | | |
1069 | 1065 | | |
1070 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1071 | 1075 | | |
1072 | 1076 | | |
1073 | 1077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1818 | 1818 | | |
1819 | 1819 | | |
1820 | 1820 | | |
1821 | | - | |
| 1821 | + | |
| 1822 | + | |
1822 | 1823 | | |
1823 | 1824 | | |
1824 | 1825 | | |
| |||
0 commit comments