]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'parisc-hd/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:33:36 +0000 (10:33 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:33:36 +0000 (10:33 +1100)
1  2 
include/linux/netdevice.h

index 4ac653b7b8ace2a9a2f2ee0feae07aab1bbcf459,2212c8225deb34819b80a914558421321d1ab5e0..a9e3bf42d287317b17d5a6666658ba34b22381f8
@@@ -718,8 -718,8 +718,8 @@@ struct xps_map 
        u16 queues[0];
  };
  #define XPS_MAP_SIZE(_num) (sizeof(struct xps_map) + ((_num) * sizeof(u16)))
- #define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map))  \
-     / sizeof(u16))
+ #define XPS_MIN_MAP_ALLOC ((L1_CACHE_ALIGN(offsetof(struct xps_map, queues[1])) \
+        - sizeof(struct xps_map)) / sizeof(u16))
  
  /*
   * This structure holds all XPS maps for device.  Maps are indexed by CPU.
@@@ -881,7 -881,6 +881,7 @@@ typedef u16 (*select_queue_fallback_t)(
   * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
   *                      int max_tx_rate);
   * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
 + * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting);
   * int (*ndo_get_vf_config)(struct net_device *dev,
   *                        int vf, struct ifla_vf_info *ivf);
   * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
   *    This function is used to pass protocol port error state information
   *    to the switch driver. The switch driver can react to the proto_down
   *      by doing a phys down on the associated switch port.
 + * int (*ndo_fill_metadata_dst)(struct net_device *dev, struct sk_buff *skb);
 + *    This function is used to get egress tunnel information for given skb.
 + *    This is useful for retrieving outer tunnel header parameters while
 + *    sampling packet.
   *
   */
  struct net_device_ops {
                                                   int max_tx_rate);
        int                     (*ndo_set_vf_spoofchk)(struct net_device *dev,
                                                       int vf, bool setting);
 +      int                     (*ndo_set_vf_trust)(struct net_device *dev,
 +                                                  int vf, bool setting);
        int                     (*ndo_get_vf_config)(struct net_device *dev,
                                                     int vf,
                                                     struct ifla_vf_info *ivf);
        int                     (*ndo_get_iflink)(const struct net_device *dev);
        int                     (*ndo_change_proto_down)(struct net_device *dev,
                                                         bool proto_down);
 +      int                     (*ndo_fill_metadata_dst)(struct net_device *dev,
 +                                                     struct sk_buff *skb);
  };
  
  /**
   * @IFF_LIVE_ADDR_CHANGE: device supports hardware address
   *    change when it's running
   * @IFF_MACVLAN: Macvlan device
 - * @IFF_VRF_MASTER: device is a VRF master
 + * @IFF_L3MDEV_MASTER: device is an L3 master device
   * @IFF_NO_QUEUE: device can run without qdisc attached
   * @IFF_OPENVSWITCH: device is a Open vSwitch master
 + * @IFF_L3MDEV_SLAVE: device is enslaved to an L3 master device
   */
  enum netdev_priv_flags {
        IFF_802_1Q_VLAN                 = 1<<0,
        IFF_XMIT_DST_RELEASE_PERM       = 1<<17,
        IFF_IPVLAN_MASTER               = 1<<18,
        IFF_IPVLAN_SLAVE                = 1<<19,
 -      IFF_VRF_MASTER                  = 1<<20,
 +      IFF_L3MDEV_MASTER               = 1<<20,
        IFF_NO_QUEUE                    = 1<<21,
        IFF_OPENVSWITCH                 = 1<<22,
 +      IFF_L3MDEV_SLAVE                = 1<<23,
  };
  
  #define IFF_802_1Q_VLAN                       IFF_802_1Q_VLAN
  #define IFF_XMIT_DST_RELEASE_PERM     IFF_XMIT_DST_RELEASE_PERM
  #define IFF_IPVLAN_MASTER             IFF_IPVLAN_MASTER
  #define IFF_IPVLAN_SLAVE              IFF_IPVLAN_SLAVE
 -#define IFF_VRF_MASTER                        IFF_VRF_MASTER
 +#define IFF_L3MDEV_MASTER             IFF_L3MDEV_MASTER
  #define IFF_NO_QUEUE                  IFF_NO_QUEUE
  #define IFF_OPENVSWITCH                       IFF_OPENVSWITCH
  
   *    @dn_ptr:        DECnet specific data
   *    @ip6_ptr:       IPv6 specific data
   *    @ax25_ptr:      AX.25 specific data
 - *    @vrf_ptr:       VRF specific data
   *    @ieee80211_ptr: IEEE 802.11 specific data, assign before registering
   *
   *    @last_rx:       Time of last Rx
@@@ -1597,9 -1587,6 +1597,9 @@@ struct net_device 
  #ifdef CONFIG_NET_SWITCHDEV
        const struct switchdev_ops *switchdev_ops;
  #endif
 +#ifdef CONFIG_NET_L3_MASTER_DEV
 +      const struct l3mdev_ops *l3mdev_ops;
 +#endif
  
        const struct header_ops *header_ops;
  
        struct dn_dev __rcu     *dn_ptr;
        struct inet6_dev __rcu  *ip6_ptr;
        void                    *ax25_ptr;
 -      struct net_vrf_dev __rcu *vrf_ptr;
        struct wireless_dev     *ieee80211_ptr;
        struct wpan_dev         *ieee802154_ptr;
  #if IS_ENABLED(CONFIG_MPLS_ROUTING)
@@@ -2115,7 -2103,6 +2115,7 @@@ struct pcpu_sw_netstats 
  #define NETDEV_PRECHANGEMTU   0x0017 /* notify before mtu change happened */
  #define NETDEV_CHANGEINFODATA 0x0018
  #define NETDEV_BONDING_INFO   0x0019
 +#define NETDEV_PRECHANGEUPPER 0x001A
  
  int register_netdevice_notifier(struct notifier_block *nb);
  int unregister_netdevice_notifier(struct notifier_block *nb);
@@@ -2216,7 -2203,6 +2216,7 @@@ void dev_add_offload(struct packet_offl
  void dev_remove_offload(struct packet_offload *po);
  
  int dev_get_iflink(const struct net_device *dev);
 +int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
  struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
                                      unsigned short mask);
  struct net_device *dev_get_by_name(struct net *net, const char *name);
@@@ -2227,8 -2213,12 +2227,8 @@@ int dev_open(struct net_device *dev)
  int dev_close(struct net_device *dev);
  int dev_close_many(struct list_head *head, bool unlink);
  void dev_disable_lro(struct net_device *dev);
 -int dev_loopback_xmit(struct sock *sk, struct sk_buff *newskb);
 -int dev_queue_xmit_sk(struct sock *sk, struct sk_buff *skb);
 -static inline int dev_queue_xmit(struct sk_buff *skb)
 -{
 -      return dev_queue_xmit_sk(skb->sk, skb);
 -}
 +int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *newskb);
 +int dev_queue_xmit(struct sk_buff *skb);
  int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv);
  int register_netdevice(struct net_device *dev);
  void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
@@@ -3000,7 -2990,11 +3000,7 @@@ static inline void dev_consume_skb_any(
  
  int netif_rx(struct sk_buff *skb);
  int netif_rx_ni(struct sk_buff *skb);
 -int netif_receive_skb_sk(struct sock *sk, struct sk_buff *skb);
 -static inline int netif_receive_skb(struct sk_buff *skb)
 -{
 -      return netif_receive_skb_sk(skb->sk, skb);
 -}
 +int netif_receive_skb(struct sk_buff *skb);
  gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
  void napi_gro_flush(struct napi_struct *napi, bool flush_old);
  struct sk_buff *napi_get_frags(struct napi_struct *napi);
@@@ -3838,14 -3832,9 +3838,14 @@@ static inline bool netif_supports_nofcs
        return dev->priv_flags & IFF_SUPP_NOFCS;
  }
  
 -static inline bool netif_is_vrf(const struct net_device *dev)
 +static inline bool netif_is_l3_master(const struct net_device *dev)
  {
 -      return dev->priv_flags & IFF_VRF_MASTER;
 +      return dev->priv_flags & IFF_L3MDEV_MASTER;
 +}
 +
 +static inline bool netif_is_l3_slave(const struct net_device *dev)
 +{
 +      return dev->priv_flags & IFF_L3MDEV_SLAVE;
  }
  
  static inline bool netif_is_bridge_master(const struct net_device *dev)
@@@ -3858,6 -3847,27 +3858,6 @@@ static inline bool netif_is_ovs_master(
        return dev->priv_flags & IFF_OPENVSWITCH;
  }
  
 -static inline bool netif_index_is_vrf(struct net *net, int ifindex)
 -{
 -      bool rc = false;
 -
 -#if IS_ENABLED(CONFIG_NET_VRF)
 -      struct net_device *dev;
 -
 -      if (ifindex == 0)
 -              return false;
 -
 -      rcu_read_lock();
 -
 -      dev = dev_get_by_index_rcu(net, ifindex);
 -      if (dev)
 -              rc = netif_is_vrf(dev);
 -
 -      rcu_read_unlock();
 -#endif
 -      return rc;
 -}
 -
  /* This device needs to keep skb dst for qdisc enqueue or ndo_start_xmit() */
  static inline void netif_keep_dst(struct net_device *dev)
  {