aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-08-15 19:00:51 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:07 -0400
commit3ae7c0b2e3747b50c3a6c63ebb67469e0a6b3203 (patch)
tree0f3bacac94b8c189f7dd87f3017babca476d0a69 /include/linux
parent0bcc1816188e570bde1d56a208996660f2633ae0 (diff)
[ETHTOOL]: Add ETHTOOL_[GS]FLAGS sub-ioctls
Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ethtool.h21
-rw-r--r--include/linux/netdevice.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 23ccea811297..0e5de2fb960c 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -256,6 +256,19 @@ struct ethtool_perm_addr {
256 __u8 data[0]; 256 __u8 data[0];
257}; 257};
258 258
259/* boolean flags controlling per-interface behavior characteristics.
260 * When reading, the flag indicates whether or not a certain behavior
261 * is enabled/present. When writing, the flag indicates whether
262 * or not the driver should turn on (set) or off (clear) a behavior.
263 *
264 * Some behaviors may read-only (unconditionally absent or present).
265 * If such is the case, return EINVAL in the set-flags operation if the
266 * flag differs from the read-only value.
267 */
268enum ethtool_flags {
269 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
270};
271
259#ifdef __KERNEL__ 272#ifdef __KERNEL__
260 273
261struct net_device; 274struct net_device;
@@ -272,6 +285,8 @@ u32 ethtool_op_get_tso(struct net_device *dev);
272int ethtool_op_set_tso(struct net_device *dev, u32 data); 285int ethtool_op_set_tso(struct net_device *dev, u32 data);
273u32 ethtool_op_get_ufo(struct net_device *dev); 286u32 ethtool_op_get_ufo(struct net_device *dev);
274int ethtool_op_set_ufo(struct net_device *dev, u32 data); 287int ethtool_op_set_ufo(struct net_device *dev, u32 data);
288u32 ethtool_op_get_flags(struct net_device *dev);
289int ethtool_op_set_flags(struct net_device *dev, u32 data);
275 290
276/** 291/**
277 * &ethtool_ops - Alter and report network device settings 292 * &ethtool_ops - Alter and report network device settings
@@ -307,6 +322,8 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data);
307 * get_strings: Return a set of strings that describe the requested objects 322 * get_strings: Return a set of strings that describe the requested objects
308 * phys_id: Identify the device 323 * phys_id: Identify the device
309 * get_stats: Return statistics about the device 324 * get_stats: Return statistics about the device
325 * get_flags: get 32-bit flags bitmap
326 * set_flags: set 32-bit flags bitmap
310 * 327 *
311 * Description: 328 * Description:
312 * 329 *
@@ -369,6 +386,8 @@ struct ethtool_ops {
369 void (*complete)(struct net_device *); 386 void (*complete)(struct net_device *);
370 u32 (*get_ufo)(struct net_device *); 387 u32 (*get_ufo)(struct net_device *);
371 int (*set_ufo)(struct net_device *, u32); 388 int (*set_ufo)(struct net_device *, u32);
389 u32 (*get_flags)(struct net_device *);
390 int (*set_flags)(struct net_device *, u32);
372}; 391};
373#endif /* __KERNEL__ */ 392#endif /* __KERNEL__ */
374 393
@@ -410,6 +429,8 @@ struct ethtool_ops {
410#define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */ 429#define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */
411#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */ 430#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */
412#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ 431#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
432#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
433#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
413 434
414/* compatibility with older code */ 435/* compatibility with older code */
415#define SPARC_ETH_GSET ETHTOOL_GSET 436#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b93575db8cce..8f00bdf95ef4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -449,6 +449,7 @@ struct net_device
449#define NETIF_F_GSO 2048 /* Enable software GSO. */ 449#define NETIF_F_GSO 2048 /* Enable software GSO. */
450#define NETIF_F_LLTX 4096 /* LockLess TX */ 450#define NETIF_F_LLTX 4096 /* LockLess TX */
451#define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ 451#define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */
452#define NETIF_F_LRO 32768 /* large receive offload */
452 453
453 /* Segmentation offload features */ 454 /* Segmentation offload features */
454#define NETIF_F_GSO_SHIFT 16 455#define NETIF_F_GSO_SHIFT 16