ethtool: Ethtool parameter to dynamically change tx_copybreak
authorEric Dumazet <edumazet@google.com>
Sun, 5 Oct 2014 09:35:21 +0000 (12:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Oct 2014 05:04:16 +0000 (01:04 -0400)
Use new ethtool [sg]et_tunable() to set tx_copybread (inline threshold)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ethtool.h
net/core/ethtool.c

index 7a364f2f3d3faf71a6febe653eed26d24bb79708..99b43056a6feb3db4617143df6d7753bbf124ed2 100644 (file)
@@ -212,6 +212,7 @@ struct ethtool_value {
 enum tunable_id {
        ETHTOOL_ID_UNSPEC,
        ETHTOOL_RX_COPYBREAK,
+       ETHTOOL_TX_COPYBREAK,
 };
 
 enum tunable_type_id {
index 27e61b886520895995e6e946555b0d766bf4a55e..1600aa24d36bcaa653dff0b0c34f4d700eb4fbb9 100644 (file)
@@ -1625,6 +1625,7 @@ static int ethtool_tunable_valid(const struct ethtool_tunable *tuna)
 {
        switch (tuna->id) {
        case ETHTOOL_RX_COPYBREAK:
+       case ETHTOOL_TX_COPYBREAK:
                if (tuna->len != sizeof(u32) ||
                    tuna->type_id != ETHTOOL_TUNABLE_U32)
                        return -EINVAL;