Intel Wired LAN Driver Updates
Subsystems (3)
cover Intel Wired LAN Driver Updates
This series contains updates to i40e and (mostly to) i40evf.
Mitch provides most the work for this series. For the vf driver he requests a reset on a tx hang, removes vlan filtes on close since we already remove the MAC filters, fixes some crashes, gets rid of PCI DAC as it does not mean much on virtualized PCIe parts, skips assigning the device name that just gets renamed anyway, stores the descriptor ring size in a manner that allows the use of common tx and rx code with the PF driver and makes a handful of cosmetic fixes. For i40e he removes a delay left over from debugging and changes a do/while loop to a for loop to avoid hitting another delay each time.
Catherine fixes inconsistent MSI and MSI-X messages and bumps the driver version.
Mitch Williams (12):
i40evf: request reset on tx hang
i40evf: remove VLAN filters on close
i40evf: fix multiple crashes on remove
i40evf: get rid of pci_using_dac
i40evf: fix up strings in init task
i40evf: remove bogus comment
i40evf: don't guess device name
i40evf: store ring size in ring structs
i40evf: update version and copyright date
i40evf: remove errant space
i40e: remove unnecessary delay
i40e: tighten up ring enable/disable flow
Catherine Sullivan (2):
i40e: Change MSIX to MSI-X
i40e and i40evf: Bump driver versions
drivers/net/ethernet/intel/i40e/i40e_main.c | 43 ++++++----- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 - .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 13 ++-- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 85 +++++++++++----------- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 +++ 7 files changed, 85 insertions(+), 74 deletions(-)
Signature · 1 line
1.8.5.GIT
PATCH 1/14 i40evf: request reset on tx hang
From: Mitch Williams <[email protected]>
If the kernel watchdog bites us, ask the PF to reset us and attempt to reinit the driver.
--- drivers/net/ethernet/intel/i40evf/i40evf.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++++++--- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 ++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf.h +1 -0
@@ -289,6 +289,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter);void i40evf_del_vlans (struct i40evf_adapter *adapter);void i40evf_set_promiscuous (struct i40evf_adapter *adapter,int flags);void i40evf_request_stats (struct i40evf_adapter *adapter); +void i40evf_request_reset (struct i40evf_adapter *adapter);void i40evf_virtchnl_completion (struct i40evf_adapter *adapter,enum i40e_virtchnl_ops v_opcode,i40e_status v_retval,u8 *msg,u16 msglen);
drivers/net/ethernet/intel/i40evf/i40evf_main.c +7 -3
@@ -167,9 +167,13 @@ static void i40evf_tx_timeout(struct net_device *netdev)struct i40evf_adapter *adapter =netdev_priv (netdev); adapter->tx_timeout_count++; - -/* Do the reset outside of interrupt context */ -schedule_work (&adapter->reset_task); +dev_info (&adapter->pdev->dev,"TX timeout detected.\n" ); +if (!(adapter->flags &I40EVF_FLAG_RESET_PENDING )) { +dev_info (&adapter->pdev->dev,"Requesting reset from PF\n" ); +i40evf_request_reset (adapter); + adapter->flags |=I40EVF_FLAG_RESET_PENDING ; +schedule_work (&adapter->reset_task); + } }/**
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c +12 -0
@@ -654,6 +654,18 @@ void i40evf_request_stats(struct i40evf_adapter *adapter)/* if the request failed, don't lock out others */ adapter->current_op =I40E_VIRTCHNL_OP_UNKNOWN ; } +/** +* i40evf_request_reset +* @adapter: adapter structure +* +* Request that the PF reset this VF. No response is expected. +**/ +void i40evf_request_reset (struct i40evf_adapter *adapter) +{ +/* Don't check CURRENT_OP - this is always higher priority */ +i40evf_send_pf_msg (adapter,I40E_VIRTCHNL_OP_RESET_VF ,NULL ,0 ); + adapter->current_op =I40E_VIRTCHNL_OP_UNKNOWN ; +}/** * i40evf_virtchnl_completion
Signature · 1 line
1.8.5.GIT
PATCH 2/14 i40evf: remove VLAN filters on close
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
We remove all the MAC filters, so remove the VLAN filters, too.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +5 -0
@@ -972,9 +972,14 @@ void i40evf_down(struct i40evf_adapter *adapter)list_for_each_entry (f, &adapter->mac_filter_list, list) { f->remove = true; } +/* remove all VLAN filters */ +list_for_each_entry (f, &adapter->vlan_filter_list, list) { + f->remove = true; + }if (!(adapter->flags &I40EVF_FLAG_PF_COMMS_FAILED ) && adapter->state != __I40EVF_RESETTING) { adapter->aq_required |=I40EVF_FLAG_AQ_DEL_MAC_FILTER ; + adapter->aq_required |=I40EVF_FLAG_AQ_DEL_VLAN_FILTER ;/* disable receives */ adapter->aq_required |=I40EVF_FLAG_AQ_DISABLE_QUEUES ;mod_timer_pending (&adapter->watchdog_timer, jiffies +1 );
Signature · 1 line
1.8.5.GIT
PATCH 3/14 i40evf: fix multiple crashes on remove
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
Depending upon the state of the driver, there are several potential pitfalls on remove. Kill the watchdog task so rmmod doesn't hang. Check the adapter->msix_entries field, not the num_msix_vectors field, which is never cleared.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +7 -6
@@ -215,6 +215,9 @@ static void i40evf_irq_disable(struct i40evf_adapter *adapter)int i;struct i40e_hw *hw = &adapter->hw; +if (!adapter->msix_entries) +return ; +for (i =1 ; i < adapter->num_msix_vectors; i++) {wr32 (hw,I40E_VFINT_DYN_CTLN1 (i -1 ),0 );synchronize_irq (adapter->msix_entries[i].vector);
@@ -2372,17 +2375,15 @@ static void i40evf_remove(struct pci_dev *pdev) } adapter->state = __I40EVF_REMOVE; -if (adapter->num_msix_vectors) { +if (adapter->msix_entries) {i40evf_misc_irq_disable (adapter); -del_timer_sync (&adapter->watchdog_timer); - -flush_scheduled_work (); -i40evf_free_misc_irq (adapter); -i40evf_reset_interrupt_capability (adapter); } +del_timer_sync (&adapter->watchdog_timer); +flush_scheduled_work (); +if (hw->aq.asq.count)i40evf_shutdown_adminq (hw);
Signature · 1 line
1.8.5.GIT
PATCH 4/14 i40evf: get rid of pci_using_dac
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
PCI DAC doesn't really mean much on a virtualized PCI Express part, so get rid of that check and just always set the HIGHDMA flag in the net device.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +3 -7
@@ -2034,8 +2034,8 @@ static void i40evf_init_task(struct work_struct *work) netdev->netdev_ops = &i40evf_netdev_ops;i40evf_set_ethtool_ops (netdev); netdev->watchdog_timeo =5 *HZ ; - - netdev->features |=NETIF_F_SG | + netdev->features |=NETIF_F_HIGHDMA | +NETIF_F_SG |NETIF_F_IP_CSUM |NETIF_F_SCTP_CSUM | NETIF_F_IPV6_CSUM |
@@ -2180,20 +2180,18 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)struct net_device *netdev;struct i40evf_adapter *adapter =NULL ;struct i40e_hw *hw =NULL ; -int err, pci_using_dac; +int err; err =pci_enable_device (pdev);if (err)return err;if (!dma_set_mask (&pdev->dev,DMA_BIT_MASK (64 ))) { - pci_using_dac = true;/* coherent mask for the same size will always succeed if * dma_set_mask does */ dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (64 )); }else if (!dma_set_mask (&pdev->dev,DMA_BIT_MASK (32 ))) { - pci_using_dac = false;dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (32 )); }else { dev_err(&pdev->dev, "%s: DMA configuration failed: %d\n",
@@ -2224,8 +2222,6 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)pci_set_drvdata (pdev, netdev); adapter =netdev_priv (netdev); -if (pci_using_dac) - netdev->features |=NETIF_F_HIGHDMA ; adapter->netdev = netdev; adapter->pdev = pdev;
Signature · 1 line
1.8.5.GIT
PATCH 5/14 i40evf: fix up strings in init task
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
Make sure errors are reported at the correct log level, quit printing the function name every time, and make the messages more consistent in format.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 34 ++++++++++++------------- 1 file changed, 16 insertions(+), 18 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +16 -18
@@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct *work) adapter->flags &= ~I40EVF_FLAG_RESET_PENDING ; err =i40e_set_mac_type (hw);if (err) { -dev_info (&pdev->dev,"%s: set_mac_type failed: %d\n" , - __func__, err); +dev_err (&pdev->dev,"Failed to set MAC type (%d)\n" , + err); goto err; } err =i40evf_check_reset_complete (hw);if (err) { -dev_info (&pdev->dev,"%s: device is still in reset (%d).\n" , - __func__, err); +dev_err (&pdev->dev,"Device is still in reset (%d).\n" , + err); goto err; } hw->aq.num_arq_entries =I40EVF_AQ_LEN ;
@@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct *work) err =i40evf_init_adminq (hw);if (err) { -dev_info (&pdev->dev,"%s: init_adminq failed: %d\n" , - __func__, err); +dev_err (&pdev->dev,"Failed to init Admin Queue (%d)\n" , + err); goto err; } err =i40evf_send_api_ver (adapter);if (err) { -dev_info (&pdev->dev,"%s: unable to send to PF (%d)\n" , - __func__, err); +dev_err (&pdev->dev,"Unable to send to PF (%d)\n" , + err);i40evf_shutdown_adminq (hw); goto err; }
@@ -1977,13 +1977,13 @@ static void i40evf_init_task(struct work_struct *work)/* aq msg sent, awaiting reply */ err =i40evf_verify_api_ver (adapter);if (err) { -dev_err (&pdev->dev,"Unable to verify API version, error %d\n" , +dev_err (&pdev->dev,"Unable to verify API version (%d)\n" , err); goto err; } err =i40evf_send_vf_config_msg (adapter);if (err) { -dev_err (&pdev->dev,"Unable send config request, error %d\n" , +dev_err (&pdev->dev,"Unable send config request (%d)\n" , err); goto err; }
@@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct *work) sizeof(struct i40e_virtchnl_vsi_resource)); adapter->vf_res =kzalloc (bufsz,GFP_KERNEL );if (!adapter->vf_res) { -dev_err (&pdev->dev,"%s: unable to allocate memory\n" , - __func__); +dev_err (&pdev->dev,"Unable to allocate memory for vf resources.\n" ); goto err; } }
@@ -2007,8 +2006,8 @@ static void i40evf_init_task(struct work_struct *work)if (err ==I40E_ERR_ADMIN_QUEUE_NO_WORK ) goto restart;if (err) { -dev_info (&pdev->dev,"%s: unable to get VF config (%d)\n" , - __func__, err); +dev_err (&pdev->dev,"Unable to get VF config (%d)\n" , + err); goto err_alloc; } adapter->state = __I40EVF_INIT_SW;
@@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct *work) adapter->vsi_res = &adapter->vf_res->vsi_res[i]; }if (!adapter->vsi_res) { -dev_info (&pdev->dev,"%s: no LAN VSI found\n" , __func__); +dev_err (&pdev->dev,"No LAN VSI found.\n" ); goto err_alloc; }
@@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct *work)/* The HW MAC address was set and/or determined in sw_init */ if (!is_valid_ether_addr (adapter->hw.mac.addr)) { -dev_info (&pdev->dev, -"Invalid MAC address %pMAC, using random\n" , - adapter->hw.mac.addr); +dev_info (&pdev->dev,"Invalid MAC address %pMAC, using random.\n" , + adapter->hw.mac.addr);random_ether_addr (adapter->hw.mac.addr); }memcpy (netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
Signature · 1 line
1.8.5.GIT
Re: [net-next 05/14] i40evf: fix up strings in init task
Quoted 1 line · Aaron Brown
From: Mitch Williams <[email protected]>
Hello.
drivers/net/ethernet/intel/i40evf/i40evf_main.c
Quoted 5 lines
Make sure errors are reported at the correct log level, quit printing the function name every time, and make the messages more consistent in format.
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0
-0
[]
Quoted 6 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0
-2@@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct *work) adapter->flags &= ~I40EVF_FLAG_RESET_PENDING ; err =i40e_set_mac_type (hw);if (err) { -dev_info (&pdev->dev,"%s: set_mac_type failed: %d\n" , - __func__, err);
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 1949
Quoted 10 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +4
-2+dev_err (&pdev->dev,"Failed to set MAC type (%d)\n" , + err); goto err; } err =i40evf_check_reset_complete (hw);if (err) { -dev_info (&pdev->dev,"%s: device is still in reset (%d).\n" , - __func__, err); +dev_err (&pdev->dev,"Device is still in reset (%d).\n" , + err);
Look at the lines above and below here.
If you're going to be consistent, can you please
remove the unnecessary period before the newline.
Quoted 12 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2
-2goto err; } hw->aq.num_arq_entries =I40EVF_AQ_LEN ;@@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct *work) err =i40evf_init_adminq (hw);if (err) { -dev_info (&pdev->dev,"%s: init_adminq failed: %d\n" , - __func__, err); +dev_err (&pdev->dev,"Failed to init Admin Queue (%d)\n" , + err); goto err;
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 1969
Quoted 10 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2
-2} err =i40evf_send_api_ver (adapter);if (err) { -dev_info (&pdev->dev,"%s: unable to send to PF (%d)\n" , - __func__, err); +dev_err (&pdev->dev,"Unable to send to PF (%d)\n" , + err);i40evf_shutdown_adminq (hw); goto err; }
[]
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 2001
Quoted 7 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-2@@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct *work) sizeof(struct i40e_virtchnl_vsi_resource)); adapter->vf_res =kzalloc (bufsz,GFP_KERNEL );if (!adapter->vf_res) { -dev_err (&pdev->dev,"%s: unable to allocate memory\n" , - __func__); +dev_err (&pdev->dev,"Unable to allocate memory for vf resources.\n" );
Unnecessary OOM.
Allocs failures already have one and a dump_stack().
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 2024
Quoted 6 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-1@@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct *work) adapter->vsi_res = &adapter->vf_res->vsi_res[i]; }if (!adapter->vsi_res) { -dev_info (&pdev->dev,"%s: no LAN VSI found\n" , __func__); +dev_err (&pdev->dev,"No LAN VSI found.\n" );
Adding unnecessary periods.
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 2055
Quoted 8 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-3@@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct *work)/* The HW MAC address was set and/or determined in sw_init */ if (!is_valid_ether_addr (adapter->hw.mac.addr)) { -dev_info (&pdev->dev, -"Invalid MAC address %pMAC, using random\n" , - adapter->hw.mac.addr); + dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random.\n",
And here too.
RE: [net-next 05/14] i40evf: fix up strings in init task
Quoted 106 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Friday, February 14, 2014 3:43 PM
To: Brown, Aaron F
Cc: [email protected]; Williams, Mitch A; [email protected]; [email protected]; [email protected]; Brandeburg, Jesse
Subject: Re: [net-next 05/14] i40evf: fix up strings in init taskQuoted 1 line · Aaron Brown
From: Mitch Williams <[email protected]>
Hello.
Review
Quoted 5 lines
Make sure errors are reported at the correct log level, quit printing the function name every time, and make the messages more consistent in format.
(quoted diff) +0
-0
b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
[]Review static void i40evf_init_task(struct work_struct
Quoted 1 line
(quoted diff) +0
-0@@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct*work)
Quoted 5 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0
-2adapter->flags &= ~I40EVF_FLAG_RESET_PENDING ; err =i40e_set_mac_type (hw);if (err) { -dev_info (&pdev->dev,"%s: set_mac_type failed: %d\n" , - __func__, err);drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 1949
Quoted 10 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +4
-2+dev_err (&pdev->dev,"Failed to set MAC type (%d)\n" , + err); goto err; } err =i40evf_check_reset_complete (hw);if (err) { -dev_info (&pdev->dev,"%s: device is still in reset (%d).\n" , - __func__, err); +dev_err (&pdev->dev,"Device is still in reset (%d).\n" , + err);Look at the lines above and below here.
If you're going to be consistent, can you please
remove the unnecessary period before the newline.drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct
Quoted 4 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0
-0goto err; } hw->aq.num_arq_entries =I40EVF_AQ_LEN ;@@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct*work)
Quoted 8 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2
-2err =i40evf_init_adminq (hw);if (err) { -dev_info (&pdev->dev,"%s: init_adminq failed: %d\n" , - __func__, err); +dev_err (&pdev->dev,"Failed to init Admin Queue (%d)\n" , + err); goto err;drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 1969
Quoted 10 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2
-2} err =i40evf_send_api_ver (adapter);if (err) { -dev_info (&pdev->dev,"%s: unable to send to PF (%d)\n" , - __func__, err); +dev_err (&pdev->dev,"Unable to send to PF (%d)\n" , + err);i40evf_shutdown_adminq (hw); goto err; }[]
Review static void i40evf_init_task(struct work_struct
Quoted 1 line
(quoted diff) +0
-0@@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct*work)
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work)
Quoted 6 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-2sizeof(struct i40e_virtchnl_vsi_resource)); adapter->vf_res =kzalloc (bufsz,GFP_KERNEL );if (!adapter->vf_res) { -dev_err (&pdev->dev,"%s: unable to allocate memory\n" , - __func__); + dev_err(&pdev->dev, "Unable to allocate memory for vfresources.\n");
Unnecessary OOM.
Allocs failures already have one and adump_stack().Review static void i40evf_init_task(struct work_struct
Quoted 1 line
(quoted diff) +0
-0@@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct*work)
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work) · line 2024
Quoted 5 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-1adapter->vsi_res = &adapter->vf_res->vsi_res[i]; }if (!adapter->vsi_res) { -dev_info (&pdev->dev,"%s: no LAN VSI found\n" , __func__); +dev_err (&pdev->dev,"No LAN VSI found.\n" );Adding unnecessary periods.
Review static void i40evf_init_task(struct work_struct
Quoted 1 line
(quoted diff) +0
-0@@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct*work)
drivers/net/ethernet/intel/i40evf/i40evf_main.c static void i40evf_init_task(struct work_struct *work)
Quoted 7 lines
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1
-3/* The HW MAC address was set and/or determined in sw_init */ if (!is_valid_ether_addr (adapter->hw.mac.addr)) { -dev_info (&pdev->dev, -"Invalid MAC address %pMAC, using random\n" , - adapter->hw.mac.addr); + dev_info(&pdev->dev, "Invalid MAC address %pMAC, usingrandom.\n",
Quoted 2 lines
And here too.
Joe, thanks for your review. We'll ditch the OOM message and I'll add a reminder to myself to scrub the rest of the driver for more of these.
With regard to periods on the end of log messages, is this a hard rule? The grammar pedant in me likes to see periods on the end of sentences, so I tend to add them. However, I see that CodingStyle says, "Kernel messages do not have to be terminated with a period." Perhaps we should change that to say "should not" if it is considered a rule.
Either way, we'll respin the patch.
-Mitch
Re: [net-next 05/14] i40evf: fix up strings in init task
Quoted 2 lines · Mitch A
With regard to periods on the end of log messages, is this a hard rule?
No.
Quoted 1 line
The grammar pedant in me likes to see periods on the end of sentences,
Opinions vary.
I think kernel logging output lines aren't sentences and are just notifications that don't need periods.
If you look at a normal log, there are relatively few entries with periods.
For instance, my current dmesg:
$ dmesg | wc -l 1568 $ dmesg | grep "[^\.]\.$" | wc -l 84
PATCH 6/14 i40evf: remove bogus comment
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
This comment is simply not true.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0 -1
@@ -2050,7 +2050,6 @@ static void i40evf_init_task(struct work_struct *work)NETIF_F_HW_VLAN_CTAG_FILTER ; } -/* The HW MAC address was set and/or determined in sw_init */ if (!is_valid_ether_addr (adapter->hw.mac.addr)) {dev_info (&pdev->dev,"Invalid MAC address %pMAC, using random.\n" , adapter->hw.mac.addr);
Signature · 1 line
1.8.5.GIT
PATCH 7/14 i40evf: don't guess device name
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
We don't need to set an interface name here; the net core will do that, and then it will get renamed by udev anyway.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0 -2
@@ -2086,8 +2086,6 @@ static void i40evf_init_task(struct work_struct *work)netif_carrier_off (netdev); -strcpy (netdev->name,"eth%d" ); - adapter->vsi.id = adapter->vsi_res->vsi_id; adapter->vsi.seid = adapter->vsi_res->vsi_id;/* dummy */ adapter->vsi.back = adapter;
Signature · 1 line
1.8.5.GIT
PATCH 8/14 i40evf: store ring size in ring structs
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
Keep the descriptor ring size in the actual ring structs instead of in the adapter struct. This enables us to use common tx and rx code with the i40e PF driver.
Also update copyrights.
--- drivers/net/ethernet/intel/i40evf/i40evf.h | 2 -- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 13 ++++++++----- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 --- 3 files changed, 8 insertions(+), 10 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf.h +0 -2
@@ -198,8 +198,6 @@ struct i40evf_adapter {/* RX */ struct i40e_ring *rx_rings[I40E_MAX_VSI_QP ]; -int txd_count; -int rxd_count;u64 hw_csum_rx_error;int num_msix_vectors;struct msix_entry *msix_entries;
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c +8 -5
@@ -1,7 +1,7 @@/******************************************************************************* * * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver -* Copyright(c) 2013 Intel Corporation. +* Copyright(c) 2013 - 2014 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -241,6 +241,7 @@ static int i40evf_set_ringparam(struct net_device *netdev, {struct i40evf_adapter *adapter =netdev_priv (netdev);u32 new_rx_count, new_tx_count; +int i;if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))return -EINVAL ;
@@ -256,12 +257,14 @@ static int i40evf_set_ringparam(struct net_device *netdev, new_rx_count =ALIGN (new_rx_count,I40EVF_REQ_DESCRIPTOR_MULTIPLE );/* if nothing to do return success */ -if ((new_tx_count == adapter->txd_count) && - (new_rx_count == adapter->rxd_count)) +if ((new_tx_count == adapter->tx_rings[0 ]->count) && + (new_rx_count == adapter->rx_rings[0 ]->count))return 0 ; - adapter->txd_count = new_tx_count; - adapter->rxd_count = new_rx_count; +for (i =0 ; i < adapter->vsi_res->num_queue_pairs; i++) { + adapter->tx_rings[0 ]->count = new_tx_count; + adapter->rx_rings[0 ]->count = new_rx_count; + }if (netif_running (netdev))i40evf_reinit_locked (adapter);
drivers/net/ethernet/intel/i40evf/i40evf_main.c +0 -3
@@ -2027,9 +2027,6 @@ static void i40evf_init_task(struct work_struct *work) adapter->flags |=I40EVF_FLAG_RX_CSUM_ENABLED ; - adapter->txd_count =I40EVF_DEFAULT_TXD ; - adapter->rxd_count =I40EVF_DEFAULT_RXD ; - netdev->netdev_ops = &i40evf_netdev_ops;i40evf_set_ethtool_ops (netdev); netdev->watchdog_timeo =5 *HZ ;
Signature · 1 line
1.8.5.GIT
Re: [net-next 08/14] i40evf: store ring size in ring structs
Quoted 3 lines · Aaron Brown
From: Mitch Williams <[email protected]>
Also update copyrights.
[.]
Quoted 3 lines
* Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
- * Copyright(c) 2013 Intel Corporation.
+ * Copyright(c) 2013 - 2014 Intel Corporation.
Since you have a separate patch for this (patch 09/14), may be you can move this change to 09/14?
thanks
//govind
PATCH 9/14 i40evf: update version and copyright date
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
A bunch of changes merit a new version number, and since these were made in the new year, update the copyright date.
--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2 -2
@@ -31,10 +31,10 @@ char i40evf_driver_name[] = "i40evf";static const char i40evf_driver_string[] ="Intel(R) XL710 X710 Virtual Function Network Driver" ; -#define DRV_VERSION "0.9.11" +#define DRV_VERSION "0.9.12"const char i40evf_driver_version[] =DRV_VERSION ;static const char i40evf_copyright[] = -"Copyright (c) 2013 Intel Corporation." ; +"Copyright (c) 2013 - 2014 Intel Corporation." ;/* i40evf_pci_tbl - PCI Device ID Table *
Signature · 1 line
1.8.5.GIT
PATCH 10/14 i40evf: remove errant space
In reply to Aaron BrownFrom: Mitch A Williams <[email protected]>
Remove a bogus space.
--- drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +1 -1
@@ -1229,7 +1229,7 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {#define I40E_AQC_ADD_CLOUD_TNL_TYPE_NGE 2#define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP 3 -__le32 tenant_id ; +__le32 tenant_id;u8 reserved[4 ];__le16 queue_number;#define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT 0
Signature · 1 line
1.8.5.GIT
PATCH 11/14 i40e: remove unnecessary delay
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
Ain't nothing gonna break my stride, nobody's gonna slow me down, oh no. I got to keep on moving.
This was originally put in for debugging just-in-case purposes and never removed.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +0 -1
@@ -671,7 +671,6 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr) complete_reset:/* reallocate vf resources to reset the VSI state */ i40e_free_vf_res (vf); -mdelay (10 );i40e_alloc_vf_res (vf);i40e_enable_vf_mappings (vf);set_bit (I40E_VF_STAT_ACTIVE , &vf->vf_states);
Signature · 1 line
1.8.5.GIT
PATCH 12/14 i40e: tighten up ring enable/disable flow
In reply to Aaron BrownFrom: Mitch Williams <[email protected]>
Change the do/while to a for loop, so we don't hit the delay each time, even when the register is ready for action.
Don't bother to set or clear the QENA_STAT bit as it is read-only.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 17 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +15 -17
@@ -3108,13 +3108,13 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable) pf_q = vsi->base_queue;for (i =0 ; i < vsi->num_queue_pairs; i++, pf_q++) { - j =1000 ; -do { -usleep_range (1000 ,2000 ); +for (j =0 ; j <50 ; j++) { tx_reg =rd32 (hw,I40E_QTX_ENA (pf_q)); - }while (j-- && ((tx_reg >>I40E_QTX_ENA_QENA_REQ_SHIFT ) - ^ (tx_reg >>I40E_QTX_ENA_QENA_STAT_SHIFT )) &1 ); - +if (((tx_reg >>I40E_QTX_ENA_QENA_REQ_SHIFT ) &1 ) == + ((tx_reg >>I40E_QTX_ENA_QENA_STAT_SHIFT ) &1 )) +break ; +usleep_range (1000 ,2000 ); + }/* Skip if the queue is already in the requested state */ if (enable && (tx_reg &I40E_QTX_ENA_QENA_STAT_MASK ))continue ;
@@ -3124,8 +3124,7 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)/* turn on/off the queue */ if (enable) {wr32 (hw,I40E_QTX_HEAD (pf_q),0 ); - tx_reg |=I40E_QTX_ENA_QENA_REQ_MASK | -I40E_QTX_ENA_QENA_STAT_MASK ; + tx_reg |=I40E_QTX_ENA_QENA_REQ_MASK ; }else { tx_reg &= ~I40E_QTX_ENA_QENA_REQ_MASK ; }
@@ -3172,12 +3171,13 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable) pf_q = vsi->base_queue;for (i =0 ; i < vsi->num_queue_pairs; i++, pf_q++) { - j =1000 ; -do { -usleep_range (1000 ,2000 ); +for (j =0 ; j <50 ; j++) { rx_reg =rd32 (hw,I40E_QRX_ENA (pf_q)); - }while (j-- && ((rx_reg >>I40E_QRX_ENA_QENA_REQ_SHIFT ) - ^ (rx_reg >>I40E_QRX_ENA_QENA_STAT_SHIFT )) &1 ); +if (((rx_reg >>I40E_QRX_ENA_QENA_REQ_SHIFT ) &1 ) == + ((rx_reg >>I40E_QRX_ENA_QENA_STAT_SHIFT ) &1 )) +break ; +usleep_range (1000 ,2000 ); + }if (enable) {/* is STAT set ? */
@@ -3191,11 +3191,9 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)/* turn on/off the queue */ if (enable) - rx_reg |=I40E_QRX_ENA_QENA_REQ_MASK | -I40E_QRX_ENA_QENA_STAT_MASK ; + rx_reg |=I40E_QRX_ENA_QENA_REQ_MASK ;else - rx_reg &= ~(I40E_QRX_ENA_QENA_REQ_MASK | -I40E_QRX_ENA_QENA_STAT_MASK ); + rx_reg &= ~I40E_QRX_ENA_QENA_REQ_MASK ;wr32 (hw,I40E_QRX_ENA (pf_q), rx_reg);/* wait for the change to finish */
Signature · 1 line
1.8.5.GIT
PATCH 13/14 i40e: Change MSIX to MSI-X
In reply to Aaron BrownFrom: Catherine Sullivan <[email protected]>
Fix inconsistent use of MSIX and MSI-X in messages.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++---- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -4
@@ -5946,7 +5946,7 @@ static int i40e_init_msix(struct i40e_pf *pf) }else if (vec ==I40E_MIN_MSIX ) {/* Adjust for minimal MSIX use */ -dev_info (&pf->pdev->dev,"Features disabled, not enough MSIX vectors\n" ); +dev_info (&pf->pdev->dev,"Features disabled, not enough MSI-X vectors\n" ); pf->flags &= ~I40E_FLAG_VMDQ_ENABLED ; pf->num_vmdq_vsis =0 ; pf->num_vmdq_qps =0 ;
@@ -6075,7 +6075,7 @@ static void i40e_init_interrupt_scheme(struct i40e_pf *pf)if (!(pf->flags &I40E_FLAG_MSIX_ENABLED ) && (pf->flags &I40E_FLAG_MSI_ENABLED )) { -dev_info (&pf->pdev->dev,"MSIX not available, trying MSI\n" ); +dev_info (&pf->pdev->dev,"MSI-X not available, trying MSI\n" ); err =pci_enable_msi (pf->pdev);if (err) {dev_info (&pf->pdev->dev,"MSI init failed - %d\n" , err);
@@ -6084,7 +6084,7 @@ static void i40e_init_interrupt_scheme(struct i40e_pf *pf) }if (!(pf->flags & (I40E_FLAG_MSIX_ENABLED |I40E_FLAG_MSI_ENABLED ))) -dev_info (&pf->pdev->dev,"MSIX and MSI not available, falling back to Legacy IRQ\n" ); +dev_info (&pf->pdev->dev,"MSI-X and MSI not available, falling back to Legacy IRQ\n" );/* track first vector for misc interrupts */ err =i40e_get_lump (pf, pf->irq_pile,1 ,I40E_PILE_VALID_BIT -1 );
@@ -6111,7 +6111,8 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf) i40e_intr, 0, pf->misc_int_name, pf);if (err) {dev_info (&pf->pdev->dev, -"request_irq for msix_misc failed: %d\n" , err); +"request_irq for %s failed: %d\n" , + pf->misc_int_name, err);return -EFAULT ; } }
drivers/net/ethernet/intel/i40evf/i40evf_main.c +2 -1
@@ -524,7 +524,8 @@ static int i40evf_request_misc_irq(struct i40evf_adapter *adapter) adapter->misc_vector_name, netdev);if (err) {dev_err (&adapter->pdev->dev, -"request_irq for msix_aq failed: %d\n" , err); +"request_irq for %s failed: %d\n" , + adapter->misc_vector_name, err);free_irq (adapter->msix_entries[0 ].vector, netdev); }return err;
Signature · 1 line
1.8.5.GIT
PATCH 14/14 i40e and i40evf: Bump driver versions
In reply to Aaron BrownFrom: Catherine Sullivan <[email protected]>
Update the driver versions.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -38,7 +38,7 @@ static const char i40e_driver_string[] =#define DRV_VERSION_MAJOR 0#define DRV_VERSION_MINOR 3 -#define DRV_VERSION_BUILD 31 +#define DRV_VERSION_BUILD 32#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ __stringify(DRV_VERSION_MINOR) "." \ __stringify(DRV_VERSION_BUILD) DRV_KERN
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -1
@@ -31,7 +31,7 @@ char i40evf_driver_name[] = "i40evf";static const char i40evf_driver_string[] ="Intel(R) XL710 X710 Virtual Function Network Driver" ; -#define DRV_VERSION "0.9.12" +#define DRV_VERSION "0.9.13"const char i40evf_driver_version[] =DRV_VERSION ;static const char i40evf_copyright[] ="Copyright (c) 2013 - 2014 Intel Corporation." ;
Signature · 1 line
1.8.5.GIT