[PATCH v3 19/30] net/ixgbe/base: remove prototypes of unimplemented functions

2024-05-30 Thread Anatoly Burakov
From: Chinh Cao There are some function prototypes that were introduced at some point but were never implemented, so remove them. Signed-off-by: Chinh Cao --- drivers/net/ixgbe/base/ixgbe_api.h | 1 - drivers/net/ixgbe/base/ixgbe_x550.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/dr

[PATCH v3 20/30] net/ixgbe/base: add definitions for E610

2024-05-30 Thread Anatoly Burakov
We're about to start adding code to support E610 device type, which relies on a lot of definitions. Add these definitions to base driver. Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe

[PATCH v3 21/30] net/ixgbe/base: add support for E610 Admin Command Interface

2024-05-30 Thread Anatoly Burakov
-by: Jedrzej Jagielski Signed-off-by: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 624 +++ drivers/net/ixgbe/base/ixgbe_e610.h | 30 ++ drivers/net/ixgbe/base/ixgbe_osdep.h | 1 + drivers/net/ixgbe/base

[PATCH v3 22/30] net/ixgbe/base: add support for E610 device capabilities detection

2024-05-30 Thread Anatoly Burakov
From: Piotr Kwapulinski Add low level support for E610 device capabilities detection. The capabilities are discovered via the Admin Command Interface. Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers

[PATCH v3 23/30] net/ixgbe/base: add link management support for E610 device

2024-05-30 Thread Anatoly Burakov
From: Piotr Kwapulinski Add low level link management support for E610 device. Link management operations are handled via the Admin Command Interface. Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers

[PATCH v3 24/30] net/ixgbe/base: add support for NVM handling in E610 device

2024-05-30 Thread Anatoly Burakov
From: Piotr Kwapulinski Add low level support for accessing NVM in E610 device. NVM operations are handled via the Admin Command Interface. Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe

[PATCH v3 25/30] net/ixgbe/base: enable E610 device support

2024-05-30 Thread Anatoly Burakov
: Piotr Kwapulinski Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_82599.c |7 +- drivers/net/ixgbe/base/ixgbe_api.c | 60 +- drivers/net/ixgbe/base/ixgbe_api.h |7 +- drivers/net/ixgbe/base/ixgbe_common.c| 31 +- drivers/net/ixgbe/base/ixgbe_e610.c

[PATCH v3 26/30] net/ixgbe/base: add i2c and GPIO read/write API

2024-05-30 Thread Anatoly Burakov
The E610 hardware supports reading/writing values from/to GPIO and I2C registers through Admin Command Interface. Add API's to do so. Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 158 drivers/net/ixgbe/base/ixgbe_e610.h | 10 ++ 2

[PATCH v3 27/30] net/ixgbe/base: add NVM init and populate

2024-05-30 Thread Anatoly Burakov
The driver can store NVM settings in its internal structures. Add functions to initialize and populate these structures through the Admin Command Interface. Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 245 drivers/net/ixgbe/base

[PATCH v3 28/30] net/ixgbe/base: alternate structure operations support

2024-05-30 Thread Anatoly Burakov
Add support for read/write/clear operations on alternate structure. Signed-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 132 drivers/net/ixgbe/base/ixgbe_e610.h | 9 ++ 2 files changed, 141 insertions(+) diff --git a/drivers/net/ixgbe/base

[PATCH v3 29/30] net/ixgbe/base: support more NVM-related operations

2024-05-30 Thread Anatoly Burakov
-off-by: Anatoly Burakov --- drivers/net/ixgbe/base/ixgbe_e610.c | 319 +++ drivers/net/ixgbe/base/ixgbe_e610.h | 15 ++ drivers/net/ixgbe/base/ixgbe_type_e610.h | 151 +++ 3 files changed, 485 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c

[PATCH v3 30/30] net/ixgbe/base: add various miscellaneous features

2024-05-30 Thread Anatoly Burakov
: Anatoly Burakov --- Notes: This fix seems to be kernel-specific, so Cc:stable was intentionally omitted. doc/guides/rel_notes/release_24_07.rst | 4 + drivers/net/ixgbe/base/README| 6 +- drivers/net/ixgbe/base/ixgbe_api.c | 2 - drivers/net/ixgbe/base/ixgbe_type.h

[PATCH v2 000/148] Update net/ice base driver to latest upstream snapshot

2024-06-12 Thread Anatoly Burakov
This is a patchset loosely based on internal development tree which tracked ICE driver development over a period of time since last snapshot update. RFC -> v1: - From one, many Anatoly Burakov (21): net/ice/base: alloc port_info only once net/ice/base: be more verbose when preparing ti

[PATCH v2 003/148] net/ice/base: update E830 headers

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Update E830 header file for use with simulation systems. Signed-off-by: Paul Greenwalt Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_hw_autogen.h | 78 +-- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/drivers/net/ice/base/ic

[PATCH v2 004/148] net/ice/base: update phy config during link restart

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Update en_link in curr_user_phy_cfg.caps on successful execution of set_link_restart_an operation. Signed-off-by: Siddaraju DH Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH v2 005/148] net/ice/base: fix for pointer to variable outside scope

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Currently, the 'temp' variable is in the same scope as 'first_teid_ptr' and we take point to it, which means on new loop iterations the memory goes out of scope and we keep a dangling pointer. Move 'temp' to outside of the loop to fix it. Signed-off-by: Stefan Wegrzyn Signed-of

[PATCH v2 002/148] net/ice/base: replace ICE_SUCCESS with int

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Replace all usages of ICE_SUCCESS with its integer equivalent. Signed-off-by: Przemek Kitszel Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_acl.c | 2 +- drivers/net/ice/base/ice_acl_ctrl.c | 16 +-- drivers/net/ice/base/ice_common.c| 78 +++---

[PATCH v2 006/148] net/ice/base: add missing include for flow

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When building with certain targets, a missing include was causing a compilation failure. Add the missing include. Signed-off-by: Jesse Brandeburg Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_flow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ice/

[PATCH v2 007/148] net/ice/base: add ability to set markid via switch filter

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Support to add large action to set 32 bits markid via switch filter. Signed-off-by: Zhirun Yan Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 22 -- drivers/net/ice/base/ice_switch.h | 24 2 files changed, 24 ins

[PATCH v2 008/148] net/ice/base: improve ice_debug_cq messages

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The ice_debug_cq function is called to print debug data for a control queue descriptor in multiple places. This includes both before we send a message on a transmit queue, after the writeback completion of a message on the transmit queue, and when we receive a message on a receiv

[PATCH v2 009/148] net/ice/base: add mgmt netlist auth support command

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add new Admin Q command to check if netlist auth is supported. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 5 + drivers/net/ice/base/ice_type.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/ice/base

[PATCH v2 010/148] net/ice/base: fix undefined variables

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Initialize some variable to avoid "variable might be not defined" warning. This is due to the fact that for QV, sometimes alternative fragments of code are being executed exclusively thanks to use of goto, which some compilers cannot handle correctly. Signed-off-by: Fabio Pricoc

[PATCH v2 011/148] net/ice/base: fix get media type

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The use of get link status PHY type for determining the media type can result in incorrect reporting the incorrect media type. This can happen for a couple reasons: 1. The get link states current PHY type field can return non-PHY type values (i.e. bit 127 indicates link state d

[PATCH v2 013/148] net/ice/base: update flow seg fields to declared bitmaps

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes ice_flow_seg_info fields match and range are being used with bit operations but not declared as bitmaps. This can cause issues when casting values greater than 32. This change is to declare them as proper bitmaps so that the bitmap operations can function as intended. Signed-off

[PATCH v2 012/148] net/ice/base: clean up __ice_aq_get_set_rss_lut()

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Refactor __ice_aq_get_set_rss_lut(): get: - make use params->lut_size only as a size of params->lut; - return LUT size via params->lut_size; set: - remove option to set RSS LUT smaller than available (eg forbid PF LUT sized 512); both: - clean up code. Signed-off-by: Prze

[PATCH v2 014/148] net/ice/base: update interface in ice_parse_common_caps

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes New flag for external topology devices for different types of versioning. Signed-off-by: Dawid Zielinski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 6 ++ drivers/net/ice/base/ice_type.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/driver

[PATCH v2 015/148] net/ice/base: refactor (non) bitmap declarations

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The firmware interface definition file mistakenly started using bitmap declarations for its storage in a couple of structures. The data structure contains a "bit-map" of bits that the hardware/firmware sets or reads but it's not a DECLARE_BITMAP style bitmap and it's not accessed

[PATCH v2 016/148] net/ice/base: remove unnecessary control queue cmd_buf arrays

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The driver allocates a cmd_buf array in addition to the desc_buf array. This array stores an ice_sq_cd command details structure for each entry in the control queue ring. The contents of the structure are copied from the value passed in via ice_sq_send_cmd, and include only a po

[PATCH v2 017/148] net/ice/base: alloc port_info only once

2024-06-12 Thread Anatoly Burakov
When devlink reload is called port_info should stay. Check if it wasn't already allocated before doing allocation. Signed-off-by: Michal Swiatkowski Signed-off-by: Anatoly Burakov --- drivers/net/ice/base/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[PATCH v2 018/148] net/ice/base: update code with flex array safe allocations

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The Linux Kernel is now requiring flex array safe allocations from drivers and the way that we used overlaid union structures was confusing or worse, breaking Klocwork as well as failing upstream builds that were checking -Warray-bounds. This update was inspired by Alexander Lob

[PATCH v2 019/148] net/ice/base: bring back ability to use 128 as size of PF type RSS LUT

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Allow PF RSS LUT to be sized 128. Recent refactor simplified code and made it impossible. Also clean up unused defines. Signed-off-by: Przemek Kitszel Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 12 +++- drivers/net/ice/base/ice_common.c

[PATCH v2 020/148] net/ice/base: support for OROM update in recovery mode

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes OROM update in recovery mode is allowed or not based on function capability 0x0090. This patch adds capability parsing for it. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 1 + drivers/net/ice/base/ice_common.c | 5 +++

[PATCH v2 021/148] net/ice/base: code adjustments for E830

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Adjustments required for E830 code base where other platforms may need to be recognised. Changes are included here to reduced diff between here and upstream. Also include minor comment adjustment. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/bas

[PATCH v2 022/148] net/ice/base: improve find recipe routine

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Return error if there were no recipes found. Signed-off-by: Grzegorz Nitka Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 448

[PATCH v2 023/148] net/ice/base: fix memory leak when checking firmware version

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the underlying device firmware isn't the correct version, then the memory used to hold the PHY capabilities output from the firmware isn't freed. Fix this by making sure the memory is freed by jumping to the label that

[PATCH v2 024/148] net/ice/base: add LL Tx timestamp interrupt read

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes E810 products can support low latency Tx timestamp register read using the SW interrupt from the FW. Add a check for the device capability and use the new method if supported. Signed-off-by: Karol Kolacinski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 3

[PATCH v2 025/148] net/ice/base: use model-dependent number of PHY ports

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Set up and use model-dependent number of PHY ports. Also fix iterations over PTP ports. Define 'max_phy_port', a new ice_hw struct member to store the max port number handled by given clock owner. Replace 'phy_ports' with 'max_phy_port' for max range in iterations over PTP port

[PATCH v2 026/148] net/ice/base: use ice_bitmap_t in promisc functions

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Currently all functions related to promiscuous modes use u8 bit mask. All 8 bits are utilized already and to be able to add any new flag, all the drivers need to comply. To address that, change u8 into ice_bitmap_t and use dedicated functions to process it. Signed-off-by: Mateu

[PATCH v2 027/148] net/ice/base: fix rx-only unicast promiscuous mode

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Currently for unicast promiscuous, the driver is adding a LOOKUP_RX filter rule using recipe 3. The direction bit in this recipe is the pkt_is_from_network flag, so the filter only matches on packets from the network, not loopback packets. To match loopback packets without replic

[PATCH v2 028/148] net/ice/base: add support for E825-C TX clock changing

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes E825-C hardware has a new feature which allows to change the clocks which drives the TX on the PHYs. The registers are accessed directly no interaction with FW via admin queue commands. Add this support. Signed-off-by: Michal Michalik Signed-off-by: Ian Stokes --- drivers/net

[PATCH v2 029/148] net/ice/base: fix for applying multiple cloud filters

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When applying UDP cloud filter with tunnel type different than VXLAN for each of the filter new recipe will be created instead of using already created one. This will quickly use all of the resources for specific recipe. Modified check to detect if recipe with similar tunnel type

[PATCH v2 030/148] net/ice/base: limit PF RSS LUT to one VSI at time

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Allow only one VSI to alloc the PF RSS LUT. Shared part consists of just a new field, actual implementation will use `rss_locks` to serialize the access. Take advantage of the fact that VSI #0 is main VSI for PF, what is the default PF LUT holder, so zero-init of struct ice_hw s

[PATCH v2 031/148] net/ice/base: prevent potential integer overflow

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The original bit-shift was made on a 16-bit value which could overflow. Use 64-bit integer to do bit-shifts instead. Signed-off-by: Lukasz Plachno Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_parser_rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[PATCH v2 032/148] net/ice/base: cosmetic changes

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes - Fix some alignment issues - Added missing comment - Removed useless !! - Add Missing DBG cluster ID Signed-off-by: Fabio Pricoco Signed-off-by: Dan Nowlin Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 1 + drivers/net/ice/base/ice_switch.c | 10

[PATCH v2 033/148] net/ice/base: implement initial PTP support for E830

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The new series of devices supported by ice driver are E830 devices. This hardware supports the PTP feature very similar to E810 devices. The main difference besides some other register addresses is that in E830 we are able to read the TX timestamps memory directly from BARs (in E

[PATCH v2 034/148] net/ice/base: fix resource leak

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When errors happen during OROM reads, the allocated buffer is not freed. Fix it by adding a goto label to free the buffer in case of error. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_nvm.c | 10 ++ 1 file changed, 6 insertions(

[PATCH v2 035/148] net/ice/base: move lock outside of if-else

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When current version of driver snapshot was generated, there was a "fix" applied to it that moved the lock inside the if-else block. This change was made in error and was later reverted in the upstream driver, so adjust DPDK driver accordingly. Signed-off-by: Jesse Brandeburg S

[PATCH v2 036/148] net/ice/base: refactor control queue send delay

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Since we know that most side band queue messages complete within 2-3 microseconds, introduce an initial 5 microsecond delay before we enter the main timeout loop. Use ice_flush(hw) first to ensure that we immediately flush the tail bump before delaying. This should mean that in p

[PATCH v2 037/148] net/ice/base: fix NVM feature check

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add defines required by NVM feature check. Although not directly used in this patch this change is required in order to better match upstream. Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/

[PATCH v2 038/148] net/ice/base: allow for dumping all clusters

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Define MNG Transactions cluster ID, as well as adjust definition of 0xFF08 admin command according to better match data sheet. Also, modify ice_aq_get_internal_data() wrapping function so that it returns next cluster ID. Signed-off-by: Stefan Wegrzyn Signed-off-by: Ian Stokes

[PATCH v2 039/148] net/ice/base: remove PTP aqc_driver_params

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes With the introduction of PTP auxiliary bus driver, aqc_driver_params are no longer needed to share data between the PFs. Signed-off-by: Karol Kolacinski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 5 - 1 file changed, 5 deletions(-) diff --git a

[PATCH v2 040/148] net/ice/base: add FW load status mask

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add a mask used to extract FW load status from GL_MNG_FWSM. Signed-off-by: Jan Sokolowski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_hw_autogen.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ice/base/ice_hw_autogen.h b/drivers/net/ice/base/ice_

[PATCH v2 041/148] net/ice/base: add direction metadata

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Currently it is possible to create a filter which breaks TX traffic, e.g.: tc filter add dev $PF1 ingress protocol ip prio 1 flower ip_proto udp dst_port $PORT action mirred egress redirect dev $VF1_PR This adds a rule which might match both TX and RX traffic, and in TX path th

[PATCH v2 042/148] net/ice/base: change data buffer in i2c write to be const

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Data should not be changed by generic i2c write, hence it should be const. Signed-off-by: Yochai Hagvi Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 2 +- drivers/net/ice/base/ice_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH v2 043/148] net/ice/base: remove unused code from upstream build

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Align code to better resemble upstream. Signed-off-by: Jesse Brandeburg Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 33 --- 1 file changed, 33 deletions(-) diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice

[PATCH v2 044/148] net/ice/base: fix sign-extension

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Fix a static analysis warning where if the 16-bit value in mask has the high-bit set, it will be sign extended by the shift left (which converts it to a signed integer). Avoid this by casting to a u32 to make sure the conversion happens before the shift and that it stays unsigned

[PATCH v2 045/148] net/ice/base: implement switch recipe reuse feature

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes If FW supports the corresponding functionality, the driver allows PFs to subscribe the same switch recipes. Then when the PF is done with a switch recipe, the PF can ask the FW to free that switch recipe. When the FW detects that all subscribing PFs have freed the switch recipe,

[PATCH v2 046/148] net/ice/base: add helper function for refsync

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add a helper function to determine whether a given pin of DPLL is capable for refsync configuration. Signed-off-by: Yochai Hagvi Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 16 drivers/net/ice/base/ice_ptp_hw.h | 1 + 2 files changed, 1

[PATCH v2 047/148] net/ice/base: added informational message for NAC topology

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Use proper bitmask to verify primary/secondary mode instead of whole 'mode' field, which also includes other information. In the result, for Mode 2a for example, 'secondary' mode was always reported which was misleading. Signed-off-by: Prathisna Padmasanan Signed-off-by: Ian St

[PATCH v2 048/148] net/ice/base: add Cage Max Power override NVM module

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Define Cage Max Power override NVM module which allows to override maximum power of QSFP/SFP cage. There might be up to 8 cages so each of them has its own word in the module. From the ice driver perspective we need only Override Enable bit so there is no need to define bits wher

[PATCH v2 049/148] net/ice/base: adapt No FEC in Auto support check to add E82X devices

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Previously, the "No FEC in Auto mode" feature was added to the link management engine (part of firmware) for E810 devices, and was unsupported at the time on E82X devices. However, this support is now being extended to new FW versions for E82X devices, and so the SW check to enab

[PATCH v2 050/148] net/ice/base: move (read|write)_sma_ctrl functions to match upstream

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The upstream driver placed the ice_read_sma_ctrl_e810t and ice_write_sma_ctrl_e810t functions before the ice_read_pca9575_reg_e810t function. Align with upstream and order the functions so that the sma functions come before the pca9575 functions, slightly reducing the difference

[PATCH v2 051/148] net/ice/base: fix incorrect size when allocating children arrays

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The ice_sched_add_root_node() and ice_sched_add_node() functions have comments to suppress Coverity warnings about a suspicious sizeof used when allocating the children array of an struct ice_sched_node. The size is calculated using the size of the scheduler node, which overallo

[PATCH v2 052/148] net/ice/base: fix GCS descriptor field offsets

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Update the offsets, and remove the ICE_TX_GCS_DESC_ENA define since a non-0 value used for the ICE_TX_GCS_DESC_TYPE field will enable GCS offload; there is no dedicated bit to enable it anymore. Signed-off-by: Eric Joyner Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice

[PATCH v2 053/148] net/ice/base: add VSI type for subfunctions

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add a separate VSI type for devlink subfunctions due to specific handling in the driver. Signed-off-by: Piotr Raczynski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ice/base/ice_type.h b/drivers/

[PATCH v2 054/148] net/ice/base: correct the return type of ice_bitmap_hweight

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes "count" is the returned value, and in this function, value of "count" and "bit" are the same, so there is no reason why these values should be declared as different types, and for returned value data type to be different. Signed-off-by: Chinh Cao Signed-off-by: Ian Stokes ---

[PATCH v2 055/148] net/ice/base: fix ice_ptp_one_port_cmd to avoid stale PHY commands

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Code using ice_ptp_one_port_cmd() (or the device specific variants for E822 and ETH56G) has a subtle bug where-in the executing of ice_ptp_exec_tmr_cmd() will cause all other ports to execute their last executed command. Most flows operate on all timers at once, but some flows s

[PATCH v2 056/148] net/ice/base: remove dead code from ice_get_ddp_pkg_state

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Removed "else" statement in ice_get_ddp_pkg_state() as it may never happen. Signed-off-by: Adrian Pielech Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ddp.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_ddp.c b/drive

[PATCH v2 057/148] net/ice/base: get rid of enum ice_status

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Replace enum ice_status with int. Also replcae ICE_SUCCESS instances with 0. Signed-off-by: Przemek Kitszel Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 12 ++-- drivers/net/ice/base/ice_ptp_hw.c | 93 +++ drivers/net/ice/base/

[PATCH v2 058/148] net/ice/base: use ICE_PTP_NOP to better indicate no action

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes A couple of E822 PTP functions use ICE_PTP_READ_TIME on the main timer to avoid any side effects when programming a single PHY port. Match the ETH56G code by using ICE_PTP_NOP instead, which better reflects the intended behavior. Signed-off-by: Jacob Keller Signed-off-by: Ian S

[PATCH v2 059/148] net/ice/base: add fw log file

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Shared code has a fw_log.c file that is used to handle the firmware logging. For DPDK it's empty, but it is added to reduce delta between DPDK and shared code. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_fwlog.c

[PATCH v2 060/148] net/ice/base: update comments regarding clearing timestamps

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes During upstream review of the introduction of ice_clear_phy_tstamp(), reviewers requested to clarify the comments regarding the function behavior. Signed-off-by: Jacob Keller Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 30 +-

[PATCH v2 061/148] net/ice/base: use "err" instead of "status" in ice_ptp_hw.c

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes With the exception of a few functions, the upstream Linux version of ice_ptp_hw.c switched to using "int err" early before the initial conversion of "enum ice_status status" to "int status" was completed. This results in the upstream version using a different variable name than t

[PATCH v2 062/148] net/ice/base: re-number E810-T subdevice IDs to match upstream

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When upstreaming the E810-T support for Linux, during review it was pointed out that the E810T subdevice IDs numbering was odd. The subdevice ID numbers seemed to be arbitrary. The upstream driver re-numbered the subdevice ID values so that they were in increasing order. Align w

[PATCH v2 063/148] net/ice/base: enable RDMA Act-Act unload paths

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes In certain unload conditions the non-standard paths to breaking down the bond supporting resources need special considerations in that there could be nodes moved out of the tree and this can cause a NULL pointer to be passed into the find node by teid function. Add in a NULL poi

[PATCH v2 064/148] net/ice/base: parse 1PPS GPIO in 1588 function caps

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Check for 1PPS GPIO association in 1588 function caps. Remove legacy code related to a workaround setting 1588 capabilities to a fixed value. Signed-off-by: Temerkhanov, Sergey Signed-off-by: Nitka, Grzegorz Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 4

[PATCH v2 065/148] net/ice/base: rename netlist check functions to match upstream

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The driver checks the netlist for nodes indicating hardware support using functions named "ice_is__present" sometimes with an additional _e810t postfix. These functions check the contents of the netlist, and don't make any direct device ID check. When upstreaming the functions,

[PATCH v2 066/148] net/ice/base: fix check for existing switch rule

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes In case the rule already exists and another VSI wants to subscribe to it new VSI list is being created and both VSIs are moved to it. Currently, the check for already existing VSI with the same rule is done based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change i

[PATCH v2 067/148] net/ice/base: fall back to safe CGU params

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes If TS PLL fails to lock to the values from the capabilities, retry with safe internal 25 MHz TCXO in nanosecond mode. This prevents PTP init fail and does not disturb nominal initialization of the device. Signed-off-by: Karol Kolacinski Signed-off-by: Ian Stokes --- drivers/n

[PATCH v2 068/148] net/ice/base: change tmr_idx to u32

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes When converting to source timer command value, tmr_idx is left shifted by 8 (CPK_SRC_SEL), which overflows the 8-bit data type. Change to 32-bit. Signed-off-by: Yochai Hagvi Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 3 +-- 1 file changed, 1 insertion(+

[PATCH v2 069/148] net/ice/base: be more verbose when preparing timer sync

2024-06-12 Thread Anatoly Burakov
Add an informative error message when preparing external PHYs for a timer sync fails. Signed-off-by: Jacob Keller Signed-off-by: Anatoly Burakov --- drivers/net/ice/base/ice_ptp_hw.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base

[PATCH v2 070/148] net/ice/base: be more verbose in configuring Rx timestamp offset

2024-06-12 Thread Anatoly Burakov
Add an info message at the end of successful Rx timestamp offset configuration. Signed-off-by: Jacob Keller Signed-off-by: Anatoly Burakov --- drivers/net/ice/base/ice_ptp_hw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base

[PATCH v2 071/148] net/ice/base: match code style to upstream

2024-06-12 Thread Anatoly Burakov
The out-of-tree shared code has a few places where we differed in how the variables were used compared to the upstream. Match what's upstream to reduce the difference between the out-of-tree and upstream drivers. Signed-off-by: Jacob Keller Signed-off-by: Anatoly Burakov --- drivers/ne

[PATCH v2 072/148] net/ice/base: update strict status when assigning BW limits

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes In the BW configuration performed by DCF functions, the strict/WFQ and priority field (referred to as Generic in the EAS) is not updated in the FW. This needs to be updated so as to not incorrectly allocate BW credits in the traffic shaping Tx scheduler. Call the function "ice_

[PATCH v2 073/148] net/ice/base: remove unused define

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes In a previous patch a define was added that is not used. This is causing issues with CI builds. Signed-off-by: Dave Ertman Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_sched.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/driv

[PATCH v2 074/148] net/ice/base: improve read retry value calculation

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Previous implementation of PHY timestamp retry value was set to a static value that had no meaning. Change it to calculate it based on a set of meaningfully named macros, as well as adjust data type to avoid overflows. Signed-off-by: Bartosz Staszewski Signed-off-by: Ian Stokes

[PATCH v2 075/148] net/ice/base: check if recipe buffer was already allocated

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Check if recipe buffer was already allocated before allocating new one. Without such check it is possible to get memory leak when overwriting pointer address. Signed-off-by: NorbertX Ciosek Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 3 +++ 1 file change

[PATCH v2 076/148] net/ice/base: fix handling recipes when reusing is not supported

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Switch recipe reuse feature caused issues on older FW which does not support this feature. Finding matching recipes was working incorrectly, what lead to resource starvation after multiple adding and removing recipes. Signed-off-by: Julianx Grajkowski Signed-off-by: Ian Stokes

[PATCH v2 077/148] net/ice/base: use correct type

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes num_rules was defined u16 but it should be u8 as it is passed to function ice_aq_sw_rules which expects u8. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 078/148] net/ice/base: read OROM in a loop

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Previously NVM was once acquired and OROM was read to RAM in 4KB chunks. Changed this to a loop in which with each iteration NVM is acquired and only 4 bytes are read. Signed-off-by: Jaroslaw Ilgiewicz Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_nvm.c | 43

[PATCH v2 079/148] net/ice/base: ignore snprintf return value

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Certain compilation targets were generating compile errors due to snprintf return value not being checked. Fix it by ignoring the return value explicitly. Signed-off-by: Waldemar Dworakowski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 2 +- 1 file change

[PATCH v2 080/148] net/ice/base: check array bounds

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Some compilation targets were generating errors due to unchecked array bounds when accessing recipe groups. Add a check to avoid that. Signed-off-by: Waldemar Dworakowski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 14 -- 1 file changed, 8 in

[PATCH v2 081/148] net/ice/base: copy output IO params from command descriptor

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Coppied output IO params returned from get netlist node pin command descriptor so SW could use it. Fixed defines related to output IO params. Signed-off-by: Dawid Zielinski dawid.zielin...@intel.com Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--

[PATCH v2 082/148] net/ice/base: enable Next Cluster ID capability

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Updated data sheet added a new capability 'Next Cluster ID' defined as 0x0096, so add a define for it. Signed-off-by: Remigiusz Konca Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 2 +- drivers/net/ice/base/ice_common.c | 5 + drivers/net/ice/b

[PATCH v2 083/148] net/ice/base: fix potential TLV length overflow

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes It's possible that an NVM with an invalid tlv_len could cause an integer overflow of next_tlv which can result an infinite loop. Fix this issue by changing next_tlv from u16 to u32 to prevent overflow. Also check that tlv_len is valid and less than pfa_len. Fix an issue with co

[PATCH v2 084/148] net/ice/base: add function to read SDP section from NVM

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Add API and definitions related to reading SDP section from NVM, related to PTP pins assignment. Signed-off-by: Tomaszx Wakula Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 23 +++ drivers/net/ice/base/ice_ptp_hw.c | 87

[PATCH v2 085/148] net/ice/base: add Floating VEB support

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes Added sw_id variables to ice_fltr_info struct and disable lan_en flag for Floating VEB VSIs. Signed-off-by: Pawel Sobczyk Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 6 -- drivers/net/ice/base/ice_switch.h | 3 +++ 2 files changed, 7 insertions(+), 2

[PATCH v2 086/148] net/ice/base: add defines for loopback mode

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes To reflect updates in the data sheet, add: - loopback mode value into ice_aqc_set_port_params - required defines to support loopback mode - added loopback mode handling in ice_port_info Signed-off-by: Pabitra Dalai Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_admin

[PATCH v2 087/148] net/ice/base: allow skipping PF clear

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes As per updated data sheet, add 'skip_clear_pf' field to ice_hw structure, which can be used to skip call to ice_clear_pf_cfg() in ice_init_hw(). Also, make 'fw_vsi_num' field of ice_hw structure visible to every component using shared code, as well as make ice_init_fltr_mgmt_str

[PATCH v2 088/148] net/ice/base: fix in the definition of the Board Type

2024-06-12 Thread Anatoly Burakov
From: Ian Stokes The new version is compliant with implementation and documentation Signed-off-by: Waldemar Dworakowski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_adminq_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_adminq_c

<    1   2   3   4   5   6   7   8   9   10   >