Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f49dec9 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher
Browse files

net: allow ndo_select_queue to pass netdev



This patch makes it so that instead of passing a void pointer as the
accel_priv we instead pass a net_device pointer as sb_dev. Making this
change allows us to pass the subordinate device through to the fallback
function eventually so that we can keep the actual code in the
ndo_select_queue call as focused on possible on the exception cases.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent a4ea8a3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ static netdev_tx_t hfi1_netdev_start_xmit(struct sk_buff *skb,

static u16 hfi1_vnic_select_queue(struct net_device *netdev,
				  struct sk_buff *skb,
				  void *accel_priv,
				  struct net_device *sb_dev,
				  select_queue_fallback_t fallback)
{
	struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
+2 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ static netdev_tx_t opa_netdev_start_xmit(struct sk_buff *skb,
}

static u16 opa_vnic_select_queue(struct net_device *netdev, struct sk_buff *skb,
				 void *accel_priv,
				 struct net_device *sb_dev,
				 select_queue_fallback_t fallback)
{
	struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev);
@@ -107,7 +107,7 @@ static u16 opa_vnic_select_queue(struct net_device *netdev, struct sk_buff *skb,
	mdata->entropy = opa_vnic_calc_entropy(skb);
	mdata->vl = opa_vnic_get_vl(adapter, skb);
	rc = adapter->rn_ops->ndo_select_queue(netdev, skb,
					       accel_priv, fallback);
					       sb_dev, fallback);
	skb_pull(skb, sizeof(*mdata));
	return rc;
}
+2 −1
Original line number Diff line number Diff line
@@ -4094,7 +4094,8 @@ static inline int bond_slave_override(struct bonding *bond,


static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb,
			     void *accel_priv, select_queue_fallback_t fallback)
			     struct net_device *sb_dev,
			     select_queue_fallback_t fallback)
{
	/* This helper function exists to help dev_pick_tx get the correct
	 * destination queue.  Using a helper function skips a call to
+2 −1
Original line number Diff line number Diff line
@@ -2213,7 +2213,8 @@ static void ena_netpoll(struct net_device *netdev)
#endif /* CONFIG_NET_POLL_CONTROLLER */

static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,
			    void *accel_priv, select_queue_fallback_t fallback)
			    struct net_device *sb_dev,
			    select_queue_fallback_t fallback)
{
	u16 qid;
	/* we suspect that this is good for in--kernel network services that
+1 −1
Original line number Diff line number Diff line
@@ -2107,7 +2107,7 @@ static const struct ethtool_ops bcm_sysport_ethtool_ops = {
};

static u16 bcm_sysport_select_queue(struct net_device *dev, struct sk_buff *skb,
				    void *accel_priv,
				    struct net_device *sb_dev,
				    select_queue_fallback_t fallback)
{
	struct bcm_sysport_priv *priv = netdev_priv(dev);
Loading