ethtool: Add extended flow control query facility
Subsystems (3)
RFC PATCH 1/2 ethtool: Add extended flow control query facility
This patch creates a new ethtool_pauseparamext structure that elaborates on the older struct ethtool_pauseparam structure. The new structure adds two new fields that represent the current flow control status.
Signed-off-by Matt Carlson <[email protected]>
--- include/linux/ethtool.h | 14 ++++++++++- net/core/ethtool.c | 59 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 6 deletions(-)
include/linux/ethtool.h +13 -1
@@ -284,6 +284,15 @@ struct ethtool_pauseparam {__u32 tx_pause; }; +/* for configuring link flow control parameters */ +struct ethtool_pauseparamext { +struct ethtool_pauseparam cfg; + +__u32 rx_pause_status; +__u32 tx_pause_status; +__u32 reserved[2 ]; +}; +#define ETH_GSTRING_LEN 32enum ethtool_stringset {ETH_SS_TEST =0 ,
@@ -956,7 +965,8 @@ struct ethtool_ops {int (*get_dump_data)(struct net_device *,struct ethtool_dump *,void *);int (*set_dump)(struct net_device *,struct ethtool_dump *); - +void (*get_pauseparamext)(struct net_device *, + struct ethtool_pauseparamext*); };#endif /* __KERNEL__ */
@@ -1030,6 +1040,8 @@ struct ethtool_ops {#define ETHTOOL_SET_DUMP 0x0000003e/* Set dump settings */ #define ETHTOOL_GET_DUMP_FLAG 0x0000003f/* Get dump settings */ #define ETHTOOL_GET_DUMP_DATA 0x00000040/* Get dump data */ +#define ETHTOOL_GPAUSEPARAMEXT 0x00000041/* Get pause parameters v2 */ +#define ETHTOOL_SPAUSEPARAMEXT 0x00000042/* Set pause parameters v2 */ /* compatibility with older code */ #define SPARC_ETH_GSET ETHTOOL_GSET
net/core/ethtool.c +54 -5
87 lines not on this page · raw message
Signature · 1 line
1.7.3.4