[Intel-wired-lan] [PATCH iwl-next v2 0/3] i40e: Add and use version check helpers

2023-10-24 Thread Ivan Vecera
The series moves an existing check for AQ API version to header file, adds another ones for firmware version check and use them to refactor existing open-coded version checks. Series content: Patch 1: Moves i40e_is_aq_api_ver_ge() helper to header file Patch 2: Adds another helpers to check runnin

[Intel-wired-lan] [PATCH iwl-next v2 1/3] i40e: Move i40e_is_aq_api_ver_ge helper

2023-10-24 Thread Ivan Vecera
Move i40e_is_aq_api_ver_ge helper function (used to check if AdminQ API version is recent enough) to header so it can be used from other .c files. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/i40e/i40e_common.c | 23 --- drivers/net/ethernet/intel/i40e/i40e_type.h

[Intel-wired-lan] [PATCH iwl-next v2 3/3] i40e: Use helpers to check running FW and AQ API versions

2023-10-24 Thread Ivan Vecera
Use new helpers to check versions of running FW and provided AQ API to make the code more readable. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 56 +++ drivers/net/ethernet/intel/i40e/i40e_common.c | 25 - drivers/net/ethernet/intel/i40e

[Intel-wired-lan] [PATCH iwl-next v2 2/3] i40e: Add other helpers to check version of running firmware and AQ API

2023-10-24 Thread Ivan Vecera
Add another helper functions that will be used by subsequent patch to refactor existing open-coded checks whether the version of running firmware and AdminQ API is recent enough to provide certain capabilities. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/i40e/i40e_type.h | 54 +

Re: [Intel-wired-lan] [PATCH iwl-next 1/4] iavf: rely on netdev's own registered state

2023-10-24 Thread Romanowski, Rafal
> -Original Message- > From: Intel-wired-lan On Behalf Of > Jacob Keller > Sent: Tuesday, October 17, 2023 7:30 PM > To: intel-wired-lan@osuosl.org > Subject: Re: [Intel-wired-lan] [PATCH iwl-next 1/4] iavf: rely on netdev's own > registered state > > > > On 10/16/2023 9:48 AM, Michal S

Re: [Intel-wired-lan] [PATCH iwl-next 2/4] iavf: use unregister_netdev

2023-10-24 Thread Romanowski, Rafal
> -Original Message- > From: Intel-wired-lan On Behalf Of > Drewek, Wojciech > Sent: Tuesday, October 17, 2023 10:07 AM > To: mschmidt ; intel-wired-...@lists.osuosl.org > Cc: net...@vger.kernel.org; Nguyen, Anthony L > ; Brandeburg, Jesse > > Subject: Re: [Intel-wired-lan] [PATCH iwl-nex

Re: [Intel-wired-lan] [PATCH iwl-next 3/4] iavf: add a common function for undoing the interrupt scheme

2023-10-24 Thread Romanowski, Rafal
> -Original Message- > From: Intel-wired-lan On Behalf Of > Jacob Keller > Sent: Tuesday, October 17, 2023 7:36 PM > To: intel-wired-lan@osuosl.org > Subject: Re: [Intel-wired-lan] [PATCH iwl-next 3/4] iavf: add a common > function for undoing the interrupt scheme > > > > On 10/16/2023

Re: [Intel-wired-lan] [PATCH iwl-next 4/4] iavf: delete the iavf client interface

2023-10-24 Thread Romanowski, Rafal
> -Original Message- > From: Intel-wired-lan On Behalf Of > Jacob Keller > Sent: Tuesday, October 17, 2023 7:47 PM > To: intel-wired-lan@osuosl.org > Subject: Re: [Intel-wired-lan] [PATCH iwl-next 4/4] iavf: delete the iavf > client > interface > > > > On 10/16/2023 9:48 AM, Michal Sch

Re: [Intel-wired-lan] [PATCH iwl-next v2 1/3] i40e: Move i40e_is_aq_api_ver_ge helper

2023-10-24 Thread Wojciech Drewek
On 24.10.2023 10:12, Ivan Vecera wrote: > Move i40e_is_aq_api_ver_ge helper function (used to check if AdminQ > API version is recent enough) to header so it can be used from > other .c files. > > Signed-off-by: Ivan Vecera > --- Thanks Ivan, Reviewed-by: Wojciech Drewek > drivers/net/ethe

Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API

2023-10-24 Thread Wojciech Drewek
On 23.10.2023 18:29, Ivan Vecera wrote: > Add another helper functions that will be used by subsequent > patch to refactor existing open-coded checks whether the version > of running firmware and AdminQ API is recent enough to provide > certain capabilities. > > Signed-off-by: Ivan Vecera > --

[Intel-wired-lan] [PATCH iwl-next v5] ice: read internal temperature sensor

2023-10-24 Thread Konrad Knitter
Since 4.30 firmware exposes internal thermal sensor reading via admin queue commands. Expose those readouts via hwmon API when supported. Datasheet: Get Sensor Reading Command (Opcode: 0x0632) ++++-+ | Name | B

[Intel-wired-lan] [PATCH iwl-next] ice: Reset VF on Tx MDD event

2023-10-24 Thread Pawel Chmielewski
From: Liang-min Wang In cases when VF sends malformed packets that are classified as malicious, sometimes it causes Tx queue to freeze. This frozen queue can be stuck for several minutes being unusable. When MDD event occurs, perform graceful VF reset to quickly bring VF back to operational stat

[Intel-wired-lan] [PATCH iwl-next v1 00/15] one by one port representors creation

2023-10-24 Thread Michal Swiatkowski
Hi, Currently ice supports creating port representors only for VFs. For that use case they can be created and removed in one step. This patchset is refactoring current flow to support port representor creation also for subfunctions and SIOV. In this case port representors need to be createad and

[Intel-wired-lan] [PATCH iwl-next v1 01/15] ice: rename switchdev to eswitch

2023-10-24 Thread Michal Swiatkowski
Eswitch is used as a prefix for related functions. Main structure storing all data related to eswitch should also be named as eswitch instead of ice_switchdev_info. Rename it. Also rename switchdev to eswitch where the context is not about eswitch mode. ::uplink_netdev was changed to netdev for s

[Intel-wired-lan] [PATCH iwl-next v1 02/15] ice: remove redundant max_vsi_num variable

2023-10-24 Thread Michal Swiatkowski
It is a leftover from previous implementation. Accidentally it wasn't removed. Do it now. Commit that has removed it: commit c1e5da5dd465 ("ice: improve switchdev's slow-path") Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski

[Intel-wired-lan] [PATCH iwl-next v1 03/15] ice: remove unused control VSI parameter

2023-10-24 Thread Michal Swiatkowski
It isn't used in ice_eswitch_release_reprs(). Probably leftover. Remove it. Commit that has removed usage of ctrl_vsi: commit c1e5da5dd465 ("ice: improve switchdev's slow-path") Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowsk

[Intel-wired-lan] [PATCH iwl-next v1 04/15] ice: track q_id in representor

2023-10-24 Thread Michal Swiatkowski
Previously queue index of control plane VSI used by port representor was always id of VF. If we want to allow adding port representors for different devices we have to track queue index in the port representor structure. Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jaco

[Intel-wired-lan] [PATCH iwl-next v1 05/15] ice: use repr instead of vf->repr

2023-10-24 Thread Michal Swiatkowski
Extract repr from vf->repr as it is often use in the ice_repr_rem(). Remove meaningless clearing of q_vector and netdev pointers as kfree is called on repr pointer. Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski --- drive

[Intel-wired-lan] [PATCH iwl-next v1 06/15] ice: track port representors in xarray

2023-10-24 Thread Michal Swiatkowski
Instead of assuming that each VF has pointer to port representor save it in xarray. It will allow adding port representor for other device types. Drop reference to VF where it is use only to get port representor. Get it from xarray instead. The functions will no longer by specific for VF, rename

[Intel-wired-lan] [PATCH iwl-next v1 07/15] ice: remove VF pointer reference in eswitch code

2023-10-24 Thread Michal Swiatkowski
Make eswitch code generic by removing VF pointer reference in functions. It is needed to support eswitch mode for other type of devices. Previously queue id used for Rx was based on VF number. Use ::q_id saved in port representor instead. After adding or removing port representor ::q_id value can

[Intel-wired-lan] [PATCH iwl-next v1 08/15] ice: make representor code generic

2023-10-24 Thread Michal Swiatkowski
Representor code needs to be independent from specific device type, like in this case VF. Make generic add / remove representor function and specific add VF / rem VF function. New device types will follow this scheme. In bridge offload code there is a need to get representor pointer based on VSI.

[Intel-wired-lan] [PATCH iwl-next v1 09/15] ice: return pointer to representor

2023-10-24 Thread Michal Swiatkowski
In follow up patches it will be easier to obtain created port representor pointer instead of the id. Without it the pattern from eswitch side will look like: - create PR - get PR based on the id Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: M

[Intel-wired-lan] [PATCH iwl-next v1 10/15] ice: allow changing SWITCHDEV_CTRL VSI queues

2023-10-24 Thread Michal Swiatkowski
Implement mechanism to change number of queues for SWITCHDEV_CTRL VSI type. Value from ::req_txq/rxq will be written to ::alloc_txq/rxq after calling ice_vsi_rebuild(). Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski --- d

[Intel-wired-lan] [PATCH iwl-next v1 11/15] ice: set Tx topology every time new repr is added

2023-10-24 Thread Michal Swiatkowski
It is needed to track correct Tx topology. Update it every time new representor is created or remove node in case of removing corresponding representor. Still clear all node when removing switchdev mode as part of Tx topology isn't related only to representors. Also clear ::rate_note value to prev

[Intel-wired-lan] [PATCH iwl-next v1 12/15] ice: realloc VSI stats arrays

2023-10-24 Thread Michal Swiatkowski
Previously only case when queues amount is lower was covered. Implement realloc for case when queues amount is higher than previous one. Use krealloc() function and zero new allocated elements. It has to be done before ice_vsi_def_cfg(), because stats element for ring is set there. Reviewed-by: W

[Intel-wired-lan] [PATCH iwl-next v1 13/15] ice: add VF representors one by one

2023-10-24 Thread Michal Swiatkowski
Implement adding representors one by one. Always set switchdev environment when first representor is being added and clear environment when last one is being removed. Basic switchdev configuration remains the same. Code related to creating and configuring representor was changed. Instead of setti

[Intel-wired-lan] [PATCH iwl-next v1 14/15] ice: adjust switchdev rebuild path

2023-10-24 Thread Michal Swiatkowski
There is no need to use specific functions for rebuilding path. Let's use current implementation by removing all representors and as the result remove switchdev environment. It will be added in devices rebuild path. For example during adding VFs, port representors for them also will be created. R

[Intel-wired-lan] [PATCH iwl-next v1 15/15] ice: reserve number of CP queues

2023-10-24 Thread Michal Swiatkowski
Rebuilding CP VSI each time the PR is created drastically increase the time of maximum VFs creation. Add function to reserve number of CP queues to deal with this problem. Use the same function to decrease number of queues in case of removing VFs. Assume that caller of ice_eswitch_reserve_cp_queue

Re: [Intel-wired-lan] [PATCH iwl-next] ice: Reset VF on Tx MDD event

2023-10-24 Thread Paul Menzel
Dear Pawel, dear Liang-min, Am 24.10.23 um 13:29 schrieb Pawel Chmielewski: From: Liang-min Wang Should min start with a capital letter Liang-Min? In cases when VF sends malformed packets that are classified as malicious, sometimes it causes Tx queue to freeze. This frozen queue can be stu

Re: [Intel-wired-lan] [PATCH iwl-next v1 00/15] one by one port representors creation

2023-10-24 Thread Jiri Pirko
Tue, Oct 24, 2023 at 01:09:14PM CEST, michal.swiatkow...@linux.intel.com wrote: >Hi, > >Currently ice supports creating port representors only for VFs. For that >use case they can be created and removed in one step. > >This patchset is refactoring current flow to support port representor >creation

Re: [Intel-wired-lan] [PATCH iwl-next] ice: Reset VF on Tx MDD event

2023-10-24 Thread Pawel Chmielewski
Dear Paul, Thank you for your review! > > From: Liang-min Wang > > Should min start with a capital letter Liang-Min? That's right, I'll correct it. > > In cases when VF sends malformed packets that are classified as malicious, > > sometimes it causes Tx queue to freeze. This frozen queue can

[Intel-wired-lan] [PATCH 2/2] i40e: Fix devlink port unregistering

2023-10-24 Thread Ivan Vecera
Ensure that devlink port is unregistered after unregistering of net device. Reproducer: [root@host ~]# rmmod i40e [ 4742.939386] i40e :02:00.1: i40e_ptp_stop: removed PHC on enp2s0f1np1 [ 4743.059269] [ cut here ] [ 4743.063900] WARNING: CPU: 21 PID: 10766 at net/devlin

[Intel-wired-lan] [PATCH 1/2] i40e: Do not call devlink_port_type_clear()

2023-10-24 Thread Ivan Vecera
Do not call devlink_port_type_clear() prior devlink port unregister and let devlink core to take care about it. Reproducer: [root@host ~]# rmmod i40e [ 4539.964699] i40e :02:00.0: devlink port type for port 0 cleared without a software interface reference, device type not supported by the ker

Re: [Intel-wired-lan] [PATCH 1/2] i40e: Do not call devlink_port_type_clear()

2023-10-24 Thread Ivan Vecera
On 24. 10. 23 14:42, Ivan Vecera wrote: Do not call devlink_port_type_clear() prior devlink port unregister and let devlink core to take care about it. Reproducer: [root@host ~]# rmmod i40e [ 4539.964699] i40e :02:00.0: devlink port type for port 0 cleared without a software interface re

[Intel-wired-lan] [PATCH net-next 1/2] i40e: Do not call devlink_port_type_clear()

2023-10-24 Thread Ivan Vecera
Do not call devlink_port_type_clear() prior devlink port unregister and let devlink core to take care about it. Reproducer: [root@host ~]# rmmod i40e [ 4539.964699] i40e :02:00.0: devlink port type for port 0 cleared without a software interface reference, device type not supported by the ker

[Intel-wired-lan] [PATCH net-next 2/2] i40e: Fix devlink port unregistering

2023-10-24 Thread Ivan Vecera
Ensure that devlink port is unregistered after unregistering of net device. Reproducer: [root@host ~]# rmmod i40e [ 4742.939386] i40e :02:00.1: i40e_ptp_stop: removed PHC on enp2s0f1np1 [ 4743.059269] [ cut here ] [ 4743.063900] WARNING: CPU: 21 PID: 10766 at net/devlin

Re: [Intel-wired-lan] [PATCH net-next 1/2] i40e: Do not call devlink_port_type_clear()

2023-10-24 Thread Jiri Pirko
Tue, Oct 24, 2023 at 02:51:08PM CEST, ivec...@redhat.com wrote: >Do not call devlink_port_type_clear() prior devlink port unregister >and let devlink core to take care about it. > >Reproducer: >[root@host ~]# rmmod i40e >[ 4539.964699] i40e :02:00.0: devlink port type for port 0 cleared without

Re: [Intel-wired-lan] [PATCH net-next 2/2] i40e: Fix devlink port unregistering

2023-10-24 Thread Jiri Pirko
Tue, Oct 24, 2023 at 02:51:09PM CEST, ivec...@redhat.com wrote: >Ensure that devlink port is unregistered after unregistering >of net device. > >Reproducer: >[root@host ~]# rmmod i40e >[ 4742.939386] i40e :02:00.1: i40e_ptp_stop: removed PHC on enp2s0f1np1 >[ 4743.059269] [ cut here

Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API

2023-10-24 Thread Ivan Vecera
On 24. 10. 23 12:24, Wojciech Drewek wrote: On 23.10.2023 18:29, Ivan Vecera wrote: Add another helper functions that will be used by subsequent patch to refactor existing open-coded checks whether the version of running firmware and AdminQ API is recent enough to provide certain capabilities

Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API

2023-10-24 Thread Wojciech Drewek
On 24.10.2023 15:01, Ivan Vecera wrote: > > > On 24. 10. 23 12:24, Wojciech Drewek wrote: >> On 23.10.2023 18:29, Ivan Vecera wrote: >>> Add another helper functions that will be used by subsequent >>> patch to refactor existing open-coded checks whether the version >>> of running firmware and

Re: [Intel-wired-lan] [PATCH iwl-next v1 00/15] one by one port representors creation

2023-10-24 Thread Michal Swiatkowski
On Tue, Oct 24, 2023 at 01:50:16PM +0200, Jiri Pirko wrote: > Tue, Oct 24, 2023 at 01:09:14PM CEST, michal.swiatkow...@linux.intel.com > wrote: > >Hi, > > > >Currently ice supports creating port representors only for VFs. For that > >use case they can be created and removed in one step. > > > >Thi

Re: [Intel-wired-lan] [PATCH iwl-next] ice: Reset VF on Tx MDD event

2023-10-24 Thread Michal Swiatkowski
On Tue, Oct 24, 2023 at 01:29:12PM +0200, Pawel Chmielewski wrote: > From: Liang-min Wang > > In cases when VF sends malformed packets that are classified as malicious, > sometimes it causes Tx queue to freeze. This frozen queue can be stuck > for several minutes being unusable. > > When MDD eve

Re: [Intel-wired-lan] [PATCH iwl-next v1 00/15] one by one port representors creation

2023-10-24 Thread Jiri Pirko
Tue, Oct 24, 2023 at 03:10:46PM CEST, michal.swiatkow...@linux.intel.com wrote: >On Tue, Oct 24, 2023 at 01:50:16PM +0200, Jiri Pirko wrote: >> Tue, Oct 24, 2023 at 01:09:14PM CEST, michal.swiatkow...@linux.intel.com >> wrote: >> >Hi, >> > >> >Currently ice supports creating port representors only

[Intel-wired-lan] [PATCH iwl-next v1] ice: change vfs.num_msix_per to vf->num_msix

2023-10-24 Thread Michal Swiatkowski
vfs::num_msix_per should be only used as default value for vf->num_msix. For other use cases vf->num_msix should be used, as VF can have different MSI-X amount values. Fix incorrect register index calculation. vfs::num_msix_per and pf->sriov_base_vector shouldn't be used after implementation of ch

Re: [Intel-wired-lan] [PATCH iwl-next] ice: Reset VF on Tx MDD event

2023-10-24 Thread Pawel Chmielewski
On Tue, Oct 24, 2023 at 03:12:54PM +0200, Michal Swiatkowski wrote: > > if (netif_msg_tx_err(pf)) > > - dev_info(dev, "Malicious Driver Detection event > > TX_TDPU detected on VF %d\n", > > + dev_info(dev, > > +

[Intel-wired-lan] [PATCH iwl-next] ice: Fix VF Reset when interface in a failed over aggregate

2023-10-24 Thread Dave Ertman
There is an error interface has the following conditions: - PF is in an aggregate (bond) - PF has VFs created on it - bond is in a state where it is failed-over to the secondary interface - A VF reset is issued on one or more of those VFs The issue is generated by the originating PF trying to tear

Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API

2023-10-24 Thread Jacob Keller
On 10/24/2023 6:01 AM, Ivan Vecera wrote: > > > On 24. 10. 23 12:24, Wojciech Drewek wrote: >> On 23.10.2023 18:29, Ivan Vecera wrote: >>> Add another helper functions that will be used by subsequent >>> patch to refactor existing open-coded checks whether the version >>> of running firmware a

[Intel-wired-lan] [tnguy-next-queue:100GbE_Live_Migration] BUILD SUCCESS 5b4255a57ac48844e6e38479f5f715a6ef6b799d

2023-10-24 Thread kernel test robot
allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc archsdk_defconfig gcc arc randconfig-001-20231024 gcc arc