From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:56
The following series contains updates to ixgb and ixgbe. The ixgb patch
does the conversion to ndo_fix_features. The remaining patches are for
ixgbe to do the following:
- cleanup register reads, comments, memory allocations
- add SFP support for 82598 PHY and overheat sensor code
- fix register dump for X50
The following are changes since commit f78a5fda9116525809d088917638be912b85f838:
Revert "Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path"
and are available in the git repository at:
git://github.com/Jkirsher/net-next.git
Alexander Duyck (7):
ixgbe: remove redundant configuration of tx_sample_rate
v2 ixgbe: Update packet buffer reservation to correct fdir headroom
size
ixgbe: make ixgbe_up and ixgbe_up_complete void functions
ixgbe: Add missing code for enabling overheat sensor interrupt
ixgbe: Add SFP support for missed 82598 PHY
ixgbe: drop adapter from ixgbe_fso call documentation
ixgbe: Make better use of memory allocations in one-buffer mode w/
RSC
Emil Tantilov (3):
ixgbe: cleanup some register reads
ixgbe: fix FCRTL/H register dump for X540
ixgbe: remove duplicate netif_tx_start_all_queues
Michał Mirosław (1):
ixgb: convert to ndo_fix_features
drivers/net/ethernet/intel/ixgb/ixgb.h | 2 +
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | 59 +----------
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 31 +++++-
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 13 ++-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 -
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 126 ++++++++++++----------
7 files changed, 112 insertions(+), 123 deletions(-)
--
1.7.6
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:56
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.
Things noticed:
- ixgb has RX csum disabled by default
- HW VLAN acceleration probably can be toggled, but it's left as is
- the resets on RX csum offload change can probably be avoided
- there is A LOT of copy-and-pasted code here
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgb/ixgb.h | 2 +
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | 59 +-----------------------
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 31 +++++++++++-
3 files changed, 31 insertions(+), 61 deletions(-)
@@ -115,7 +115,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)return0;}-staticvoidixgb_set_speed_duplex(structnet_device*netdev)+voidixgb_set_speed_duplex(structnet_device*netdev){structixgb_adapter*adapter=netdev_priv(netdev);/* be optimistic about our link, since we were up before */
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:57
From: Alexander Duyck <redacted>
This change fixes a minor redundancy in that tx_sample_rate was set twice.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:57
From: Alexander Duyck <redacted>
This change fixes an issue in which the incorrect amount of headroom was
being reserved for flow director filters.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:58
From: Alexander Duyck <redacted>
ixgbe_up and ixgbe_up_complete will always return 0. Since this doesn't
provide any useful information we might as well just make them both void
and save ourselves from having to return an unused value.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 23 ++++++-----------------
2 files changed, 7 insertions(+), 18 deletions(-)
@@ -3614,8 +3614,6 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)ctrl_ext=IXGBE_READ_REG(hw,IXGBE_CTRL_EXT);ctrl_ext|=IXGBE_CTRL_EXT_PFRSTD;IXGBE_WRITE_REG(hw,IXGBE_CTRL_EXT,ctrl_ext);--return0;}voidixgbe_reinit_locked(structixgbe_adapter*adapter)
@@ -3639,12 +3637,12 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)clear_bit(__IXGBE_RESETTING,&adapter->state);}-intixgbe_up(structixgbe_adapter*adapter)+voidixgbe_up(structixgbe_adapter*adapter){/* hardware has been reset, we need to reload some things */ixgbe_configure(adapter);-returnixgbe_up_complete(adapter);+ixgbe_up_complete(adapter);}voidixgbe_reset(structixgbe_adapter*adapter)
@@ -5186,17 +5184,12 @@ static int ixgbe_open(struct net_device *netdev)if(err)gotoerr_req_irq;-err=ixgbe_up_complete(adapter);-if(err)-gotoerr_up;+ixgbe_up_complete(adapter);netif_tx_start_all_queues(netdev);return0;-err_up:-ixgbe_release_hw_control(adapter);-ixgbe_free_irq(adapter);err_req_irq:err_setup_rx:ixgbe_free_all_rx_resources(adapter);
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:59
From: Alexander Duyck <redacted>
This change adds a small bit of missing code for enabling the overheat sensor
Signed-off-by: Alexander Duyck <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:15:59
From: Alexander Duyck <redacted>
One of the 82598 phys was not being correctly identified as being SFP.
This change corrects that.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:16:00
From: Alexander Duyck <redacted>
The adapter structure was removed from the call so it can be dropped from
the ixgbe_fso documentation.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Ross Brattain <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:16:00
From: Alexander Duyck <redacted>
This patch improves the memory utilization with RSC when in one-buffer
mode. This is accomplished by making the default buffer sizes match up
with the standard memory allocation sizes minus 1K for shared info and
padding overhead. By doing this CPU utilization when doing large receives
can be reduced by as much as 8%.
Signed-off-by: Alexander Duyck <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 11 ++++--
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 41 ++++++++++++++-------
3 files changed, 35 insertions(+), 19 deletions(-)
@@ -2879,17 +2879,6 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)if(hw->mac.type==ixgbe_mac_82599EB)adapter->flags&=~IXGBE_FLAG_RX_PS_ENABLED;-/* Set the RX buffer length according to the mode */-if(adapter->flags&IXGBE_FLAG_RX_PS_ENABLED){-rx_buf_len=IXGBE_RX_HDR_SIZE;-}else{-if(!(adapter->flags2&IXGBE_FLAG2_RSC_ENABLED)&&-(netdev->mtu<=ETH_DATA_LEN))-rx_buf_len=MAXIMUM_ETHERNET_VLAN_SIZE;-else-rx_buf_len=ALIGN(max_frame+VLAN_HLEN,1024);-}-#ifdef IXGBE_FCOE/* adjust max frame to be able to do baby jumbo for FCoE */if((adapter->flags&IXGBE_FLAG_FCOE_ENABLED)&&
@@ -2905,6 +2894,30 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)IXGBE_WRITE_REG(hw,IXGBE_MHADD,mhadd);}+/* MHADD will allow an extra 4 bytes past for vlan tagged frames */+max_frame+=VLAN_HLEN;++/* Set the RX buffer length according to the mode */+if(adapter->flags&IXGBE_FLAG_RX_PS_ENABLED){+rx_buf_len=IXGBE_RX_HDR_SIZE;+}else{+if(!(adapter->flags2&IXGBE_FLAG2_RSC_ENABLED)&&+(netdev->mtu<=ETH_DATA_LEN))+rx_buf_len=MAXIMUM_ETHERNET_VLAN_SIZE;+/*+*Makebestuseofallocationbyusingallbut1Kofa+*powerof2allocationthatwillbeusedforskb->head.+*/+elseif(max_frame<=IXGBE_RXBUFFER_3K)+rx_buf_len=IXGBE_RXBUFFER_3K;+elseif(max_frame<=IXGBE_RXBUFFER_7K)+rx_buf_len=IXGBE_RXBUFFER_7K;+elseif(max_frame<=IXGBE_RXBUFFER_15K)+rx_buf_len=IXGBE_RXBUFFER_15K;+else+rx_buf_len=IXGBE_MAX_RXBUFFER;+}+hlreg0=IXGBE_READ_REG(hw,IXGBE_HLREG0);/* set jumbo enable since MHADD.MFS is keeping size locked at max_frame */hlreg0|=IXGBE_HLREG0_JUMBOEN;
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:16:01
From: Emil Tantilov <redacted>
Remove duplicate inc of hwstats->ruc
Introduce separate loops for 8 and 16 register reads.
Consolidate mac checks under one case.
Make sure registers are cleared on read.
Reported-by: Jonathan Lynch <redacted>
Signed-off-by: Emil Tantilov <redacted>
CC: Jonathan Lynch <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 30 +++++++++++++++++-------
1 files changed, 21 insertions(+), 9 deletions(-)
From: Jeff Kirsher <hidden> Date: 2011-09-17 02:16:03
From: Emil Tantilov <redacted>
netif_tx_start_all_queues() is already called in ixgbe_up_complete, no need
to do it twice.
Signed-off-by: Emil Tantilov <redacted>
Tested-by: Phil Schmitt <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
Is there any real reason to do this?
It looks overly complicated for no benefit.
Why not just use something like:
netdev->hw_features = foo;
netdev->features = bar;
or maybe use #defines like:
#define FEATURES_DEFAULT (NETIF_F_NETIF_F_SG | NETIF_F_TSO | NETIF_F_HW_CSUM)
#define FEATURES_HW_VLAN (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)
and
netdev->features = FEATURES_DEFAULT | FEATURES_HW_VLAN;
netdev->hw_features = FEATURES_DEFAULT | NETIF_F_RXCSUM;
From: Michał Mirosław <mirq-linux@rere.qmqm.pl> Date: 2011-09-17 13:21:55
On Fri, Sep 16, 2011 at 07:15:42PM -0700, Jeff Kirsher wrote:
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.
[...]
Hmm. Looks like this patch is not complete: part removing get/set_flags
from ethtool_ops is missing. I don't remember if this was included or not
in the patch I sent originally. I'm attaching it now, rebased on current
net-next (not tested).
Best Regards,
Michał Mirosław
---
Finish conversion to unified ethtool ops: convert get_flags.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
From: Jeff Kirsher <hidden> Date: 2011-09-20 00:02:49
On Sat, 2011-09-17 at 06:21 -0700, Michał Mirosław wrote:
On Fri, Sep 16, 2011 at 07:15:42PM -0700, Jeff Kirsher wrote:
quoted
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Private rx_csum flags are now duplicate of netdev->features &
NETIF_F_RXCSUM.
quoted
Removing this needs deeper surgery.
[...]
Hmm. Looks like this patch is not complete: part removing
get/set_flags
from ethtool_ops is missing. I don't remember if this was included or
not
in the patch I sent originally. I'm attaching it now, rebased on
current
net-next (not tested).
Best Regards,
Michał Mirosław
---
Finish conversion to unified ethtool ops: convert get_flags.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Thanks Michal, I have added the patch to my queue.
From: Jeff Kirsher <hidden> Date: 2011-10-08 02:04:10
On 10/07/2011 01:47 PM, � wrote:
quoted
quoted
I see that only a single driver left: igbvf. What's the status
quoted
quoted
on its conversion?
Just waiting on validation at this point to verify the patch we have. I
will see if I can get this patch verified and pushed asap.
Ping?
There is no change as of yet, all I can say is it will be done. I am
almost at the point of submitting it upstream and fix it later at this
point. I share any frustration you may have regarding this conversion.