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

Commit cf19e5e2 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2018-02-12

This series contains updates to i40e and i40evf.

Alan fixes a spelling mistake in code comments.  Fixes an issue on older
firmware versions or NPAR enabled PFs which do not support the
I40E_FLAG_DISABLE_FW_LLDP flag and would get into a situation where any
attempt to change any priv flag would be forbidden.

Alex got busy with the ITR code and made several cleanups and fixes so
that we can more easily understand what is going on.  The fixes included
a computational fix when determining the register offset, as well as a
fix for unnecessarily toggling the CLEARPBA bit which could lead to
potential lost events if auto-masking is not enabled.

Filip adds a necessary delay to recover after a EMP reset when using
firmware version 4.33.

Paweł adds a warning message for MFP devices when the link-down-on-close
flag is set because it may affect other partitions.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9b2c45d4 a0073a4b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -824,6 +824,7 @@ struct i40e_q_vector {
	struct i40e_ring_container rx;
	struct i40e_ring_container rx;
	struct i40e_ring_container tx;
	struct i40e_ring_container tx;


	u8 itr_countdown;	/* when 0 should adjust adaptive ITR */
	u8 num_ringpairs;	/* total number of ring pairs in vector */
	u8 num_ringpairs;	/* total number of ring pairs in vector */


	cpumask_t affinity_mask;
	cpumask_t affinity_mask;
@@ -832,8 +833,6 @@ struct i40e_q_vector {
	struct rcu_head rcu;	/* to avoid race with update stats on free */
	struct rcu_head rcu;	/* to avoid race with update stats on free */
	char name[I40E_INT_NAME_STR_LEN];
	char name[I40E_INT_NAME_STR_LEN];
	bool arm_wb_state;
	bool arm_wb_state;
#define ITR_COUNTDOWN_START 100
	u8 itr_countdown;	/* when 0 should adjust ITR */
} ____cacheline_internodealigned_in_smp;
} ____cacheline_internodealigned_in_smp;


/* lan device */
/* lan device */
+6 −6
Original line number Original line Diff line number Diff line
@@ -315,9 +315,9 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
			 i, rx_ring->vsi,
			 i, rx_ring->vsi,
			 rx_ring->q_vector);
			 rx_ring->q_vector);
		dev_info(&pf->pdev->dev,
		dev_info(&pf->pdev->dev,
			 "    rx_rings[%i]: rx_itr_setting = %d (%s)\n",
			 "    rx_rings[%i]: itr_setting = %d (%s)\n",
			 i, rx_ring->rx_itr_setting,
			 i, rx_ring->itr_setting,
			 ITR_IS_DYNAMIC(rx_ring->rx_itr_setting) ? "dynamic" : "fixed");
			 ITR_IS_DYNAMIC(rx_ring->itr_setting) ? "dynamic" : "fixed");
	}
	}
	for (i = 0; i < vsi->num_queue_pairs; i++) {
	for (i = 0; i < vsi->num_queue_pairs; i++) {
		struct i40e_ring *tx_ring = READ_ONCE(vsi->tx_rings[i]);
		struct i40e_ring *tx_ring = READ_ONCE(vsi->tx_rings[i]);
@@ -366,9 +366,9 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
			 "    tx_rings[%i]: DCB tc = %d\n",
			 "    tx_rings[%i]: DCB tc = %d\n",
			 i, tx_ring->dcb_tc);
			 i, tx_ring->dcb_tc);
		dev_info(&pf->pdev->dev,
		dev_info(&pf->pdev->dev,
			 "    tx_rings[%i]: tx_itr_setting = %d (%s)\n",
			 "    tx_rings[%i]: itr_setting = %d (%s)\n",
			 i, tx_ring->tx_itr_setting,
			 i, tx_ring->itr_setting,
			 ITR_IS_DYNAMIC(tx_ring->tx_itr_setting) ? "dynamic" : "fixed");
			 ITR_IS_DYNAMIC(tx_ring->itr_setting) ? "dynamic" : "fixed");
	}
	}
	rcu_read_unlock();
	rcu_read_unlock();
	dev_info(&pf->pdev->dev,
	dev_info(&pf->pdev->dev,
+48 −33
Original line number Original line Diff line number Diff line
@@ -2244,14 +2244,14 @@ static int __i40e_get_coalesce(struct net_device *netdev,
	rx_ring = vsi->rx_rings[queue];
	rx_ring = vsi->rx_rings[queue];
	tx_ring = vsi->tx_rings[queue];
	tx_ring = vsi->tx_rings[queue];


	if (ITR_IS_DYNAMIC(rx_ring->rx_itr_setting))
	if (ITR_IS_DYNAMIC(rx_ring->itr_setting))
		ec->use_adaptive_rx_coalesce = 1;
		ec->use_adaptive_rx_coalesce = 1;


	if (ITR_IS_DYNAMIC(tx_ring->tx_itr_setting))
	if (ITR_IS_DYNAMIC(tx_ring->itr_setting))
		ec->use_adaptive_tx_coalesce = 1;
		ec->use_adaptive_tx_coalesce = 1;


	ec->rx_coalesce_usecs = rx_ring->rx_itr_setting & ~I40E_ITR_DYNAMIC;
	ec->rx_coalesce_usecs = rx_ring->itr_setting & ~I40E_ITR_DYNAMIC;
	ec->tx_coalesce_usecs = tx_ring->tx_itr_setting & ~I40E_ITR_DYNAMIC;
	ec->tx_coalesce_usecs = tx_ring->itr_setting & ~I40E_ITR_DYNAMIC;


	/* we use the _usecs_high to store/set the interrupt rate limit
	/* we use the _usecs_high to store/set the interrupt rate limit
	 * that the hardware supports, that almost but not quite
	 * that the hardware supports, that almost but not quite
@@ -2311,34 +2311,35 @@ static void i40e_set_itr_per_queue(struct i40e_vsi *vsi,
	struct i40e_pf *pf = vsi->back;
	struct i40e_pf *pf = vsi->back;
	struct i40e_hw *hw = &pf->hw;
	struct i40e_hw *hw = &pf->hw;
	struct i40e_q_vector *q_vector;
	struct i40e_q_vector *q_vector;
	u16 vector, intrl;
	u16 intrl;


	intrl = i40e_intrl_usec_to_reg(vsi->int_rate_limit);
	intrl = i40e_intrl_usec_to_reg(vsi->int_rate_limit);


	rx_ring->rx_itr_setting = ec->rx_coalesce_usecs;
	rx_ring->itr_setting = ITR_REG_ALIGN(ec->rx_coalesce_usecs);
	tx_ring->tx_itr_setting = ec->tx_coalesce_usecs;
	tx_ring->itr_setting = ITR_REG_ALIGN(ec->tx_coalesce_usecs);


	if (ec->use_adaptive_rx_coalesce)
	if (ec->use_adaptive_rx_coalesce)
		rx_ring->rx_itr_setting |= I40E_ITR_DYNAMIC;
		rx_ring->itr_setting |= I40E_ITR_DYNAMIC;
	else
	else
		rx_ring->rx_itr_setting &= ~I40E_ITR_DYNAMIC;
		rx_ring->itr_setting &= ~I40E_ITR_DYNAMIC;


	if (ec->use_adaptive_tx_coalesce)
	if (ec->use_adaptive_tx_coalesce)
		tx_ring->tx_itr_setting |= I40E_ITR_DYNAMIC;
		tx_ring->itr_setting |= I40E_ITR_DYNAMIC;
	else
	else
		tx_ring->tx_itr_setting &= ~I40E_ITR_DYNAMIC;
		tx_ring->itr_setting &= ~I40E_ITR_DYNAMIC;


	q_vector = rx_ring->q_vector;
	q_vector = rx_ring->q_vector;
	q_vector->rx.itr = ITR_TO_REG(rx_ring->rx_itr_setting);
	q_vector->rx.target_itr = ITR_TO_REG(rx_ring->itr_setting);
	vector = vsi->base_vector + q_vector->v_idx;
	wr32(hw, I40E_PFINT_ITRN(I40E_RX_ITR, vector - 1), q_vector->rx.itr);


	q_vector = tx_ring->q_vector;
	q_vector = tx_ring->q_vector;
	q_vector->tx.itr = ITR_TO_REG(tx_ring->tx_itr_setting);
	q_vector->tx.target_itr = ITR_TO_REG(tx_ring->itr_setting);
	vector = vsi->base_vector + q_vector->v_idx;
	wr32(hw, I40E_PFINT_ITRN(I40E_TX_ITR, vector - 1), q_vector->tx.itr);


	wr32(hw, I40E_PFINT_RATEN(vector - 1), intrl);
	/* The interrupt handler itself will take care of programming
	 * the Tx and Rx ITR values based on the values we have entered
	 * into the q_vector, no need to write the values now.
	 */

	wr32(hw, I40E_PFINT_RATEN(q_vector->reg_idx), intrl);
	i40e_flush(hw);
	i40e_flush(hw);
}
}


@@ -2364,11 +2365,11 @@ static int __i40e_set_coalesce(struct net_device *netdev,
		vsi->work_limit = ec->tx_max_coalesced_frames_irq;
		vsi->work_limit = ec->tx_max_coalesced_frames_irq;


	if (queue < 0) {
	if (queue < 0) {
		cur_rx_itr = vsi->rx_rings[0]->rx_itr_setting;
		cur_rx_itr = vsi->rx_rings[0]->itr_setting;
		cur_tx_itr = vsi->tx_rings[0]->tx_itr_setting;
		cur_tx_itr = vsi->tx_rings[0]->itr_setting;
	} else if (queue < vsi->num_queue_pairs) {
	} else if (queue < vsi->num_queue_pairs) {
		cur_rx_itr = vsi->rx_rings[queue]->rx_itr_setting;
		cur_rx_itr = vsi->rx_rings[queue]->itr_setting;
		cur_tx_itr = vsi->tx_rings[queue]->tx_itr_setting;
		cur_tx_itr = vsi->tx_rings[queue]->itr_setting;
	} else {
	} else {
		netif_info(pf, drv, netdev, "Invalid queue value, queue range is 0 - %d\n",
		netif_info(pf, drv, netdev, "Invalid queue value, queue range is 0 - %d\n",
			   vsi->num_queue_pairs - 1);
			   vsi->num_queue_pairs - 1);
@@ -2396,7 +2397,7 @@ static int __i40e_set_coalesce(struct net_device *netdev,
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (ec->rx_coalesce_usecs > (I40E_MAX_ITR << 1)) {
	if (ec->rx_coalesce_usecs > I40E_MAX_ITR) {
		netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n");
		netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n");
		return -EINVAL;
		return -EINVAL;
	}
	}
@@ -2407,16 +2408,16 @@ static int __i40e_set_coalesce(struct net_device *netdev,
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (ec->tx_coalesce_usecs > (I40E_MAX_ITR << 1)) {
	if (ec->tx_coalesce_usecs > I40E_MAX_ITR) {
		netif_info(pf, drv, netdev, "Invalid value, tx-usecs range is 0-8160\n");
		netif_info(pf, drv, netdev, "Invalid value, tx-usecs range is 0-8160\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (ec->use_adaptive_rx_coalesce && !cur_rx_itr)
	if (ec->use_adaptive_rx_coalesce && !cur_rx_itr)
		ec->rx_coalesce_usecs = I40E_MIN_ITR << 1;
		ec->rx_coalesce_usecs = I40E_MIN_ITR;


	if (ec->use_adaptive_tx_coalesce && !cur_tx_itr)
	if (ec->use_adaptive_tx_coalesce && !cur_tx_itr)
		ec->tx_coalesce_usecs = I40E_MIN_ITR << 1;
		ec->tx_coalesce_usecs = I40E_MIN_ITR;


	intrl_reg = i40e_intrl_usec_to_reg(ec->rx_coalesce_usecs_high);
	intrl_reg = i40e_intrl_usec_to_reg(ec->rx_coalesce_usecs_high);
	vsi->int_rate_limit = INTRL_REG_TO_USEC(intrl_reg);
	vsi->int_rate_limit = INTRL_REG_TO_USEC(intrl_reg);
@@ -4406,6 +4407,8 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
	}
	}


flags_complete:
flags_complete:
	changed_flags = orig_flags ^ new_flags;

	/* Before we finalize any flag changes, we need to perform some
	/* Before we finalize any flag changes, we need to perform some
	 * checks to ensure that the changes are supported and safe.
	 * checks to ensure that the changes are supported and safe.
	 */
	 */
@@ -4415,13 +4418,17 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
	    !(pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE))
	    !(pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE))
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	/* Disable FW LLDP not supported if NPAR active or if FW
	/* If the driver detected FW LLDP was disabled on init, this flag could
	 * API version < 1.7
	 * be set, however we do not support _changing_ the flag if NPAR is
	 * enabled or FW API version < 1.7.  There are situations where older
	 * FW versions/NPAR enabled PFs could disable LLDP, however we _must_
	 * not allow the user to enable/disable LLDP with this flag on
	 * unsupported FW versions.
	 */
	 */
	if (new_flags & I40E_FLAG_DISABLE_FW_LLDP) {
	if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
		if (pf->hw.func_caps.npar_enable) {
		if (pf->hw.func_caps.npar_enable) {
			dev_warn(&pf->pdev->dev,
			dev_warn(&pf->pdev->dev,
				 "Unable to stop FW LLDP if NPAR active\n");
				 "Unable to change FW LLDP if NPAR active\n");
			return -EOPNOTSUPP;
			return -EOPNOTSUPP;
		}
		}


@@ -4429,7 +4436,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
		    (pf->hw.aq.api_maj_ver == 1 &&
		    (pf->hw.aq.api_maj_ver == 1 &&
		     pf->hw.aq.api_min_ver < 7)) {
		     pf->hw.aq.api_min_ver < 7)) {
			dev_warn(&pf->pdev->dev,
			dev_warn(&pf->pdev->dev,
				 "FW ver does not support stopping FW LLDP\n");
				 "FW ver does not support changing FW LLDP\n");
			return -EOPNOTSUPP;
			return -EOPNOTSUPP;
		}
		}
	}
	}
@@ -4439,6 +4446,10 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
	 * something else has modified the flags variable since we copied it
	 * something else has modified the flags variable since we copied it
	 * originally. We'll just punt with an error and log something in the
	 * originally. We'll just punt with an error and log something in the
	 * message buffer.
	 * message buffer.
	 *
	 * This is the point of no return for this function.  We need to have
	 * checked any discrepancies or misconfigurations and returned
	 * EOPNOTSUPP before updating pf->flags here.
	 */
	 */
	if (cmpxchg64(&pf->flags, orig_flags, new_flags) != orig_flags) {
	if (cmpxchg64(&pf->flags, orig_flags, new_flags) != orig_flags) {
		dev_warn(&pf->pdev->dev,
		dev_warn(&pf->pdev->dev,
@@ -4446,8 +4457,6 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
		return -EAGAIN;
		return -EAGAIN;
	}
	}


	changed_flags = orig_flags ^ new_flags;

	/* Process any additional changes needed as a result of flag changes.
	/* Process any additional changes needed as a result of flag changes.
	 * The changed_flags value reflects the list of bits that were
	 * The changed_flags value reflects the list of bits that were
	 * changed in the code above.
	 * changed in the code above.
@@ -4479,6 +4488,12 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
		}
		}
	}
	}


	if ((changed_flags & pf->flags &
	     I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED) &&
	    (pf->flags & I40E_FLAG_MFP_ENABLED))
		dev_warn(&pf->pdev->dev,
			 "Turning on link-down-on-close flag may affect other partitions\n");

	if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
	if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
		if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {
		if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {
			struct i40e_dcbx_config *dcbcfg;
			struct i40e_dcbx_config *dcbcfg;
+34 −20
Original line number Original line Diff line number Diff line
@@ -3449,15 +3449,20 @@ static void i40e_vsi_configure_msix(struct i40e_vsi *vsi)
	for (i = 0; i < vsi->num_q_vectors; i++, vector++) {
	for (i = 0; i < vsi->num_q_vectors; i++, vector++) {
		struct i40e_q_vector *q_vector = vsi->q_vectors[i];
		struct i40e_q_vector *q_vector = vsi->q_vectors[i];


		q_vector->itr_countdown = ITR_COUNTDOWN_START;
		q_vector->rx.next_update = jiffies + 1;
		q_vector->rx.itr = ITR_TO_REG(vsi->rx_rings[i]->rx_itr_setting);
		q_vector->rx.target_itr =
		q_vector->rx.latency_range = I40E_LOW_LATENCY;
			ITR_TO_REG(vsi->rx_rings[i]->itr_setting);
		wr32(hw, I40E_PFINT_ITRN(I40E_RX_ITR, vector - 1),
		wr32(hw, I40E_PFINT_ITRN(I40E_RX_ITR, vector - 1),
		     q_vector->rx.itr);
		     q_vector->rx.target_itr);
		q_vector->tx.itr = ITR_TO_REG(vsi->tx_rings[i]->tx_itr_setting);
		q_vector->rx.current_itr = q_vector->rx.target_itr;
		q_vector->tx.latency_range = I40E_LOW_LATENCY;

		q_vector->tx.next_update = jiffies + 1;
		q_vector->tx.target_itr =
			ITR_TO_REG(vsi->tx_rings[i]->itr_setting);
		wr32(hw, I40E_PFINT_ITRN(I40E_TX_ITR, vector - 1),
		wr32(hw, I40E_PFINT_ITRN(I40E_TX_ITR, vector - 1),
		     q_vector->tx.itr);
		     q_vector->tx.target_itr);
		q_vector->tx.current_itr = q_vector->tx.target_itr;

		wr32(hw, I40E_PFINT_RATEN(vector - 1),
		wr32(hw, I40E_PFINT_RATEN(vector - 1),
		     i40e_intrl_usec_to_reg(vsi->int_rate_limit));
		     i40e_intrl_usec_to_reg(vsi->int_rate_limit));


@@ -3558,13 +3563,14 @@ static void i40e_configure_msi_and_legacy(struct i40e_vsi *vsi)
	u32 val;
	u32 val;


	/* set the ITR configuration */
	/* set the ITR configuration */
	q_vector->itr_countdown = ITR_COUNTDOWN_START;
	q_vector->rx.next_update = jiffies + 1;
	q_vector->rx.itr = ITR_TO_REG(vsi->rx_rings[0]->rx_itr_setting);
	q_vector->rx.target_itr = ITR_TO_REG(vsi->rx_rings[0]->itr_setting);
	q_vector->rx.latency_range = I40E_LOW_LATENCY;
	wr32(hw, I40E_PFINT_ITR0(I40E_RX_ITR), q_vector->rx.target_itr);
	wr32(hw, I40E_PFINT_ITR0(I40E_RX_ITR), q_vector->rx.itr);
	q_vector->rx.current_itr = q_vector->rx.target_itr;
	q_vector->tx.itr = ITR_TO_REG(vsi->tx_rings[0]->tx_itr_setting);
	q_vector->tx.next_update = jiffies + 1;
	q_vector->tx.latency_range = I40E_LOW_LATENCY;
	q_vector->tx.target_itr = ITR_TO_REG(vsi->tx_rings[0]->itr_setting);
	wr32(hw, I40E_PFINT_ITR0(I40E_TX_ITR), q_vector->tx.itr);
	wr32(hw, I40E_PFINT_ITR0(I40E_TX_ITR), q_vector->tx.target_itr);
	q_vector->tx.current_itr = q_vector->tx.target_itr;


	i40e_enable_misc_int_causes(pf);
	i40e_enable_misc_int_causes(pf);


@@ -9215,6 +9221,17 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
	}
	}
	i40e_get_oem_version(&pf->hw);
	i40e_get_oem_version(&pf->hw);


	if (test_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state) &&
	    ((hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver <= 33) ||
	     hw->aq.fw_maj_ver < 4) && hw->mac.type == I40E_MAC_XL710) {
		/* The following delay is necessary for 4.33 firmware and older
		 * to recover after EMP reset. 200 ms should suffice but we
		 * put here 300 ms to be sure that FW is ready to operate
		 * after reset.
		 */
		mdelay(300);
	}

	/* re-verify the eeprom if we just had an EMP reset */
	/* re-verify the eeprom if we just had an EMP reset */
	if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state))
	if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state))
		i40e_verify_eeprom(pf);
		i40e_verify_eeprom(pf);
@@ -10018,7 +10035,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
		ring->dcb_tc = 0;
		ring->dcb_tc = 0;
		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
			ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
			ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
		ring->tx_itr_setting = pf->tx_itr_default;
		ring->itr_setting = pf->tx_itr_default;
		vsi->tx_rings[i] = ring++;
		vsi->tx_rings[i] = ring++;


		if (!i40e_enabled_xdp_vsi(vsi))
		if (!i40e_enabled_xdp_vsi(vsi))
@@ -10036,7 +10053,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
			ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
			ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
		set_ring_xdp(ring);
		set_ring_xdp(ring);
		ring->tx_itr_setting = pf->tx_itr_default;
		ring->itr_setting = pf->tx_itr_default;
		vsi->xdp_rings[i] = ring++;
		vsi->xdp_rings[i] = ring++;


setup_rx:
setup_rx:
@@ -10049,7 +10066,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
		ring->count = vsi->num_desc;
		ring->count = vsi->num_desc;
		ring->size = 0;
		ring->size = 0;
		ring->dcb_tc = 0;
		ring->dcb_tc = 0;
		ring->rx_itr_setting = pf->rx_itr_default;
		ring->itr_setting = pf->rx_itr_default;
		vsi->rx_rings[i] = ring;
		vsi->rx_rings[i] = ring;
	}
	}


@@ -10328,9 +10345,6 @@ static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx, int cpu)
		netif_napi_add(vsi->netdev, &q_vector->napi,
		netif_napi_add(vsi->netdev, &q_vector->napi,
			       i40e_napi_poll, NAPI_POLL_WEIGHT);
			       i40e_napi_poll, NAPI_POLL_WEIGHT);


	q_vector->rx.latency_range = I40E_LOW_LATENCY;
	q_vector->tx.latency_range = I40E_LOW_LATENCY;

	/* tie q_vector and vsi together */
	/* tie q_vector and vsi together */
	vsi->q_vectors[v_idx] = q_vector;
	vsi->q_vectors[v_idx] = q_vector;


+280 −141

File changed.

Preview size limit exceeded, changes collapsed.

Loading