Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy

2024-06-27 Thread Kurt Kanzenbach
Hi Sriram, On Fri Aug 04 2023, Sriram Yagnaraman wrote: > The first couple of patches adds helper funcctions to prepare for AF_XDP > zero-copy support which comes in the last couple of patches, one each > for Rx and TX paths. > > As mentioned in v1 patchset [0], I don't have access to an actual IG

[Intel-wired-lan] [iwl-next v1] ice: update representor after SF VSI config

2024-06-27 Thread Michal Swiatkowski
VSI for subfunction is only allocated when port representor is created. The VSI id isn't correct at this state. Update the representor with correct VSI id after the VSI is configured. Signed-off-by: Michal Swiatkowski --- It should be squashed with: 8a469e1a1cf9 ("ice: create port representor for

Re: [Intel-wired-lan] [iwl-next v1] ice: remove eswitch rebuild

2024-06-27 Thread Simon Horman
On Mon, Jun 24, 2024 at 10:05:10AM +0200, Michal Swiatkowski wrote: > Since the port representors are added one by one there is no need to do > eswitch rebuild. Each port representor is detached and attached in VF > reset path. > > Reviewed-by: Wojciech Drewek > Signed-off-by: Michal Swiatkowski

Re: [Intel-wired-lan] [iwl-next v5 04/15] ice: treat subfunction VSI the same as PF VSI

2024-06-27 Thread Maciej Fijalkowski
On Thu, Jun 06, 2024 at 01:24:52PM +0200, Michal Swiatkowski wrote: > When subfunction VSI is open the same code as for PF VSI should be > executed. Also when up is complete. Reflect that in code by adding > subfunction VSI to consideration. > > In case of stopping, PF doesn't have additional task

Re: [Intel-wired-lan] [iwl-next v5 07/15] ice: implement netdev for subfunction

2024-06-27 Thread Maciej Fijalkowski
On Thu, Jun 06, 2024 at 01:24:55PM +0200, Michal Swiatkowski wrote: > From: Piotr Raczynski > > Configure netdevice for subfunction usecase. Mostly it is reusing ops > from the PF netdevice. > > SF netdev is linked to devlink port registered after SF activation. > > Reviewed-by: Simon Horman >

Re: [Intel-wired-lan] [iwl-next v5 04/15] ice: treat subfunction VSI the same as PF VSI

2024-06-27 Thread Michal Swiatkowski
On Thu, Jun 27, 2024 at 01:07:22PM +0200, Maciej Fijalkowski wrote: > On Thu, Jun 06, 2024 at 01:24:52PM +0200, Michal Swiatkowski wrote: > > When subfunction VSI is open the same code as for PF VSI should be > > executed. Also when up is complete. Reflect that in code by adding > > subfunction VSI

Re: [Intel-wired-lan] [iwl-next v5 07/15] ice: implement netdev for subfunction

2024-06-27 Thread Michal Swiatkowski
On Thu, Jun 27, 2024 at 01:13:47PM +0200, Maciej Fijalkowski wrote: > On Thu, Jun 06, 2024 at 01:24:55PM +0200, Michal Swiatkowski wrote: > > From: Piotr Raczynski > > > > Configure netdevice for subfunction usecase. Mostly it is reusing ops > > from the PF netdevice. > > > > SF netdev is linked

[Intel-wired-lan] [PATCH v4 iwl-net 0/8] ice: fix AF_XDP ZC timeout and concurrency issues

2024-06-27 Thread Maciej Fijalkowski
Hi, changes included in this patchset address an issue that customer has been facing when AF_XDP ZC Tx sockets were used in combination with flow control and regular Tx traffic. After executing: ethtool --set-priv-flags $dev link-down-on-close on ethtool -A $dev rx on tx on launching multiple ZC

[Intel-wired-lan] [PATCH v4 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-27 Thread Maciej Fijalkowski
From: Michal Kubiak Address a scenario in which XSK ZC Tx produces descriptors to XDP Tx ring when link is either not yet fully initialized or process of stopping the netdev has already started. To avoid this, add checks against carrier readiness in ice_xsk_wakeup() and in ice_xmit_zc(). One coul

[Intel-wired-lan] [PATCH v4 iwl-net 2/8] ice: don't busy wait for Rx queue disable in ice_qp_dis()

2024-06-27 Thread Maciej Fijalkowski
When ice driver is spammed with multiple xdpsock instances and flow control is enabled, there are cases when Rx queue gets stuck and unable to reflect the disable state in QRX_CTRL register. Similar issue has previously been addressed in commit 13a6233b033f ("ice: Add support to enable/disable all

[Intel-wired-lan] [PATCH v4 iwl-net 3/8] ice: replace synchronize_rcu with synchronize_net

2024-06-27 Thread Maciej Fijalkowski
Given that ice_qp_dis() is called under rtnl_lock, synchronize_net() can be called instead of synchronize_rcu() so that XDP rings can finish its job in a faster way. Also let us do this as earlier in XSK queue disable flow. Additionally, turn off regular Tx queue before disabling irqs and NAPI. F

[Intel-wired-lan] [PATCH v4 iwl-net 4/8] ice: modify error handling when setting XSK pool in ndo_bpf

2024-06-27 Thread Maciej Fijalkowski
Don't bail out right when spotting an error within ice_qp_{dis,ena}() but rather track error and go through whole flow of disabling and enabling queue pair. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Inte

[Intel-wired-lan] [PATCH v4 iwl-net 5/8] ice: toggle netif_carrier when setting up XSK pool

2024-06-27 Thread Maciej Fijalkowski
This so we prevent Tx timeout issues. One of conditions checked on running in the background dev_watchdog() is netif_carrier_ok(), so let us turn it off when we disable the queues that belong to a q_vector where XSK pool is being configured. Turn carrier on in ice_qp_ena() only when ice_get_link_st

[Intel-wired-lan] [PATCH v4 iwl-net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool

2024-06-27 Thread Maciej Fijalkowski
xsk_buff_pool pointers that ice ring structs hold are updated via ndo_bpf that is executed in process context while it can be read by remote CPU at the same time within NAPI poll. Use synchronize_net() after pointer update and {READ,WRITE}_ONCE() when working with mentioned pointer. Fixes: 2d4238f

[Intel-wired-lan] [PATCH v4 iwl-net 7/8] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog

2024-06-27 Thread Maciej Fijalkowski
It is read by data path and modified from process context on remote cpu so it is needed to use WRITE_ONCE to clear the pointer. Fixes: efc2214b6047 ("ice: Add support for XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalko

[Intel-wired-lan] [PATCH v4 iwl-net 8/8] ice: xsk: fix txq interrupt mapping

2024-06-27 Thread Maciej Fijalkowski
ice_cfg_txq_interrupt() internally handles XDP Tx ring. Do not use ice_for_each_tx_ring() in ice_qvec_cfg_msix() as this causing us to treat XDP ring that belongs to queue vector as Tx ring and therefore misconfiguring the interrupts. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by

[Intel-wired-lan] [PATCH iwl-next v3 0/7] Switch API optimizations

2024-06-27 Thread Marcin Szycik
Optimize the process of creating a recipe in the switch block by removing duplicate switch ID words and changing how result indexes are fitted into recipes. In many cases this can decrease the number of recipes required to add a certain set of rules, potentially allowing a more varied set of rules

[Intel-wired-lan] [PATCH iwl-next v3 2/7] ice: Remove reading all recipes before adding a new one

2024-06-27 Thread Marcin Szycik
From: Michal Swiatkowski The content of the first read recipe is used as a template when adding a recipe. It isn't needed - only prune index is directly set from there. Set it in the code instead. Also, now there's no need to set rid and lookup indexes to 0, as the whole recipe buffer is initiali

[Intel-wired-lan] [PATCH iwl-next v3 4/7] ice: remove unused recipe bookkeeping data

2024-06-27 Thread Marcin Szycik
From: Michal Swiatkowski Remove root_buf from recipe struct. Its only usage was in ice_find_recp(), where if recipe had an inverse action, it was skipped, but actually the driver never adds inverse actions, so effectively it was pointless. Without root_buf, the recipe data element in ice_add_sw_

[Intel-wired-lan] [PATCH iwl-next v3 5/7] ice: Optimize switch recipe creation

2024-06-27 Thread Marcin Szycik
Currently when creating switch recipes, switch ID is always added as the first word in every recipe. There are only 5 words in a recipe, so one word is always wasted. This is also true for the last recipe, which stores result indexes (in case of chain recipes). Therefore the maximum usable length o

[Intel-wired-lan] [PATCH iwl-next v3 1/7] ice: Remove unused struct ice_prot_lkup_ext members

2024-06-27 Thread Marcin Szycik
Remove field_off as it's never used. Remove done bitmap, as its value is only checked and never assigned. Reusing sub-recipes while creating new root recipes is currently not supported in the driver. Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik --- .../ethernet/intel/ice/ice_proto

[Intel-wired-lan] [PATCH iwl-next v3 7/7] ice: Add tracepoint for adding and removing switch rules

2024-06-27 Thread Marcin Szycik
Track the number of rules and recipes added to switch. Add a tracepoint to ice_aq_sw_rules(), which shows both rule and recipe count. This information can be helpful when designing a set of rules to program to the hardware, as it shows where the practical limit is. Actual limits are known (64 recip

[Intel-wired-lan] [PATCH iwl-next v3 3/7] ice: Simplify bitmap setting in adding recipe

2024-06-27 Thread Marcin Szycik
From: Michal Swiatkowski Remove unnecessary size checks when copying bitmaps in ice_add_sw_recipe() and replace them with compile time assert. Check if the bitmaps are equal size, as they are copied both ways. Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Co-developed-by: Marc

[Intel-wired-lan] [PATCH iwl-next v3 6/7] ice: Remove unused members from switch API

2024-06-27 Thread Marcin Szycik
Remove several members of struct ice_sw_recipe and struct ice_prot_lkup_ext. Remove struct ice_recp_grp_entry and struct ice_pref_recipe_group, since they are now unused as well. All of the deleted members were only written to and never read, so it's pointless to keep them. Reviewed-by: Przemek K

[Intel-wired-lan] [PATCH iwl-next 0/7] ice: Cleanup and refactor PTP pin handling

2024-06-27 Thread Karol Kolacinski
This series cleans up current PTP GPIO pin handling, fixes minor bugs, refactors implementation for all products, introduces SDP (Software Definable Pins) for E825C and implements reading SDP section from NVM for E810 products. Karol Kolacinski (5): ice: Implement ice_ptp_pin_desc ice: Add SDP

[Intel-wired-lan] [PATCH iwl-next 1/7] ice: Implement ice_ptp_pin_desc

2024-06-27 Thread Karol Kolacinski
Add a new internal structure describing PTP pins. Use the new structure for all non-E810T products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c | 271 --- drivers/net/ethernet/intel/ice/ice_ptp.h | 65 --

[Intel-wired-lan] [PATCH iwl-next 2/7] ice: Add SDPs support for E825C

2024-06-27 Thread Karol Kolacinski
Add support of PTP SDPs (Software Definable Pins) for E825C products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/i

[Intel-wired-lan] [PATCH iwl-next 3/7] ice: Align E810T GPIO to other products

2024-06-27 Thread Karol Kolacinski
Instead of having separate PTP GPIO implementation for E810T, use existing one from all other products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_gnss.c | 4 +- drivers/net/ethernet/intel/ice/ice_ptp.c| 460 +

[Intel-wired-lan] [PATCH iwl-next 4/7] ice: Cache perout/extts requests and check flags

2024-06-27 Thread Karol Kolacinski
Cache original PTP GPIO requests instead of saving each parameter in internal structures for periodic output or external timestamp request. Factor out all periodic output register writes from ice_ptp_cfg_clkout to a separate function to improve readability. Reviewed-by: Arkadiusz Kubalewski Sign

[Intel-wired-lan] [PATCH iwl-next 5/7] ice: Disable shared pin on E810 on setfunc

2024-06-27 Thread Karol Kolacinski
When setting a new supported function for a pin on E810, disable other enabled pin that shares the same GPIO. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c | 65 1 file changed, 65 insertions(+) diff --gi

[Intel-wired-lan] [PATCH iwl-next 7/7] ice: Enable 1PPS out from CGU for E825C products

2024-06-27 Thread Karol Kolacinski
From: Sergey Temerkhanov Implement 1PPS signal enabling/disabling in CGU. The amplitude is always the maximum in this implementation Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Sergey Temerkhanov Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet

[Intel-wired-lan] [PATCH iwl-next 6/7] ice: Read SDP section from NVM for pin definitions

2024-06-27 Thread Karol Kolacinski
From: Yochai Hagvi PTP pins assignment and their related SDPs (Software Definable Pins) are currently hardcoded. Fix that by reading NVM section instead on products supporting this, which are E810 products. If SDP section is not defined in NVM, the driver continues to use the hardcoded table. Re

Re: [Intel-wired-lan] [PATCH iwl-next 7/7] ice: Enable 1PPS out from CGU for E825C products

2024-06-27 Thread Paul Menzel
Dear Karol, dear Sergey, Thank you for the patch. Am 27.06.24 um 17:09 schrieb Karol Kolacinski: From: Sergey Temerkhanov Implement 1PPS signal enabling/disabling in CGU. The amplitude is always the maximum in this implementation (Please add a dot/period at the end of sentences.) Could y

Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy

2024-06-27 Thread Benjamin Steinke
On Thursday, 27 June 2024, 09:07:55 CEST, Kurt Kanzenbach wrote: > Hi Sriram, > > On Fri Aug 04 2023, Sriram Yagnaraman wrote: > > The first couple of patches adds helper funcctions to prepare for AF_XDP > > zero-copy support which comes in the last couple of patches, one each > > for Rx and TX pa

Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy

2024-06-27 Thread Kurt Kanzenbach
Hi Benjamin, On Thu Jun 27 2024, Benjamin Steinke wrote: > On Thursday, 27 June 2024, 09:07:55 CEST, Kurt Kanzenbach wrote: >> Hi Sriram, >> >> On Fri Aug 04 2023, Sriram Yagnaraman wrote: >> > The first couple of patches adds helper funcctions to prepare for AF_XDP >> > zero-copy support which c

Re: [Intel-wired-lan] [PATCH iwl-net v5] i40e: fix: remove needless retries of NVM update

2024-06-27 Thread Simon Horman
On Tue, Jun 25, 2024 at 08:49:53PM +0200, Aleksandr Loktionov wrote: > Remove wrong EIO to EGAIN conversion and pass all errors as is. > > After commit 230f3d53a547 ("i40e: remove i40e_status"), which should only > replace F/W specific error codes with Linux kernel generic, all EIO errors > sudden

Re: [Intel-wired-lan] [PATCH net 1/1] igc: Fix double reset adapter triggered from a single taprio cmd

2024-06-27 Thread Vladimir Oltean
On Wed, Jun 26, 2024 at 09:19:12AM +0800, Abdul Rahim, Faizal wrote: > Added Vladimir and Husaini in CC. > > On 25/6/2024 4:26 pm, Faizal Rahim wrote: > > Following the implementation of "igc: Add TransmissionOverrun counter" > > patch, when a taprio command is triggered by user, igc processes two