net: Embed hh_cache inside of struct neighbour.
[deliverable/linux.git] / include / linux / netdevice.h
index 336288567c787838ec475bd8a0fa56781d0529ee..5ccc0cb8352b1e95a5f25aa7197ee96eb29ddd6f 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/pm_qos_params.h>
 #include <linux/timer.h>
 #include <linux/delay.h>
-#include <linux/mm.h>
 #include <asm/atomic.h>
 #include <asm/cache.h>
 #include <asm/byteorder.h>
@@ -61,11 +60,6 @@ struct wireless_dev;
 #define SET_ETHTOOL_OPS(netdev,ops) \
        ( (netdev)->ethtool_ops = (ops) )
 
-#define HAVE_ALLOC_NETDEV              /* feature macro: alloc_xxxdev
-                                          functions are available. */
-#define HAVE_FREE_NETDEV               /* free_netdev() */
-#define HAVE_NETDEV_PRIV               /* netdev_priv() */
-
 /* hardware address assignment types */
 #define NET_ADDR_PERM          0       /* address is permanent (default) */
 #define NET_ADDR_RANDOM                1       /* address is generated randomly */
@@ -258,20 +252,8 @@ struct netdev_hw_addr_list {
        netdev_hw_addr_list_for_each(ha, &(dev)->mc)
 
 struct hh_cache {
-       struct hh_cache *hh_next;       /* Next entry                        */
-       atomic_t        hh_refcnt;      /* number of users                   */
-/*
- * We want hh_output, hh_len, hh_lock and hh_data be a in a separate
- * cache line on SMP.
- * They are mostly read, but hh_refcnt may be changed quite frequently,
- * incurring cache line ping pongs.
- */
-       __be16          hh_type ____cacheline_aligned_in_smp;
-                                       /* protocol identifier, f.e ETH_P_IP
-                                         *  NOTE:  For VLANs, this will be the
-                                         *  encapuslated type. --BLG
-                                         */
-       u16             hh_len;         /* length of header */
+       u16             hh_len;
+       u16             __pad;
        int             (*hh_output)(struct sk_buff *skb);
        seqlock_t       hh_lock;
 
@@ -284,12 +266,6 @@ struct hh_cache {
        unsigned long   hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];
 };
 
-static inline void hh_cache_put(struct hh_cache *hh)
-{
-       if (atomic_dec_and_test(&hh->hh_refcnt))
-               kfree(hh);
-}
-
 /* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much.
  * Alternative is:
  *   dev->hard_header_len ? (dev->hard_header_len +
@@ -314,8 +290,7 @@ struct header_ops {
                           const void *saddr, unsigned len);
        int     (*parse)(const struct sk_buff *skb, unsigned char *haddr);
        int     (*rebuild)(struct sk_buff *skb);
-#define HAVE_HEADER_CACHE
-       int     (*cache)(const struct neighbour *neigh, struct hh_cache *hh);
+       int     (*cache)(const struct neighbour *neigh, struct hh_cache *hh, __be16 type);
        void    (*cache_update)(struct hh_cache *hh,
                                const struct net_device *dev,
                                const unsigned char *haddr);
@@ -888,7 +863,6 @@ struct netdev_tc_txq {
  *     Must return >0 or -errno if it changed dev->features itself.
  *
  */
-#define HAVE_NET_DEVICE_OPS
 struct net_device_ops {
        int                     (*ndo_init)(struct net_device *dev);
        void                    (*ndo_uninit)(struct net_device *dev);
@@ -1348,9 +1322,6 @@ struct net_device {
        /* max exchange id for FCoE LRO by ddp */
        unsigned int            fcoe_ddp_xid;
 #endif
-       /* n-tuple filter list attached to this device */
-       struct ethtool_rx_ntuple_list ethtool_ntuple_list;
-
        /* phy device may attach itself for hardware timestamping */
        struct phy_device *phydev;
 
@@ -1785,8 +1756,6 @@ static inline void input_queue_tail_incr_save(struct softnet_data *sd,
 
 DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
 
-#define HAVE_NETIF_QUEUE
-
 extern void __netif_schedule(struct Qdisc *q);
 
 static inline void netif_schedule_queue(struct netdev_queue *txq)
@@ -2062,10 +2031,8 @@ extern void dev_kfree_skb_irq(struct sk_buff *skb);
  */
 extern void dev_kfree_skb_any(struct sk_buff *skb);
 
-#define HAVE_NETIF_RX 1
 extern int             netif_rx(struct sk_buff *skb);
 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 gro_result_t    dev_gro_receive(struct napi_struct *napi,
                                        struct sk_buff *skb);
@@ -2245,7 +2212,6 @@ extern void netif_device_attach(struct net_device *dev);
 /*
  * Network interface message level settings
  */
-#define HAVE_NETIF_MSG 1
 
 enum {
        NETIF_MSG_DRV           = 0x0001,
@@ -2554,7 +2520,7 @@ extern void netdev_class_remove_file(struct class_attribute *class_attr);
 
 extern struct kobj_ns_type_operations net_ns_type_operations;
 
-extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len);
+extern const char *netdev_drivername(const struct net_device *dev);
 
 extern void linkwatch_run_queue(void);
 
This page took 0.034824 seconds and 5 git commands to generate.