Intel Wired LAN Driver Updates 2015-02-09
Subsystems (3)
This series contains updates to i40e and i40evf only.
Rickard Strandqvist removes an unused function for i40e.
John Linville reorders a piece of code so that y_budget does not get used by the FCoE code before it gets initialized.
Mitch adds a delay after VF reset with a minimum of 10ms to allow the hardware internal FIFOs to flush. Bumps up the ARQ descriptors, since we can easily overrun the PF's admin receive queue. Added locking around the VF reset code, since during VF deallocation, we cannot depend on simply masking the interrupt since this does not lock out the service task, which can still call the reset routine. Fix a potential multi-minute delay on driver unload, VF disable or system shutdown. When the module is being unloaded, waiting for the PF to politely handle all of our admin queue requests might take forever with a lot of VFs enabled, so just stop everything and request a VF reset. Also stops the watchdog during shutdown to prevent a log full of admin queue errors and the occasional hang when the system is shut down.
Anjali forces Tx descriptor writebacks on ITR by kicking off the SWINT interrupt since we noticed that there are non-cache-aligned Tx descriptors waiting in the ring while interrupts are disabled under NAPI. Enables loopback for the FCoE VSI, so that VSIs can directly talk to each other without going out on the wire.
Matthew fixes an LED blink issue by making sure to clear the GPIO blink field, instead of OR'ing against zero if the field is already '1'.
Greg cleans up a function header comment.
Vasu helps biosdevname user tool to differentiate dev_port for PCoE netdev and PF netdev, by setting different dev_port value for FCoE netdev.
Carolyn adds a call to u64_stats_init to the receive setup in order to avoid lockdep errors with seqcount on newer kernels.
The following are changes since commit dd83829ed9da6262487252851ca0aa67600d7d56:
Driver: Vmxnet3: Change the hex constant to its decimal equivalent
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
Anjali Singhai Jain (2):
i40evf: Force Tx writeback on ITR
i40e: Enable Loopback for the FCOE vsi as well
Carolyn Wyborny (1):
i40e/i40evf: Add call to u64_stats_init to init
Greg Rose (1):
i40e: Fix function header
John W Linville (1):
i40e: avoid use of uninitialized v_budget in i40e_init_msix
Matt Jared (1):
i40e: fix led blink toggle to enable steady state
Mitch Williams (7):
i40e: delay after VF reset
i40e: Use even more ARQ descriptors
i40e: add locking around VF reset
i40evf: reset on module unload
i40evf: ignore bogus messages from FW
i40evf: stop the watchdog for shutdown
i40e: stop the service task at shutdown
Rickard Strandqvist (1):
i40e: i40e_fcoe.c: Remove unused function
Vasu Dev (1):
i40e: use dev_port for fcoe netdev
drivers/net/ethernet/intel/i40e/i40e.h | 5 +-- drivers/net/ethernet/intel/i40e/i40e_common.c | 6 ++-- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 16 ++++----- drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++---- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++-- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 25 +++++++------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 40 ++++++++++++++++++++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 23 +++++++++---- 9 files changed, 95 insertions(+), 41 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/15 i40e: i40e_fcoe.c: Remove unused function
From: Rickard Strandqvist <[email protected]>
Remove the function i40e_rx_is_fip() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
--- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_fcoe.c +0 -9
@@ -39,15 +39,6 @@#include "i40e_fcoe.h" /** -* i40e_rx_is_fip - returns true if the rx packet type is FIP -* @ptype: the packet type field from rx descriptor write-back -**/ -static inline bool i40e_rx_is_fip (u16 ptype) -{ -return ptype ==I40E_RX_PTYPE_L2_FIP_PAY2 ; -} - -/** * i40e_rx_is_fcoe - returns true if the rx packet type is FCoE * @ptype: the packet type field from rx descriptor write-back **/
Signature · 1 line
1.9.3
PATCH 2/15 i40e: avoid use of uninitialized v_budget in i40e_init_msix
In reply to Jeff KirsherFrom: John W Linville <[email protected]>
This I40E_FCOE block increments v_budget before it has been initialized, then v_budget gets overwritten a few lines later. This patch just reorders the code hunks in what I believe was the intended sequence.
Coverity: CID 1260099
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -5
@@ -6933,17 +6933,17 @@ static int i40e_init_msix(struct i40e_pf *pf)if (pf->flags &I40E_FLAG_FD_SB_ENABLED ) other_vecs++; +/* Scale down if necessary, and the rings will share vectors */ + pf->num_lan_msix =min_t (int, pf->num_lan_msix, + (hw->func_caps.num_msix_vectors - other_vecs)); + v_budget = pf->num_lan_msix + other_vecs; +#ifdef I40E_FCOE if (pf->flags &I40E_FLAG_FCOE_ENABLED ) { pf->num_fcoe_msix = pf->num_fcoe_qps; v_budget += pf->num_fcoe_msix; } -#endif -/* Scale down if necessary, and the rings will share vectors */ - pf->num_lan_msix =min_t (int, pf->num_lan_msix, - (hw->func_caps.num_msix_vectors - other_vecs)); - v_budget = pf->num_lan_msix + other_vecs; pf->msix_entries =kcalloc (v_budget,sizeof (struct msix_entry ),GFP_KERNEL );
Signature · 1 line
1.9.3
PATCH 3/15 i40e: delay after VF reset
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
Delay a minimum of 10ms after VF reset, to allow the hardware's internal FIFOs to flush.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +6 -6
@@ -668,13 +668,13 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)/* poll VPGEN_VFRSTAT reg to make sure * that reset is complete */ -for (i =0 ; i <100 ; i++) { -/* vf reset requires driver to first reset the -* vf and then poll the status register to make sure -* that the requested op was completed -* successfully +for (i =0 ; i <10 ; i++) { +/* VF reset requires driver to first reset the VF and then +* poll the status register to make sure that the reset +* completed successfully. Due to internal HW FIFO flushes, +* we must wait 10ms before the register will be valid. */ -usleep_range (10 ,20 ); +usleep_range (10000 ,20000 ); reg =rd32 (hw,I40E_VPGEN_VFRSTAT (vf->vf_id));if (reg &I40E_VPGEN_VFRSTAT_VFRD_MASK ) { rsd = true;
Signature · 1 line
1.9.3
PATCH 4/15 i40e: Use even more ARQ descriptors
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
When enabling 64 VFs and loading the VF driver in the host kernel, we can easily overrun the PF's admin receive queue. Double the size of this queue, and increase the work limit to allow the PF to handle more requests in a single pass through the service task.
--- drivers/net/ethernet/intel/i40e/i40e.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +2 -2
@@ -87,8 +87,8 @@#define I40E_MINIMUM_FCOE 1/* minimum number of QPs for FCoE */ #endif /* I40E_FCOE */ #define I40E_MAX_AQ_BUF_SIZE 4096 -#define I40E_AQ_LEN 128 -#define I40E_AQ_WORK_LIMIT 16 +#define I40E_AQ_LEN 256 +#define I40E_AQ_WORK_LIMIT 32#define I40E_MAX_USER_PRIORITY 8#define I40E_DEFAULT_MSG_ENABLE 4#define I40E_QUEUE_WAIT_RETRY_LIMIT 10
Signature · 1 line
1.9.3
PATCH 5/15 i40e: add locking around VF reset
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
During VF deallocation, we need to lock out the VF reset code. However, we cannot depend on simply masking the interrupt, as this does not lock out the service task, which can still call the reset routine. Instead, leave the interrupt enabled, but add locking around the VF disable and reset routines.
For the disable code, we wait to get the lock, as the reset code will take a finite amount of time to run. For the reset code, we just return if we fail to get the lock. Since we know that the VFs are being disabled, we don't need to handle the reset.
This fixes a panic when disabling SR-IOV.
--- drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -148,6 +148,7 @@ enum i40e_state_t { __I40E_FD_FLUSH_REQUESTED, __I40E_RESET_FAILED, __I40E_PORT_TX_SUSPENDED, + __I40E_VF_DISABLE, }; enum i40e_interrupt_policy {
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +7 -6
@@ -647,6 +647,9 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)int i;u32 reg; +if (test_and_set_bit (__I40E_VF_DISABLE, &pf->state)) +return ; +/* warn the VF */ clear_bit (I40E_VF_STAT_ACTIVE , &vf->vf_states);
@@ -706,6 +709,7 @@ complete_reset:/* tell the VF the reset is done */ wr32 (hw,I40E_VFGEN_RSTAT1 (vf->vf_id),I40E_VFR_VFACTIVE );i40e_flush (hw); +clear_bit (__I40E_VF_DISABLE, &pf->state); }/**
@@ -790,6 +794,8 @@ void i40e_free_vfs(struct i40e_pf *pf)if (!pf->vf)return ; +while (test_and_set_bit (__I40E_VF_DISABLE, &pf->state)) +usleep_range (1000 ,2000 );/* Disable IOV before freeing resources. This lets any VF drivers * running in the host get themselves cleaned up before we yank
@@ -800,9 +806,6 @@ void i40e_free_vfs(struct i40e_pf *pf)msleep (20 );/* let any messages in transit get finished up */ -/* Disable interrupt 0 so we don't try to handle the VFLR. */ -i40e_irq_dynamic_disable_icr0 (pf); -/* free up vf resources */ tmp = pf->num_alloc_vfs; pf->num_alloc_vfs =0 ;
@@ -834,9 +837,7 @@ void i40e_free_vfs(struct i40e_pf *pf)dev_warn (&pf->pdev->dev,"unable to disable SR-IOV because VFs are assigned.\n" ); } - -/* Re-enable interrupt 0. */ -i40e_irq_dynamic_enable_icr0 (pf); +clear_bit (__I40E_VF_DISABLE, &pf->state); }#ifdef CONFIG_PCI_IOV
Signature · 1 line
1.9.3
PATCH 6/15 i40evf: reset on module unload
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
When the module is being unloaded, don't wait for the PF to politely handle all of our admin queue requests, as that might take forever with a lot of VFs enabled. Instead, just stop everything and request a VF reset.
When the original shutdown code was written, VF resets were unreliable, so we avoided them. But with production hardware and firmware, and the 1.x PF driver, this is no longer the case.
This fixes a potential multi-minute delay on driver unload, VF disable, or system shutdown.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +10 -5
@@ -2423,7 +2423,6 @@ static void i40evf_remove(struct pci_dev *pdev)struct i40evf_adapter *adapter =netdev_priv (netdev);struct i40evf_mac_filter *f, *ftmp;struct i40e_hw *hw = &adapter->hw; -int count =50 ;cancel_delayed_work_sync (&adapter->init_task);cancel_work_sync (&adapter->reset_task);
@@ -2432,12 +2431,18 @@ static void i40evf_remove(struct pci_dev *pdev)unregister_netdev (netdev); adapter->netdev_registered = false; } -while (count-- && adapter->aq_required) -msleep (50 ); -if (count <0 ) -dev_err (&pdev->dev,"Timed out waiting for PF driver.\n" ); +/* Shut down all the garbage mashers on the detention level */ adapter->state = __I40EVF_REMOVE; + adapter->aq_required =0 ; + adapter->aq_pending =0 ; +i40evf_request_reset (adapter); +msleep (20 ); +/* If the FW isn't responding, kick it once, but only once. */ +if (!i40evf_asq_done (hw)) { +i40evf_request_reset (adapter); +msleep (20 ); + }if (adapter->msix_entries) {i40evf_misc_irq_disable (adapter);
Signature · 1 line
1.9.3
PATCH 7/15 i40evf: ignore bogus messages from FW
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
Occasionally on shutdown, the FW will hand us a bunch of messages filled with zeros, which can cause us to spin trying to handle them. Just ignore these and get on with shutting down.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -1
@@ -1631,7 +1631,7 @@ static void i40evf_adminq_task(struct work_struct *work) v_msg = (struct i40e_virtchnl_msg *)&event.desc; do { ret = i40evf_clean_arq_element(hw, &event, &pending); - if (ret) + if (ret || !v_msg->v_opcode) break; /* No event to process or error cleaning ARQ */ i40evf_virtchnl_completion(adapter, v_msg->v_opcode,
Signature · 1 line
1.9.3
PATCH 8/15 i40evf: stop the watchdog for shutdown
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
Stop the watchdog during shutdown. Failing to do this causes a log full of admin queue errors and the occasional hang when the system is shut down.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +6 -0
@@ -2213,12 +2213,18 @@ err:static void i40evf_shutdown (struct pci_dev *pdev) {struct net_device *netdev =pci_get_drvdata (pdev); +struct i40evf_adapter *adapter =netdev_priv (netdev);netif_device_detach (netdev);if (netif_running (netdev))i40evf_close (netdev); +/* Prevent the watchdog from running. */ + adapter->state = __I40EVF_REMOVE; + adapter->aq_required =0 ; + adapter->aq_pending =0 ; +#ifdef CONFIG_PM pci_save_state (pdev);
Signature · 1 line
1.9.3
PATCH 9/15 i40e: stop the service task at shutdown
In reply to Jeff KirsherFrom: Mitch Williams <[email protected]>
Stop the service task in the shutdown handler, preventing it from accessing the admin queue after it had been closed. This fixes a panic that could occur when the system was shut down with a lot of VFs enabled.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
@@ -9736,6 +9736,8 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)set_bit (__I40E_SUSPENDED, &pf->state);set_bit (__I40E_DOWN, &pf->state); +del_timer_sync (&pf->service_timer); +cancel_work_sync (&pf->service_task);rtnl_lock ();i40e_prep_for_reset (pf);rtnl_unlock ();
Signature · 1 line
1.9.3
PATCH 10/15 i40evf: Force Tx writeback on ITR
In reply to Jeff KirsherFrom: Anjali Singhai Jain <[email protected]>
This patch forces Tx descriptor writebacks on ITR by kicking off the SWINT interrupt when we notice that there are non-cache-aligned Tx descriptors waiting in the ring while interrupts are disabled under NAPI.
--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 +-- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 38 +++++++++++++++++++++++++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 + 3 files changed, 39 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +2 -2
@@ -836,8 +836,8 @@ static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector) {u32 val =I40E_PFINT_DYN_CTLN_INTENA_MASK |I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK | -I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK -/* allow 00 to be written to the index */ ; +I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK ; +/* allow 00 to be written to the index */ wr32(&vsi->back->hw, I40E_PFINT_DYN_CTLN(q_vector->v_idx + vsi->base_vector - 1),
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +36 -2
@@ -192,6 +192,8 @@ static inline u32 i40e_get_head(struct i40e_ring *tx_ring)return le32_to_cpu (*(volatile __le32 *)head); } +#define WB_STRIDE 0x3 +/** * i40e_clean_tx_irq - Reclaim resources after transmit completes * @tx_ring: tx ring to clean
@@ -293,6 +295,14 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget) tx_ring->q_vector->tx.total_bytes += total_bytes; tx_ring->q_vector->tx.total_packets += total_packets; +if (budget && + !((i &WB_STRIDE ) ==WB_STRIDE ) && + !test_bit (__I40E_DOWN, &tx_ring->vsi->state) && + (I40E_DESC_UNUSED (tx_ring) != tx_ring->count)) + tx_ring->arm_wb = true; +else + tx_ring->arm_wb = false; +if (check_for_tx_hang (tx_ring) &&i40e_check_tx_hang (tx_ring)) {/* schedule immediate reset if we believe we hung */ dev_info(tx_ring->dev, "Detected Tx Unit Hang\n"
@@ -344,6 +354,24 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget) }/** +* i40e_force_wb -Arm hardware to do a wb on noncache aligned descriptors +* @vsi: the VSI we care about +* @q_vector: the vector on which to force writeback +* +**/ +static void i40e_force_wb (struct i40e_vsi *vsi,struct i40e_q_vector *q_vector) +{ +u32 val =I40E_VFINT_DYN_CTLN_INTENA_MASK | +I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK | +I40E_VFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK ; +/* allow 00 to be written to the index */ + +wr32 (&vsi->back->hw, +I40E_VFINT_DYN_CTLN1 (q_vector->v_idx + vsi->base_vector -1 ), + val); +} + +/** * i40e_set_new_dynamic_itr - Find new ITR level * @rc: structure containing ring performance data *
@@ -1065,6 +1093,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)struct i40e_vsi *vsi = q_vector->vsi;struct i40e_ring *ring;bool clean_complete = true; +bool arm_wb = false;int budget_per_ring;if (test_bit (__I40E_DOWN, &vsi->state)) {
@@ -1075,8 +1104,10 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)/* Since the actual Tx work is minimal, we can give the Tx a larger * budget and be more aggressive about cleaning up the Tx descriptors. */ -i40e_for_each_ring (ring, q_vector->tx) +i40e_for_each_ring (ring, q_vector->tx) { clean_complete &=i40e_clean_tx_irq (ring, vsi->work_limit); + arm_wb |= ring->arm_wb; + }/* We attempt to distribute budget to each Rx queue fairly, but don't * allow the budget to go below 1 because that would exit polling early.
@@ -1087,8 +1118,11 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget) clean_complete &=i40e_clean_rx_irq (ring, budget_per_ring);/* If work not completed, return budget and polling will return */ -if (!clean_complete) +if (!clean_complete) { +if (arm_wb) +i40e_force_wb (vsi, q_vector);return budget; + }/* Work is done so exit the polling mode and re-enable the interrupt */ napi_complete (napi);
drivers/net/ethernet/intel/i40evf/i40e_txrx.h +1 -0
@@ -238,6 +238,7 @@ struct i40e_ring {u8 atr_count;bool ring_active;/* is ring online or not */ +bool arm_wb;/* do something to arm write back */ /* stats structs */ struct i40e_queue_stats stats;
Signature · 1 line
1.9.3
PATCH 11/15 i40e: fix led blink toggle to enable steady state
In reply to Jeff KirsherFrom: Matt Jared <[email protected]>
Make sure to clear the GPIO blink field, instead of OR'ing against zero if the field is already '1'.
--- drivers/net/ethernet/intel/i40e/i40e_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_common.c +4 -2
@@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)if (mode ==I40E_LINK_ACTIVITY ) blink = false; - gpio_val |= (blink ?1 :0 ) << -I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT ; +if (blink) + gpio_val |= (1 <<I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT ); +else + gpio_val &= ~(1 <<I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT );wr32 (hw,I40E_GLGEN_GPIO_CTL (i), gpio_val);break ;
Signature · 1 line
1.9.3
PATCH 12/15 i40e: Fix function header
In reply to Jeff KirsherFrom: Greg Rose <[email protected]>
s/enable/disable
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -2940,7 +2940,7 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)/** * i40e_irq_dynamic_disable - Disable default interrupt generation settings * @vsi: pointer to a vsi -* @vector: enable a particular Hw Interrupt vector +* @vector: disable a particular Hw Interrupt vector **/ void i40e_irq_dynamic_disable (struct i40e_vsi *vsi,int vector) {
Signature · 1 line
1.9.3
PATCH 13/15 i40e: use dev_port for fcoe netdev
In reply to Jeff KirsherFrom: Vasu Dev <[email protected]>
Set different dev_port value 1 for FCoE netdev than the default zero dev_port value for PF netdev, this helps biosdevname user tool to differentiate them correctly while both attached to the same PCI function.
--- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_fcoe.c +6 -0
@@ -1502,6 +1502,12 @@ void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi)strlcpy (netdev->name,"fcoe%d" ,IFNAMSIZ -1 ); netdev->mtu =FCOE_MTU ;SET_NETDEV_DEV (netdev, &pf->pdev->dev); +/* set different dev_port value 1 for FCoE netdev than the default +* zero dev_port value for PF netdev, this helps biosdevname user +* tool to differentiate them correctly while both attached to the +* same PCI function. +*/ + netdev->dev_port =1 ;i40e_add_filter (vsi, hw->mac.san_addr,0 , false, false);i40e_add_filter (vsi, (u8 [6 ])FC_FCOE_FLOGI_MAC ,0 , false, false);i40e_add_filter (vsi,FIP_ALL_FCOE_MACS ,0 , false, false);
Signature · 1 line
1.9.3
PATCH 14/15 i40e: Enable Loopback for the FCOE vsi as well
In reply to Jeff KirsherFrom: Anjali Singhai Jain <[email protected]>
For all VSIs on a VEB, Loopback mode should be either on or off. Our configuration requires them to be ON so that VSIs can directly talk to each other without going out on the wire.
--- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/i40e/i40e_fcoe.c +1 -0
@@ -395,6 +395,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)I40E_AQ_VSI_PROP_INGRESS_UP_VALID | I40E_AQ_VSI_PROP_EGRESS_UP_VALID)); + info->switch_id =cpu_to_le16 (I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB ); enabled_tc =i40e_get_fcoe_tc_map (pf);i40e_vsi_setup_queue_map (vsi, ctxt, enabled_tc, true);
Signature · 1 line
1.9.3
PATCH 15/15 i40e/i40evf: Add call to u64_stats_init to init
In reply to Jeff KirsherFrom: Carolyn Wyborny <[email protected]>
This patch adds a call to u64_stats_init to Rx setup.
This done in order to avoid lockdep errors with seqcount on newer kernels.
--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +2 -0
@@ -1098,6 +1098,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)if (!rx_ring->rx_bi) goto err; +u64_stats_init (rx_ring->syncp); +/* Round up to nearest 4K */ rx_ring->size =ring_is_16byte_desc_enabled (rx_ring) ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +2 -0
@@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring)if (!rx_ring->rx_bi) goto err; +u64_stats_init (rx_ring->syncp); +/* Round up to nearest 4K */ rx_ring->size =ring_is_16byte_desc_enabled (rx_ring) ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
Signature · 1 line
1.9.3
Re: [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
Hello.
Quoted 18 lines · Jeff Kirsher
From: Carolyn Wyborny <[email protected]>
This patch adds a call to
u64_stats_initto Rx setup.
This done in order to avoid lockdep errors with seqcount on newer kernels.Change-ID Ia8ba8f0bcbd1c0e926f97d70aeee4ce4fd055e93Signed-off-by Carolyn Wyborny <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++ 2 files changed, 4 insertions(+)drivers/net/ethernet/intel/i40e/i40e_txrx.c +0
-0
drivers/net/ethernet/intel/i40e/i40e_txrx.c int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring) · line 1101
Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1
-0@@ -1098,6 +1098,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)if (!rx_ring->rx_bi) goto err; +u64_stats_init (rx_ring->syncp);
This is over-indented.
drivers/net/ethernet/intel/i40evf/i40e_txrx.c int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring) · line 599
Quoted 13 lines
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1
-0+/* Round up to nearest 4K */ rx_ring->size =ring_is_16byte_desc_enabled (rx_ring) ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1
-0@@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring)if (!rx_ring->rx_bi) goto err; +u64_stats_init (rx_ring->syncp);
Likewise.
drivers/net/ethernet/intel/i40evf/i40e_txrx.c int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring) · line 603
Quoted 4 lines
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1
-0+/* Round up to nearest 4K */ rx_ring->size =ring_is_16byte_desc_enabled (rx_ring) ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
WBR, Sergei
RE: [net-next 15/15] i40e/i40evf: Add call to u64_stats_init to init
Quoted 10 lines
-----Original Message-----
From: Sergei Shtylyov [mailto:[email protected]]
Sent: Monday, February 09, 2015 4:09 AM
To: Kirsher, Jeffrey T; [email protected]
Cc: Wyborny, Carolyn; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [net-next 15/15] i40e/i40evf: Add call tou64_stats_initto initHello.
[..]
Quoted 22 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ u64_stats_init(rx_ring->syncp);This is over-indented.
drivers/net/ethernet/intel/i40evf/i40e_txrx.c int i40evf_setup_rx_descriptors(struct i40e_ring
Quoted 10 lines
+
/* Round up to nearest 4K */
rx_ring->size=ring_is_16byte_desc_enabled(rx_ring)
?rx_ring->count*sizeof(union i40e_16byte_rx_desc)diff --gita/drivers/net/ethernet/intel/i40evf/i40e_txrx.cb/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4bf15da..459499a 100644drivers/net/ethernet/intel/i40evf/i40e_txrx.c +0
-0@@ -596,6 +596,8 @@ int i40evf_setup_rx_descriptors(struct i40e_ring
*rx_ring)drivers/net/ethernet/intel/i40evf/i40e_txrx.c int i40evf_setup_rx_descriptors(struct i40e_ring · line 599
Quoted 4 lines
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1
-0if (!rx_ring->rx_bi) goto err; +u64_stats_init (rx_ring->syncp);Likewise.
Quoted 6 lines
drivers/net/ethernet/intel/i40evf/i40e_txrx.c int i40evf_setup_rx_descriptors(struct i40e_ring · line 603
Quoted 4 lines
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1
-0+/* Round up to nearest 4K */ rx_ring->size =ring_is_16byte_desc_enabled (rx_ring) ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)WBR, Sergei
Thanks, I have already submitted a patch to correct this, but need to track down the same change in the vf code.
Jeff, do you know how close it is to submission?
Carolyn
Carolyn Wyborny
Linux Development
Networking Division
Intel Corporation
From: Jeff Kirsher <[email protected]>
Date: Mon, 9 Feb 2015 02:43:46 -0800
Quoted 1 line
This series contains updates to i40e and i40evf only.
Pulled, please send me a fixup patch for the over indented lines in patch #15.
Thanks.
Quoted 7 lines · David Miller
From: Jeff Kirsher <[email protected]>
Date: Mon, 9 Feb 2015 02:43:46 -0800Quoted 1 line
This series contains updates to i40e and i40evf only.
Pulled, please send me a fixup patch for the over indented lines in patch #15.
Working on it now.