diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a848ffc327f4..02e0f6b156c3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -369,7 +369,7 @@ typedef enum gro_result gro_result_t; | |||
369 | * | 369 | * |
370 | * If the rx_handler consider the skb should be ignored, it should return | 370 | * If the rx_handler consider the skb should be ignored, it should return |
371 | * RX_HANDLER_EXACT. The skb will only be delivered to protocol handlers that | 371 | * RX_HANDLER_EXACT. The skb will only be delivered to protocol handlers that |
372 | * are registred on exact device (ptype->dev == skb->dev). | 372 | * are registered on exact device (ptype->dev == skb->dev). |
373 | * | 373 | * |
374 | * If the rx_handler didn't changed skb->dev, but want the skb to be normally | 374 | * If the rx_handler didn't changed skb->dev, but want the skb to be normally |
375 | * delivered, it should return RX_HANDLER_PASS. | 375 | * delivered, it should return RX_HANDLER_PASS. |
@@ -887,6 +887,10 @@ struct netdev_fcoe_hbainfo { | |||
887 | * struct net_device *dev, int idx) | 887 | * struct net_device *dev, int idx) |
888 | * Used to add FDB entries to dump requests. Implementers should add | 888 | * Used to add FDB entries to dump requests. Implementers should add |
889 | * entries to skb and update idx with the number of entries. | 889 | * entries to skb and update idx with the number of entries. |
890 | * | ||
891 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) | ||
892 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, | ||
893 | * struct net_device *dev) | ||
890 | */ | 894 | */ |
891 | struct net_device_ops { | 895 | struct net_device_ops { |
892 | int (*ndo_init)(struct net_device *dev); | 896 | int (*ndo_init)(struct net_device *dev); |
@@ -998,6 +1002,12 @@ struct net_device_ops { | |||
998 | struct netlink_callback *cb, | 1002 | struct netlink_callback *cb, |
999 | struct net_device *dev, | 1003 | struct net_device *dev, |
1000 | int idx); | 1004 | int idx); |
1005 | |||
1006 | int (*ndo_bridge_setlink)(struct net_device *dev, | ||
1007 | struct nlmsghdr *nlh); | ||
1008 | int (*ndo_bridge_getlink)(struct sk_buff *skb, | ||
1009 | u32 pid, u32 seq, | ||
1010 | struct net_device *dev); | ||
1001 | }; | 1011 | }; |
1002 | 1012 | ||
1003 | /* | 1013 | /* |
@@ -1053,6 +1063,12 @@ struct net_device { | |||
1053 | netdev_features_t wanted_features; | 1063 | netdev_features_t wanted_features; |
1054 | /* mask of features inheritable by VLAN devices */ | 1064 | /* mask of features inheritable by VLAN devices */ |
1055 | netdev_features_t vlan_features; | 1065 | netdev_features_t vlan_features; |
1066 | /* mask of features inherited by encapsulating devices | ||
1067 | * This field indicates what encapsulation offloads | ||
1068 | * the hardware is capable of doing, and drivers will | ||
1069 | * need to set them appropriately. | ||
1070 | */ | ||
1071 | netdev_features_t hw_enc_features; | ||
1056 | 1072 | ||
1057 | /* Interface index. Unique device identifier */ | 1073 | /* Interface index. Unique device identifier */ |
1058 | int ifindex; | 1074 | int ifindex; |
@@ -1502,16 +1518,25 @@ struct packet_type { | |||
1502 | struct net_device *, | 1518 | struct net_device *, |
1503 | struct packet_type *, | 1519 | struct packet_type *, |
1504 | struct net_device *); | 1520 | struct net_device *); |
1521 | bool (*id_match)(struct packet_type *ptype, | ||
1522 | struct sock *sk); | ||
1523 | void *af_packet_priv; | ||
1524 | struct list_head list; | ||
1525 | }; | ||
1526 | |||
1527 | struct offload_callbacks { | ||
1505 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 1528 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
1506 | netdev_features_t features); | 1529 | netdev_features_t features); |
1507 | int (*gso_send_check)(struct sk_buff *skb); | 1530 | int (*gso_send_check)(struct sk_buff *skb); |
1508 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 1531 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
1509 | struct sk_buff *skb); | 1532 | struct sk_buff *skb); |
1510 | int (*gro_complete)(struct sk_buff *skb); | 1533 | int (*gro_complete)(struct sk_buff *skb); |
1511 | bool (*id_match)(struct packet_type *ptype, | 1534 | }; |
1512 | struct sock *sk); | 1535 | |
1513 | void *af_packet_priv; | 1536 | struct packet_offload { |
1514 | struct list_head list; | 1537 | __be16 type; /* This is really htons(ether_type). */ |
1538 | struct offload_callbacks callbacks; | ||
1539 | struct list_head list; | ||
1515 | }; | 1540 | }; |
1516 | 1541 | ||
1517 | #include <linux/notifier.h> | 1542 | #include <linux/notifier.h> |
@@ -1551,6 +1576,8 @@ extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | |||
1551 | 1576 | ||
1552 | extern rwlock_t dev_base_lock; /* Device list lock */ | 1577 | extern rwlock_t dev_base_lock; /* Device list lock */ |
1553 | 1578 | ||
1579 | extern seqlock_t devnet_rename_seq; /* Device rename lock */ | ||
1580 | |||
1554 | 1581 | ||
1555 | #define for_each_netdev(net, d) \ | 1582 | #define for_each_netdev(net, d) \ |
1556 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) | 1583 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) |
@@ -1608,6 +1635,9 @@ extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short | |||
1608 | extern void dev_add_pack(struct packet_type *pt); | 1635 | extern void dev_add_pack(struct packet_type *pt); |
1609 | extern void dev_remove_pack(struct packet_type *pt); | 1636 | extern void dev_remove_pack(struct packet_type *pt); |
1610 | extern void __dev_remove_pack(struct packet_type *pt); | 1637 | extern void __dev_remove_pack(struct packet_type *pt); |
1638 | extern void dev_add_offload(struct packet_offload *po); | ||
1639 | extern void dev_remove_offload(struct packet_offload *po); | ||
1640 | extern void __dev_remove_offload(struct packet_offload *po); | ||
1611 | 1641 | ||
1612 | extern struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short flags, | 1642 | extern struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short flags, |
1613 | unsigned short mask); | 1643 | unsigned short mask); |
@@ -2132,16 +2162,10 @@ extern void dev_kfree_skb_any(struct sk_buff *skb); | |||
2132 | extern int netif_rx(struct sk_buff *skb); | 2162 | extern int netif_rx(struct sk_buff *skb); |
2133 | extern int netif_rx_ni(struct sk_buff *skb); | 2163 | extern int netif_rx_ni(struct sk_buff *skb); |
2134 | extern int netif_receive_skb(struct sk_buff *skb); | 2164 | extern int netif_receive_skb(struct sk_buff *skb); |
2135 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, | ||
2136 | struct sk_buff *skb); | ||
2137 | extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); | ||
2138 | extern gro_result_t napi_gro_receive(struct napi_struct *napi, | 2165 | extern gro_result_t napi_gro_receive(struct napi_struct *napi, |
2139 | struct sk_buff *skb); | 2166 | struct sk_buff *skb); |
2140 | extern void napi_gro_flush(struct napi_struct *napi, bool flush_old); | 2167 | extern void napi_gro_flush(struct napi_struct *napi, bool flush_old); |
2141 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); | 2168 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); |
2142 | extern gro_result_t napi_frags_finish(struct napi_struct *napi, | ||
2143 | struct sk_buff *skb, | ||
2144 | gro_result_t ret); | ||
2145 | extern gro_result_t napi_gro_frags(struct napi_struct *napi); | 2169 | extern gro_result_t napi_gro_frags(struct napi_struct *napi); |
2146 | 2170 | ||
2147 | static inline void napi_free_frags(struct napi_struct *napi) | 2171 | static inline void napi_free_frags(struct napi_struct *napi) |