From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-03-25 22:30:50
This series contains updates to virtchnl header file and i40e driver.
Norbert removes added padding from virtchnl RSS structures as this
causes issues when iterating over the arrays.
Mateusz adds Asym_Pause as supported to allow these settings to be set
as the hardware supports it.
Eryk fixes an issue where encountering a VF reset alongside releasing
VFs could cause a call trace.
Arkadiusz moves TC setup before resource setup as previously it was
possible to enter with a null q_vector causing a kernel oops.
The following are changes since commit e43accba9b071dcd106b5e7643b1b106a158cbb1:
psample: Fix user API breakage
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 40GbE
Arkadiusz Kubalewski (1):
i40e: Fix oops at i40e_rebuild()
Eryk Rybak (1):
i40e: Fix kernel oops when i40e driver removes VF's
Mateusz Palczewski (1):
i40e: Added Asym_Pause to supported link modes
Norbert Ciosek (1):
virtchnl: Fix layout of RSS structures
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++------
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 +++++++++
include/linux/avf/virtchnl.h | 2 --
5 files changed, 16 insertions(+), 8 deletions(-)
--
2.26.2
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-03-25 22:30:51
From: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Setup TC before the i40e_setup_pf_switch() call.
Memory must be initialized for all the queues
before using its resources.
Previously it could be possible that a call:
xdp_rxq_info_reg(&rx_ring->xdp_rxq, rx_ring->netdev,
rx_ring->queue_index, rx_ring->q_vector->napi.napi_id);
was made with q_vector being null.
Oops could show up with the following sequence:
- no driver loaded
- FW LLDP agent is on (flag disable-fw-lldp:off)
- link is up
- DCB configured with number of Traffic Classes that will not divide
completely the default number of queues (usually cpu cores)
- driver load
- set private flag: disable-fw-lldp:on
Fixes: 4b208eaa8078 ("i40e: Add init and default config of software based DCB")
Fixes: b02e5a0ebb17 ("xsk: Propagate napi_id to XDP socket Rx path")
Signed-off-by: Aleksandr Loktionov <redacted>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Hi Anthony, Norbert,
Thanks for your patch!
On Thu, Mar 25, 2021 at 11:29 PM Tony Nguyen [off-list ref] wrote:
From: Norbert Ciosek <redacted>
Remove padding from RSS structures. Previous layout
could lead to unwanted compiler optimizations
in loops when iterating over key and lut arrays.
From an earlier private conversation with Mateusz, I understand the real
explanation is that key[] and lut[] must be at the end of the
structures, because they are used as flexible array members?
Fixes: 65ece6de0114 ("virtchnl: Add missing explicit padding to structures")
Signed-off-by: Norbert Ciosek <redacted>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
If you use a flexible array member, it should be declared without a size,
i.e.
u8 key[];
Everything else is (trying to) fool the compiler, and leading to undefined
behavior, and people (re)adding explicit padding.
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-03-25 22:30:51
From: Eryk Rybak <redacted>
Fix the reason of kernel oops when i40e driver removed VFs.
Added new __I40E_VFS_RELEASING state to signalize releasing
process by PF, that it makes possible to exit of reset VF procedure.
Without this patch, it is possible to suspend the VFs reset by
releasing VFs resources procedure. Retrying the reset after the
timeout works on the freed VF memory causing a kernel oops.
Fixes: d43d60e5eb95("i40e: ensure reset occurs when disabling VF")
Signed-off-by: Eryk Rybak <redacted>
Signed-off-by: Grzegorz Szczurek <redacted>
Reviewed-by: Aleksandr Loktionov <redacted>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 +++++++++
2 files changed, 10 insertions(+)
@@ -142,6 +142,7 @@ enum i40e_state_t {__I40E_VIRTCHNL_OP_PENDING,__I40E_RECOVERY_MODE,__I40E_VF_RESETS_DISABLED,/* disable resets during i40e_remove */+__I40E_VFS_RELEASING,/* This must be last as it determines the size of the BITMAP */__I40E_STATE_SIZE__,};
@@ -147,6 +148,11 @@ static inline void i40e_vc_disable_vf(struct i40e_vf *vf)*ensureareset.*/for(i=0;i<20;i++){+/* If PF is in VFs releasing state reset VF is impossible,+*soleaveit.+*/+if(test_bit(__I40E_VFS_RELEASING,pf->state))+return;if(i40e_reset_vf(vf,false))return;usleep_range(10000,20000);
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-03-25 22:30:51
From: Mateusz Palczewski <redacted>
Add Asym_Pause to supported link modes (it is supported by HW).
Lack of Asym_Pause in supported modes can cause several problems,
i.e. it won't be possible to turn the autonegotiation on
with asymmetric pause settings (i.e. Tx on, Rx off).
Fixes: 4e91bcd5d47a ("i40e: Finish implementation of ethtool get settings")
Signed-off-by: Dawid Lukwinski <redacted>
Signed-off-by: Mateusz Palczewski <redacted>
Reviewed-by: Aleksandr Loktionov <redacted>
Reviewed-by: Przemyslaw Patynowski <redacted>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 +
1 file changed, 1 insertion(+)
@@ -1101,6 +1101,7 @@ static int i40e_get_link_ksettings(struct net_device *netdev,/* Set flow control settings */ethtool_link_ksettings_add_link_mode(ks,supported,Pause);+ethtool_link_ksettings_add_link_mode(ks,supported,Asym_Pause);switch(hw->fc.requested_mode){caseI40E_FC_FULL:
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Thu, 25 Mar 2021 15:31:15 -0700 you wrote:
This series contains updates to virtchnl header file and i40e driver.
Norbert removes added padding from virtchnl RSS structures as this
causes issues when iterating over the arrays.
Mateusz adds Asym_Pause as supported to allow these settings to be set
as the hardware supports it.
[...]