From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:55
This series contains updates to ixgbe and ixgbevf only.
Shannon Nelson provides three fixes to the ipsec portion of ixgbe. Make
sure we are using 128-bit authentication, since it is the only size
supported for hardware offload. Fixed the transmit trailer length
calculation for ipsec by finding the padding value and adding it to the
authentication length, then save it off so that we can put it in the
transmit descriptor to tell the device where to stop the checksum
calculation. Lastly, cleaned up useless and dead code.
Tonghao Zhang adds a ethtool stat for receive length errors, since the
driver was already collecting this counter.
Arnd Bergmann fixed a warning about an used variable by "rephrasing" the
code so that the compiler can see the use of the variable in question.
Paul fixes an issue where "HIDE_VLAN" was being cleared on VF reset, so
ensure to set "HIDE_VLAN" when port VLAN is enabled after a VF reset.
The following are changes since commit 8b4c6ed2ed0e3d53e93e20e3f20cadf0d1a47483:
Merge branch 'hns3-next'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 10GbE
Arnd Bergmann (1):
ixgbevf: fix unused variable warning
Paul Greenwalt (1):
ixgbe: fix disabling hide VLAN on VF reset
Shannon Nelson (3):
ixgbe: check for 128-bit authentication
ixgbe: fix ipsec trailer length
ixgbe: remove unneeded ipsec state free callback
Tonghao Zhang (1):
ixgbe: Add receive length error counter
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 53 +++++++++++++++--------
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6 ++-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 10 ++---
5 files changed, 46 insertions(+), 25 deletions(-)
--
2.14.3
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:54
From: Paul Greenwalt <redacted>
If port VLAN is enabled, set PFQDE.HIDE_VLAN during VF reset.
Setting only PFQDE.PFQDE during VF reset was clearing PFQDE.HIDE_VLAN.
Signed-off-by: Paul Greenwalt <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -831,7 +831,11 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)IXGBE_WRITE_REG(hw,IXGBE_VFTE(reg_offset),reg);/* force drop enable for all VF Rx queues */-ixgbe_write_qde(adapter,vf,IXGBE_QDE_ENABLE);+reg=IXGBE_QDE_ENABLE;+if(adapter->vfinfo[vf].pf_vlan)+reg|=IXGBE_QDE_HIDE_VLAN;++ixgbe_write_qde(adapter,vf,reg);/* enable receive for vf */reg=IXGBE_READ_REG(hw,IXGBE_VFRE(reg_offset));
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:55
From: Shannon Nelson <redacted>
Make sure the Security Association is using
a 128-bit authentication, since that's the only
size that the hardware offload supports.
Signed-off-by: Shannon Nelson <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 16 +++++++++++-----
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 1 +
2 files changed, 12 insertions(+), 5 deletions(-)
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:55
From: Tonghao Zhang <redacted>
ixgbe enabled rlec counter and the rx_error used it.
We can export the counter directly via ethtool -S ethX.
Signed-off-by: Tonghao Zhang <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 +
1 file changed, 1 insertion(+)
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:55
From: Arnd Bergmann <arnd@arndb.de>
The new ixgbevf_set_rx_buffer_len() function causes a harmless warnings
in configurations with large page size:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function 'ixgbevf_set_rx_buffer_len':
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1758:15: error: unused variable 'max_frame' [-Werror=unused-variable]
This rephrases the code so that the compiler can see the use of that
variable, making it slightly easier to read in the process.
Fixes: f15c5ba5b6cd ("ixgbevf: add support for using order 1 pages to receive large frames")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Andrew Bowers <redacted>
Acked-by: Alexander Duyck <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:56
From: Shannon Nelson <redacted>
Fix up the Tx trailer length calculation. We can't believe the
trailer len from the xstate information because it was calculated
before the packet was put together and padding added. This bit
of code finds the padding value in the trailer, adds it to the
authentication length, and saves it so later we can put it into
the Tx descriptor to tell the device where to stop the checksum
calculation.
Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload")
Signed-off-by: Shannon Nelson <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
@@ -789,11 +789,33 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,itd->flags=0;if(xs->id.proto==IPPROTO_ESP){+structsk_buff*skb=first->skb;+intret,authlen,trailerlen;+u8padlen;+itd->flags|=IXGBE_ADVTXD_TUCMD_IPSEC_TYPE_ESP|IXGBE_ADVTXD_TUCMD_L4T_TCP;if(first->protocol==htons(ETH_P_IP))itd->flags|=IXGBE_ADVTXD_TUCMD_IPV4;-itd->trailer_len=xs->props.trailer_len;++/* The actual trailer length is authlen (16 bytes) plus+*2bytesfortheprotoandthepadlenvalues,plus+*padlenbytesofpadding.Thisendsupnotthesame+*asthestaticvaluefoundinxs->props.trailer_len(21).+*+*The"correct"waytogettheauthlengthwouldbetouse+*authlen=crypto_aead_authsize(xs->data);+*butsinceweknowweonlyhaveonesizetoworryabout+*wecanletthecompilerusetheconstantandsaveusa+*fewCPUcycles.+*/+authlen=IXGBE_IPSEC_AUTH_BITS/8;++ret=skb_copy_bits(skb,skb->len-(authlen+2),&padlen,1);+if(unlikely(ret))+return0;+trailerlen=authlen+2+padlen;+itd->trailer_len=trailerlen;}if(tsa->encrypt)itd->flags|=IXGBE_ADVTXD_TUCMD_IPSEC_ENCRYPT_EN;
From: Jeff Kirsher <hidden> Date: 2018-03-12 20:11:56
From: Shannon Nelson <redacted>
With commit 7f05b467a735 ("xfrm: check for xdo_dev_state_free")
we no longer need to add an empty callback function
to the driver, so now let's remove the useless code.
Signed-off-by: Shannon Nelson <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 13 -------------
1 file changed, 13 deletions(-)