em_meta: avoid one dev_put()
[deliverable/linux.git] / include / linux / netdevice.h
index 94958c109761287798f187e1c2bb96abf0b5693e..bcf1083857fcf695896fcd2abac73a3756930cfd 100644 (file)
@@ -348,13 +348,14 @@ enum
        NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
 };
 
-enum {
+enum gro_result {
        GRO_MERGED,
        GRO_MERGED_FREE,
        GRO_HELD,
        GRO_NORMAL,
        GRO_DROP,
 };
+typedef enum gro_result gro_result_t;
 
 extern void __napi_schedule(struct napi_struct *n);
 
@@ -557,7 +558,7 @@ struct netdev_queue {
  *     Callback uses when the transmitter has not made any progress
  *     for dev->watchdog ticks.
  *
- * struct net_device_stats* (*get_stats)(struct net_device *dev);
+ * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
  *     Called when a user wants to get the network device usage
  *     statistics. If not defined, the counters in dev->stats will
  *     be used.
@@ -635,6 +636,10 @@ struct net_device_ops {
                                                      unsigned int sgc);
        int                     (*ndo_fcoe_ddp_done)(struct net_device *dev,
                                                     u16 xid);
+#define NETDEV_FCOE_WWNN 0
+#define NETDEV_FCOE_WWPN 1
+       int                     (*ndo_fcoe_get_wwn)(struct net_device *dev,
+                                                   u64 *wwn, int type);
 #endif
 };
 
@@ -683,6 +688,7 @@ struct net_device
 
        struct list_head        dev_list;
        struct list_head        napi_list;
+       struct list_head        unreg_list;
 
        /* Net device features */
        unsigned long           features;
@@ -894,8 +900,8 @@ struct net_device
 
        /* class/net/name entry */
        struct device           dev;
-       /* space for optional statistics and wireless sysfs groups */
-       const struct attribute_group *sysfs_groups[3];
+       /* space for optional device, statistics, and wireless sysfs groups */
+       const struct attribute_group *sysfs_groups[4];
 
        /* rtnetlink link ops */
        const struct rtnl_link_ops *rtnl_link_ops;
@@ -909,7 +915,7 @@ struct net_device
 
 #ifdef CONFIG_DCB
        /* Data Center Bridging netlink ops */
-       struct dcbnl_rtnl_ops *dcbnl_ops;
+       const struct dcbnl_rtnl_ops *dcbnl_ops;
 #endif
 
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
@@ -1109,6 +1115,7 @@ extern void               __dev_remove_pack(struct packet_type *pt);
 extern struct net_device       *dev_get_by_flags(struct net *net, unsigned short flags,
                                                  unsigned short mask);
 extern struct net_device       *dev_get_by_name(struct net *net, const char *name);
+extern struct net_device       *dev_get_by_name_rcu(struct net *net, const char *name);
 extern struct net_device       *__dev_get_by_name(struct net *net, const char *name);
 extern int             dev_alloc_name(struct net_device *dev, const char *name);
 extern int             dev_open(struct net_device *dev);
@@ -1116,7 +1123,14 @@ extern int               dev_close(struct net_device *dev);
 extern void            dev_disable_lro(struct net_device *dev);
 extern int             dev_queue_xmit(struct sk_buff *skb);
 extern int             register_netdevice(struct net_device *dev);
-extern void            unregister_netdevice(struct net_device *dev);
+extern void            unregister_netdevice_queue(struct net_device *dev,
+                                                  struct list_head *head);
+extern void            unregister_netdevice_many(struct list_head *head);
+static inline void unregister_netdevice(struct net_device *dev)
+{
+       unregister_netdevice_queue(dev, NULL);
+}
+
 extern void            free_netdev(struct net_device *dev);
 extern void            synchronize_net(void);
 extern int             register_netdevice_notifier(struct notifier_block *nb);
@@ -1127,6 +1141,7 @@ extern void               netdev_resync_ops(struct net_device *dev);
 extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
 extern struct net_device       *dev_get_by_index(struct net *net, int ifindex);
 extern struct net_device       *__dev_get_by_index(struct net *net, int ifindex);
+extern struct net_device       *dev_get_by_index_rcu(struct net *net, int ifindex);
 extern int             dev_restart(struct net_device *dev);
 #ifdef CONFIG_NETPOLL_TRAP
 extern int             netpoll_trap(void);
@@ -1467,18 +1482,19 @@ extern int              netif_rx_ni(struct sk_buff *skb);
 #define HAVE_NETIF_RECEIVE_SKB 1
 extern int             netif_receive_skb(struct sk_buff *skb);
 extern void            napi_gro_flush(struct napi_struct *napi);
-extern int             dev_gro_receive(struct napi_struct *napi,
+extern gro_result_t    dev_gro_receive(struct napi_struct *napi,
                                        struct sk_buff *skb);
-extern int             napi_skb_finish(int ret, struct sk_buff *skb);
-extern int             napi_gro_receive(struct napi_struct *napi,
+extern gro_result_t    napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
+extern gro_result_t    napi_gro_receive(struct napi_struct *napi,
                                         struct sk_buff *skb);
 extern void            napi_reuse_skb(struct napi_struct *napi,
                                       struct sk_buff *skb);
 extern struct sk_buff *        napi_get_frags(struct napi_struct *napi);
-extern int             napi_frags_finish(struct napi_struct *napi,
-                                         struct sk_buff *skb, int ret);
+extern gro_result_t    napi_frags_finish(struct napi_struct *napi,
+                                         struct sk_buff *skb,
+                                         gro_result_t ret);
 extern struct sk_buff *        napi_frags_skb(struct napi_struct *napi);
-extern int             napi_gro_frags(struct napi_struct *napi);
+extern gro_result_t    napi_gro_frags(struct napi_struct *napi);
 
 static inline void napi_free_frags(struct napi_struct *napi)
 {
This page took 0.025928 seconds and 5 git commands to generate.