All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04
@ 2021-06-04 16:08 Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba; +Cc: Tony Nguyen, netdev, sassmann

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Tony Nguyen
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Brett Creeley, netdev, sassmann, anthony.l.nguyen, Konrad Jankowski

From: Brett Creeley <brett.creeley@intel.com>

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 <brett.creeley@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 7f7653906fce..d70ee573fde5 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -200,6 +200,8 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)
 		break;
 	case ICE_VSI_VF:
 		vf = &pf->vf[vsi->vf_id];
+		if (vf->num_req_qs)
+			vf->num_vf_qs = vf->num_req_qs;
 		vsi->alloc_txq = vf->num_vf_qs;
 		vsi->alloc_rxq = vf->num_vf_qs;
 		/* pf->num_msix_per_vf includes (VF miscellaneous vector +
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 3/6] ice: handle the VF VSI rebuild failure Tony Nguyen
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Brett Creeley, netdev, sassmann, anthony.l.nguyen, Konrad Jankowski

From: Brett Creeley <brett.creeley@intel.com>

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 <brett.creeley@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
index de38a0fc9665..9b8300d4a267 100644
--- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
+++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
@@ -31,6 +31,7 @@
 #define PF_FW_ATQLEN_ATQOVFL_M			BIT(29)
 #define PF_FW_ATQLEN_ATQCRIT_M			BIT(30)
 #define VF_MBX_ARQLEN(_VF)			(0x0022BC00 + ((_VF) * 4))
+#define VF_MBX_ATQLEN(_VF)			(0x0022A800 + ((_VF) * 4))
 #define PF_FW_ATQLEN_ATQENABLE_M		BIT(31)
 #define PF_FW_ATQT				0x00080400
 #define PF_MBX_ARQBAH				0x0022E400
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index a1d22d2aa0bd..944d861c8579 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -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
-	 * in the case of VFR. If this is done for PFR, it can mess up VF
-	 * resets because the VF driver may already have started cleanup
-	 * by the time we get here.
+	/* VF_MBX_ARQLEN and VF_MBX_ATQLEN are cleared by PFR, so the driver
+	 * needs to clear them in the case of VFR/VFLR. If this is done for
+	 * PFR, it can mess up VF resets because the VF driver may already
+	 * have started cleanup by the time we get here.
 	 */
-	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
 	 * just need to clean up, so don't hit the VFRTRIG register.
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 3/6] ice: handle the VF VSI rebuild failure
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 4/6] ice: report supported and advertised autoneg using PHY capabilities Tony Nguyen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Haiyue Wang, netdev, sassmann, anthony.l.nguyen, Konrad Jankowski

From: Haiyue Wang <haiyue.wang@intel.com>

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 <haiyue.wang@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 944d861c8579..97a46c616aca 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -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);
+		return false;
+	}
+
 	ice_vf_post_vsi_rebuild(vf);
 
 	/* if the VF has been reset allow it to come up again */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 4/6] ice: report supported and advertised autoneg using PHY capabilities
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
                   ` (2 preceding siblings ...)
  2021-06-04 16:08 ` [PATCH net 3/6] ice: handle the VF VSI rebuild failure Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 5/6] ice: Allow all LLDP packets from PF to Tx Tony Nguyen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Paul Greenwalt, netdev, sassmann, anthony.l.nguyen, Tony Brelinski

From: Paul Greenwalt <paul.greenwalt@intel.com>

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 <paul.greenwalt@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index d9ddd0bcf65f..99301ad95290 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -1773,49 +1773,6 @@ ice_phy_type_to_ethtool(struct net_device *netdev,
 		ice_ethtool_advertise_link_mode(ICE_AQ_LINK_SPEED_100GB,
 						100000baseKR4_Full);
 	}
-
-	/* Autoneg PHY types */
-	if (phy_types_low & ICE_PHY_TYPE_LOW_100BASE_TX ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_1000BASE_T ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_1000BASE_KX ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_2500BASE_T ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_2500BASE_KX ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_5GBASE_T ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_5GBASE_KR ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_10GBASE_T ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_10GBASE_KR_CR1 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_T ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_CR ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_CR_S ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_CR1 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_KR ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_KR_S ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_25GBASE_KR1 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_40GBASE_CR4 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_40GBASE_KR4) {
-		ethtool_link_ksettings_add_link_mode(ks, supported,
-						     Autoneg);
-		ethtool_link_ksettings_add_link_mode(ks, advertising,
-						     Autoneg);
-	}
-	if (phy_types_low & ICE_PHY_TYPE_LOW_50GBASE_CR2 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_50GBASE_KR2 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_50GBASE_CP ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_50GBASE_KR_PAM4) {
-		ethtool_link_ksettings_add_link_mode(ks, supported,
-						     Autoneg);
-		ethtool_link_ksettings_add_link_mode(ks, advertising,
-						     Autoneg);
-	}
-	if (phy_types_low & ICE_PHY_TYPE_LOW_100GBASE_CR4 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_100GBASE_KR4 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_100GBASE_KR_PAM4 ||
-	    phy_types_low & ICE_PHY_TYPE_LOW_100GBASE_CP2) {
-		ethtool_link_ksettings_add_link_mode(ks, supported,
-						     Autoneg);
-		ethtool_link_ksettings_add_link_mode(ks, advertising,
-						     Autoneg);
-	}
 }
 
 #define TEST_SET_BITS_TIMEOUT	50
@@ -1972,9 +1929,7 @@ ice_get_link_ksettings(struct net_device *netdev,
 		ks->base.port = PORT_TP;
 		break;
 	case ICE_MEDIA_BACKPLANE:
-		ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg);
 		ethtool_link_ksettings_add_link_mode(ks, supported, Backplane);
-		ethtool_link_ksettings_add_link_mode(ks, advertising, Autoneg);
 		ethtool_link_ksettings_add_link_mode(ks, advertising,
 						     Backplane);
 		ks->base.port = PORT_NONE;
@@ -2049,6 +2004,12 @@ ice_get_link_ksettings(struct net_device *netdev,
 	if (caps->link_fec_options & ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN)
 		ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
 
+	/* Set supported and advertised autoneg */
+	if (ice_is_phy_caps_an_enabled(caps)) {
+		ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg);
+		ethtool_link_ksettings_add_link_mode(ks, advertising, Autoneg);
+	}
+
 done:
 	kfree(caps);
 	return err;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 5/6] ice: Allow all LLDP packets from PF to Tx
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
                   ` (3 preceding siblings ...)
  2021-06-04 16:08 ` [PATCH net 4/6] ice: report supported and advertised autoneg using PHY capabilities Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 16:08 ` [PATCH net 6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs Tony Nguyen
  2021-06-04 21:40 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 patchwork-bot+netdevbpf
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Dave Ertman, netdev, sassmann, anthony.l.nguyen, Tony Brelinski

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 <tonyx.brelinski@intel.com>
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(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 93e5d9ebfd74..04748aa4c7c8 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -2149,6 +2149,7 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_ring *tx_ring)
 	struct ice_tx_offload_params offload = { 0 };
 	struct ice_vsi *vsi = tx_ring->vsi;
 	struct ice_tx_buf *first;
+	struct ethhdr *eth;
 	unsigned int count;
 	int tso, csum;
 
@@ -2195,7 +2196,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_ring *tx_ring)
 		goto out_drop;
 
 	/* allow CONTROL frames egress from main VSI if FW LLDP disabled */
-	if (unlikely(skb->priority == TC_PRIO_CONTROL &&
+	eth = (struct ethhdr *)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 |
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net 6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
                   ` (4 preceding siblings ...)
  2021-06-04 16:08 ` [PATCH net 5/6] ice: Allow all LLDP packets from PF to Tx Tony Nguyen
@ 2021-06-04 16:08 ` Tony Nguyen
  2021-06-04 21:40 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 patchwork-bot+netdevbpf
  6 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:08 UTC (permalink / raw)
  To: davem, kuba
  Cc: Geert Uytterhoeven, netdev, sassmann, anthony.l.nguyen,
	kernel test robot, Jesse Brandeburg

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 <lkp@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 include/linux/avf/virtchnl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 565deea6ffe8..8612f8fc86c1 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -830,6 +830,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_proto_hdr);
 
 struct virtchnl_proto_hdrs {
 	u8 tunnel_level;
+	u8 pad[3];
 	/**
 	 * specify where protocol header start from.
 	 * 0 - from the outer layer
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04
  2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
                   ` (5 preceding siblings ...)
  2021-06-04 16:08 ` [PATCH net 6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs Tony Nguyen
@ 2021-06-04 21:40 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-04 21:40 UTC (permalink / raw)
  To: Tony Nguyen; +Cc: davem, kuba, netdev, sassmann

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.
> 
> [...]

Here is the summary with links:
  - [net,1/6] ice: Fix allowing VF to request more/less queues via virtchnl
    https://git.kernel.org/netdev/net/c/f0457690af56
  - [net,2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared
    https://git.kernel.org/netdev/net/c/8679f07a9922
  - [net,3/6] ice: handle the VF VSI rebuild failure
    https://git.kernel.org/netdev/net/c/c7ee6ce1cf60
  - [net,4/6] ice: report supported and advertised autoneg using PHY capabilities
    https://git.kernel.org/netdev/net/c/5cd349c349d6
  - [net,5/6] ice: Allow all LLDP packets from PF to Tx
    https://git.kernel.org/netdev/net/c/f9f83202b726
  - [net,6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs
    https://git.kernel.org/netdev/net/c/519d8ab17682

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-04 21:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
2021-06-04 16:08 ` [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
2021-06-04 16:08 ` [PATCH net 2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Tony Nguyen
2021-06-04 16:08 ` [PATCH net 3/6] ice: handle the VF VSI rebuild failure Tony Nguyen
2021-06-04 16:08 ` [PATCH net 4/6] ice: report supported and advertised autoneg using PHY capabilities Tony Nguyen
2021-06-04 16:08 ` [PATCH net 5/6] ice: Allow all LLDP packets from PF to Tx Tony Nguyen
2021-06-04 16:08 ` [PATCH net 6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs Tony Nguyen
2021-06-04 21:40 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.