aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-28 11:26:12 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-28 11:26:12 -0400
commit7a9787e1eba95a166265e6a260cf30af04ef0a99 (patch)
treee730a4565e0318140d2fbd2f0415d18a339d7336 /include/linux/ethtool.h
parent41b9eb264c8407655db57b60b4457fe1b2ec9977 (diff)
parent0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff)
Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h50
1 files changed, 49 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c8d216357865..b4b038b89ee6 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -27,9 +27,24 @@ struct ethtool_cmd {
27 __u8 autoneg; /* Enable or disable autonegotiation */ 27 __u8 autoneg; /* Enable or disable autonegotiation */
28 __u32 maxtxpkt; /* Tx pkts before generating tx int */ 28 __u32 maxtxpkt; /* Tx pkts before generating tx int */
29 __u32 maxrxpkt; /* Rx pkts before generating rx int */ 29 __u32 maxrxpkt; /* Rx pkts before generating rx int */
30 __u32 reserved[4]; 30 __u16 speed_hi;
31 __u16 reserved2;
32 __u32 reserved[3];
31}; 33};
32 34
35static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
36 __u32 speed)
37{
38
39 ep->speed = (__u16)speed;
40 ep->speed_hi = (__u16)(speed >> 16);
41}
42
43static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
44{
45 return (ep->speed_hi << 16) | ep->speed;
46}
47
33#define ETHTOOL_BUSINFO_LEN 32 48#define ETHTOOL_BUSINFO_LEN 32
34/* these strings are set to whatever the driver author decides... */ 49/* these strings are set to whatever the driver author decides... */
35struct ethtool_drvinfo { 50struct ethtool_drvinfo {
@@ -272,6 +287,12 @@ enum ethtool_flags {
272 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ 287 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
273}; 288};
274 289
290struct ethtool_rxnfc {
291 __u32 cmd;
292 __u32 flow_type;
293 __u64 data;
294};
295
275#ifdef __KERNEL__ 296#ifdef __KERNEL__
276 297
277struct net_device; 298struct net_device;
@@ -396,6 +417,8 @@ struct ethtool_ops {
396 /* the following hooks are obsolete */ 417 /* the following hooks are obsolete */
397 int (*self_test_count)(struct net_device *);/* use get_sset_count */ 418 int (*self_test_count)(struct net_device *);/* use get_sset_count */
398 int (*get_stats_count)(struct net_device *);/* use get_sset_count */ 419 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
420 int (*get_rxhash)(struct net_device *, struct ethtool_rxnfc *);
421 int (*set_rxhash)(struct net_device *, struct ethtool_rxnfc *);
399}; 422};
400#endif /* __KERNEL__ */ 423#endif /* __KERNEL__ */
401 424
@@ -442,6 +465,9 @@ struct ethtool_ops {
442#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ 465#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
443#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ 466#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
444 467
468#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
469#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
470
445/* compatibility with older code */ 471/* compatibility with older code */
446#define SPARC_ETH_GSET ETHTOOL_GSET 472#define SPARC_ETH_GSET ETHTOOL_GSET
447#define SPARC_ETH_SSET ETHTOOL_SSET 473#define SPARC_ETH_SSET ETHTOOL_SSET
@@ -528,4 +554,26 @@ struct ethtool_ops {
528#define WAKE_MAGIC (1 << 5) 554#define WAKE_MAGIC (1 << 5)
529#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ 555#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
530 556
557/* L3-L4 network traffic flow types */
558#define TCP_V4_FLOW 0x01
559#define UDP_V4_FLOW 0x02
560#define SCTP_V4_FLOW 0x03
561#define AH_ESP_V4_FLOW 0x04
562#define TCP_V6_FLOW 0x05
563#define UDP_V6_FLOW 0x06
564#define SCTP_V6_FLOW 0x07
565#define AH_ESP_V6_FLOW 0x08
566
567/* L3-L4 network traffic flow hash options */
568#define RXH_DEV_PORT (1 << 0)
569#define RXH_L2DA (1 << 1)
570#define RXH_VLAN (1 << 2)
571#define RXH_L3_PROTO (1 << 3)
572#define RXH_IP_SRC (1 << 4)
573#define RXH_IP_DST (1 << 5)
574#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
575#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
576#define RXH_DISCARD (1 << 31)
577
578
531#endif /* _LINUX_ETHTOOL_H */ 579#endif /* _LINUX_ETHTOOL_H */