From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:10:30
This series contains updates to virtchnl header file and ice driver.
Brett fixes VF being unable to request a different number of queues then
allocated and adds clearing of VF_MBX_ATQLEN register for VF reset.
Haiyue handles error of rebuilding VF VSI during reset.
Paul fixes reporting of autoneg to use the PHY capabilities.
Dave allows LLDP packets without priority of TC_PRIO_CONTROL to be
transmitted.
Geert Uytterhoeven adds explicit padding to virtchnl_proto_hdrs
structure in the virtchnl header file.
The following are changes since commit 1a8024239dacf53fcf39c0f07fbf2712af22864f:
virtio-net: fix for skb_over_panic inside big mode
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE
Brett Creeley (2):
ice: Fix allowing VF to request more/less queues via virtchnl
ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared
Dave Ertman (1):
ice: Allow all LLDP packets from PF to Tx
Geert Uytterhoeven (1):
virtchnl: Add missing padding to virtchnl_proto_hdrs
Haiyue Wang (1):
ice: handle the VF VSI rebuild failure
Paul Greenwalt (1):
ice: report supported and advertised autoneg using PHY capabilities
drivers/net/ethernet/intel/ice/ice_ethtool.c | 51 +++----------------
.../net/ethernet/intel/ice/ice_hw_autogen.h | 1 +
drivers/net/ethernet/intel/ice/ice_lib.c | 2 +
drivers/net/ethernet/intel/ice/ice_txrx.c | 5 +-
.../net/ethernet/intel/ice/ice_virtchnl_pf.c | 19 ++++---
include/linux/avf/virtchnl.h | 1 +
6 files changed, 27 insertions(+), 52 deletions(-)
--
2.26.2
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:09:43
From: Paul Greenwalt <redacted>
Ethtool incorrectly reported supported and advertised auto-negotiation
settings for a backplane PHY image which did not support auto-negotiation.
This can occur when using media or PHY type for reporting ethtool
supported and advertised auto-negotiation settings.
Remove setting supported and advertised auto-negotiation settings based
on PHY type in ice_phy_type_to_ethtool(), and MAC type in
ice_get_link_ksettings().
Ethtool supported and advertised auto-negotiation settings should be
based on the PHY image using the AQ command get PHY capabilities with
media. Add setting supported and advertised auto-negotiation settings
based get PHY capabilities with media in ice_get_link_ksettings().
Fixes: 48cb27f2fd18 ("ice: Implement handlers for ethtool PHY/link operations")
Signed-off-by: Paul Greenwalt <redacted>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_ethtool.c | 51 +++-----------------
1 file changed, 6 insertions(+), 45 deletions(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:09:44
From: Geert Uytterhoeven <geert@linux-m68k.org>
On m68k (Coldfire M547x):
CC drivers/net/ethernet/intel/i40e/i40e_main.o
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:41,
from drivers/net/ethernet/intel/i40e/i40e_main.c:12:
include/linux/avf/virtchnl.h:153:36: warning: division by zero [-Wdiv-by-zero]
153 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:844:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:844:33: error: enumerator value for ‘virtchnl_static_assert_virtchnl_proto_hdrs’ is not an integer constant
844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
| ^~~~~~~~~~~~~~~~~~~
On m68k, integers are aligned on addresses that are multiples of two,
not four, bytes. Hence the size of a structure containing integers may
not be divisible by 4.
Fix this by adding explicit padding.
Fixes: 1f7ea1cd6a374842 ("ice: Enable FDIR Configure for AVF")
Reported-by: kernel test robot <redacted>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jesse Brandeburg <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
include/linux/avf/virtchnl.h | 1 +
1 file changed, 1 insertion(+)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:09:45
From: Dave Ertman <david.m.ertman@intel.com>
Currently in the ice driver, the check whether to
allow a LLDP packet to egress the interface from the
PF_VSI is being based on the SKB's priority field.
It checks to see if the packets priority is equal to
TC_PRIO_CONTROL. Injected LLDP packets do not always
meet this condition.
SCAPY defaults to a sk_buff->protocol value of ETH_P_ALL
(0x0003) and does not set the priority field. There will
be other injection methods (even ones used by end users)
that will not correctly configure the socket so that
SKB fields are correctly populated.
Then ethernet header has to have to correct value for
the protocol though.
Add a check to also allow packets whose ethhdr->h_proto
matches ETH_P_LLDP (0x88CC).
Fixes: 0c3a6101ff2d ("ice: Allow egress control packets from PF_VSI")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_txrx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -2195,7 +2196,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_ring *tx_ring)gotoout_drop;/* allow CONTROL frames egress from main VSI if FW LLDP disabled */-if(unlikely(skb->priority==TC_PRIO_CONTROL&&+eth=(structethhdr*)skb_mac_header(skb);+if(unlikely((skb->priority==TC_PRIO_CONTROL||+eth->h_proto==htons(ETH_P_LLDP))&&vsi->type==ICE_VSI_PF&&vsi->port_info->qos_cfg.is_sw_lldp))offload.cd_qw1|=(u64)(ICE_TX_DESC_DTYPE_CTX|
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:10:31
From: Brett Creeley <redacted>
Some AVF drivers expect the VF_MBX_ATQLEN register to be cleared for any
type of VFR/VFLR. Fix this by clearing the VF_MBX_ATQLEN register at the
same time as VF_MBX_ARQLEN.
Fixes: 82ba01282cf8 ("ice: clear VF ARQLEN register on reset")
Signed-off-by: Brett Creeley <redacted>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 1 +
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
@@ -713,13 +713,15 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr, bool is_pfr)*/clear_bit(ICE_VF_STATE_INIT,vf->vf_states);-/* VF_MBX_ARQLEN is cleared by PFR, so the driver needs to clear it-*inthecaseofVFR.IfthisisdoneforPFR,itcanmessupVF-*resetsbecausetheVFdrivermayalreadyhavestartedcleanup-*bythetimewegethere.+/* VF_MBX_ARQLEN and VF_MBX_ATQLEN are cleared by PFR, so the driver+*needstocleartheminthecaseofVFR/VFLR.Ifthisisdonefor+*PFR,itcanmessupVFresetsbecausetheVFdrivermayalready+*havestartedcleanupbythetimewegethere.*/-if(!is_pfr)+if(!is_pfr){wr32(hw,VF_MBX_ARQLEN(vf->vf_id),0);+wr32(hw,VF_MBX_ATQLEN(vf->vf_id),0);+}/* In the case of a VFLR, the HW has already reset the VF and we*justneedtocleanup,sodon'thittheVFRTRIGregister.
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:10:32
From: Brett Creeley <redacted>
Commit 12bb018c538c ("ice: Refactor VF reset") caused a regression
that removes the ability for a VF to request a different amount of
queues via VIRTCHNL_OP_REQUEST_QUEUES. This prevents VF drivers to
either increase or decrease the number of queue pairs they are
allocated. Fix this by using the variable vf->num_req_qs when
determining the vf->num_vf_qs during VF VSI creation.
Fixes: 12bb018c538c ("ice: Refactor VF reset")
Signed-off-by: Brett Creeley <redacted>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++
1 file changed, 2 insertions(+)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-06-04 16:10:45
From: Haiyue Wang <redacted>
VSI rebuild can be failed for LAN queue config, then the VF's VSI will
be NULL, the VF reset should be stopped with the VF entering into the
disable state.
Fixes: 12bb018c538c ("ice: Refactor VF reset")
Signed-off-by: Haiyue Wang <redacted>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -1700,7 +1700,12 @@ bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)ice_vf_ctrl_vsi_release(vf);ice_vf_pre_vsi_rebuild(vf);-ice_vf_rebuild_vsi_with_release(vf);++if(ice_vf_rebuild_vsi_with_release(vf)){+dev_err(dev,"Failed to release and setup the VF%u's VSI\n",vf->vf_id);+returnfalse;+}+ice_vf_post_vsi_rebuild(vf);/* if the VF has been reset allow it to come up again */
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Fri, 4 Jun 2021 09:08:10 -0700 you wrote:
This series contains updates to virtchnl header file and ice driver.
Brett fixes VF being unable to request a different number of queues then
allocated and adds clearing of VF_MBX_ATQLEN register for VF reset.
Haiyue handles error of rebuilding VF VSI during reset.
[...]