Re: [Intel-wired-lan] [PATCH iwl-next v1 5/5] ice: refactor to use helpers

2024-06-04 Thread Przemek Kitszel
On 6/5/24 00:13, Jesse Brandeburg wrote: Use the ice_netdev_to_pf() helper in more places and remove a bunch of boilerplate code. Not every instance could be replaced due to use of the netdev_priv() output or the vsi variable within a bunch of functions. Reviewed-by: Jacob Keller Signed-off-by:

Re: [Intel-wired-lan] [PATCH iwl-next v1 1/5] net: docs: add missing features that can have stats

2024-06-04 Thread Rahul Rameshbabu
On Tue, 04 Jun, 2024 15:13:21 -0700 Jesse Brandeburg wrote: > While trying to figure out ethtool -I | --include-statistics, I noticed > some docs got missed when implementing commit 0e9c127729be ("ethtool: > add interface to read Tx hardware timestamping statistics"). > > Fix up the docs to match

[Intel-wired-lan] [PATCH iwl-next v1 3/5] ice: add tracking of good transmit timestamps

2024-06-04 Thread Jesse Brandeburg
As a pre-requisite to implementing timestamp statistics, start tracking successful PTP timestamps. There already existed a trace event, but add a counter as well so it can be displayed by the next patch. Good count is a u64 as it is much more likely to be incremented. The existing error stats are

[Intel-wired-lan] [PATCH iwl-next v1 2/5] ice: implement ethtool standard stats

2024-06-04 Thread Jesse Brandeburg
Add support for MAC/pause/RMON stats. This enables reporting hardware statistics in a common way via: ethtool -S eth0 --all-groups and ethtool --include-statistics --show-pause eth0 While doing so, add support for one new stat, receive length error (RLEC), which is extremely unlikely to happen si

[Intel-wired-lan] [PATCH iwl-next v1 4/5] ice: implement transmit hardware timestamp statistics

2024-06-04 Thread Jesse Brandeburg
The kernel now has common statistics for transmit timestamps, so implement them in the ice driver. use via ethtool -I -T eth0 Reviewed-by: Jacob Keller Signed-off-by: Jesse Brandeburg --- $ sudo ethtool -I -T eth0 Time stamping parameters for eth0: Capabilities: hardware-transmit

[Intel-wired-lan] [PATCH iwl-next v1 1/5] net: docs: add missing features that can have stats

2024-06-04 Thread Jesse Brandeburg
While trying to figure out ethtool -I | --include-statistics, I noticed some docs got missed when implementing commit 0e9c127729be ("ethtool: add interface to read Tx hardware timestamping statistics"). Fix up the docs to match the kernel code, and while there, sort them in alphabetical order. Cc

[Intel-wired-lan] [PATCH iwl-next v1 5/5] ice: refactor to use helpers

2024-06-04 Thread Jesse Brandeburg
Use the ice_netdev_to_pf() helper in more places and remove a bunch of boilerplate code. Not every instance could be replaced due to use of the netdev_priv() output or the vsi variable within a bunch of functions. Reviewed-by: Jacob Keller Signed-off-by: Jesse Brandeburg --- drivers/net/etherne

[Intel-wired-lan] [PATCH iwl-next v1 0/5] ice: add standard stats

2024-06-04 Thread Jesse Brandeburg
The main point of this series is to implement the standard stats for the ice driver, but also add a related documentation fix and finish the series off with a cleanup that removes a bunch of code. Jesse Brandeburg (5): net: docs: add missing features that can have stats ice: implement ethtool

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: Fix S0ix residency on Meteor Lake corporate systems

2024-06-04 Thread Mark Pearson
Hi Paul On Wed, May 29, 2024, at 7:23 AM, Paul Menzel wrote: > Dear Vitaly, > > > Thank you for your reply. > > Am 29.05.24 um 13:13 schrieb Lifshits, Vitaly: > >> On 5/28/2024 1:43 PM, Paul Menzel wrote: > >>> Am 28.05.24 um 12:33 schrieb Vitaly Lifshits: From: Dima Ruinskiy On vP

Re: [Intel-wired-lan] [iwl-net][PATCH v3] e1000e: move force SMBUS near the end of enable_ulp function

2024-06-04 Thread Krzysztof Kozlowski
On 17/05/2024 15:50, Hui Wang wrote: > The commit 861e8086029e ("e1000e: move force SMBUS from enable ulp > function to avoid PHY loss issue") introduces a regression on > PCH_MTP_I219_LM18 (PCIID: 0x8086550A). Without the referred commit, the > ethernet works well after suspend and resume, but aft

[Intel-wired-lan] [PATCH iwl-next v3] ice: Add support for devlink local_forwarding param.

2024-06-04 Thread Hariprasad Kelam
> From: Pawel Kaminski > > Add support for driver-specific devlink local_forwarding param. > Supported values are "enabled", "disabled" and "prioritized". > Default configuration is set to "enabled". > > Add documentation in networking/devlink/ice.rst. > > In previous generations of Intel NI

[Intel-wired-lan] [PATCH] igb: Add MII write support

2024-06-04 Thread jackie . jone
From: Jackie Jone To facilitate running PHY parametric tests, add support for the SIOCSMIIREG ioctl. This allows a userspace application to write to the PHY registers to enable the test modes. Signed-off-by: Jackie Jone --- drivers/net/ethernet/intel/igb/igb_main.c | 4 1 file changed, 4

Re: [Intel-wired-lan] [iwl-next v1] ice: Check all ice_vsi_rebuild() errors in function

2024-06-04 Thread Simon Horman
On Tue, May 28, 2024 at 11:01:40AM +0200, Karen Ostrowska wrote: > From: Eric Joyner > > Check the return value from ice_vsi_rebuild() and prevent the usage of > incorrectly configured VSI. > > Reviewed-by: Michal Swiatkowski > Reviewed-by: Przemek Kitszel > Signed-off-by: Eric Joyner > Signe

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: Fix S0ix residency on Meteor Lake corporate systems

2024-06-04 Thread Paul Menzel
Dear Mark, Am 04.06.24 um 16:33 schrieb Mark Pearson: On Wed, May 29, 2024, at 7:23 AM, Paul Menzel wrote: Am 29.05.24 um 13:13 schrieb Lifshits, Vitaly: On 5/28/2024 1:43 PM, Paul Menzel wrote: Am 28.05.24 um 12:33 schrieb Vitaly Lifshits: From: Dima Ruinskiy On vPro systems,theĀ 

[Intel-wired-lan] [PATCH iwl-next v7 12/12] iavf: add support for Rx timestamps to hotpath

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Add support for receive timestamps to the Rx hotpath. This support only works when using the flexible descriptor format, so make sure that we request this format by default if we have receive timestamp support available in the PTP capabilities. In order to report the timestamp

[Intel-wired-lan] [PATCH iwl-next v7 09/12] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Using VIRTCHNL_VF_OFFLOAD_FLEX_DESC, the iAVF driver is capable of negotiating to enable the advanced flexible descriptor layout. Add the flexible NIC layout (RXDID=2) as a member of the Rx descriptor union. Also add bit position definitions for the status and error indication

[Intel-wired-lan] [PATCH iwl-next v7 10/12] iavf: Implement checking DD desc field

2024-06-04 Thread Mateusz Polchlopek
Rx timestamping introduced in PF driver caused the need of refactoring the VF driver mechanism to check packet fields. The function to check errors in descriptor has been removed and from now only previously set struct fields are being checked. The field DD (descriptor done) needs to be checked at

[Intel-wired-lan] [PATCH iwl-next v7 11/12] iavf: handle set and get timestamps ops

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Add handlers for the .ndo_hwtstamp_get and .ndo_hwtstamp_set ops which allow userspace to request timestamp enablement for the device. This support allows standard Linux applications to request the timestamping desired. As with other devices that support timestamping all packe

[Intel-wired-lan] [PATCH iwl-next v7 07/12] iavf: add support for indirect access to PHC time

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Implement support for reading the PHC time indirectly via the VIRTCHNL_OP_1588_PTP_GET_TIME operation. Based on some simple tests with ftrace, the latency of the indirect clock access appears to be about ~110 microseconds. This is due to the cost of preparing a message to send

[Intel-wired-lan] [PATCH iwl-next v7 08/12] iavf: periodically cache PHC time

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller The Rx timestamps reported by hardware may only have 32 bits of storage for nanosecond time. These timestamps cannot be directly reported to the Linux stack, as it expects 64bits of time. To handle this, the timestamps must be extended using an algorithm that calculates the co

[Intel-wired-lan] [PATCH iwl-next v7 04/12] iavf: add support for negotiating flexible RXDID format

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Enable support for VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC, to enable the VF driver the ability to determine what Rx descriptor formats are available. This requires sending an additional message during initialization and reset, the VIRTCHNL_OP_GET_SUPPORTED_RXDIDS. This operation requ

[Intel-wired-lan] [PATCH iwl-next v7 06/12] iavf: add initial framework for registering PTP clock

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Add the iavf_ptp.c file and fill it in with a skeleton framework to allow registering the PTP clock device. Add implementation of helper functions to check if a PTP capability is supported and handle change in PTP capabilities. Enabling virtual clock would be possible, though i

[Intel-wired-lan] [PATCH iwl-next v7 05/12] iavf: negotiate PTP capabilities

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Add a new extended capabilities negotiation to exchange information from the PF about what PTP capabilities are supported by this VF. This requires sending a VIRTCHNL_OP_1588_PTP_GET_CAPS message, and waiting for the response from the PF. Handle this early on during the VF init

[Intel-wired-lan] [PATCH iwl-next v7 03/12] virtchnl: add enumeration for the rxdid format

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Support for allowing VF to negotiate the descriptor format requires that the VF specify which descriptor format to use when requesting Rx queues. The VF is supposed to request the set of supported formats via the new VIRTCHNL_OP_GET_SUPPORTED_RXDIDS, and then set one of the sup

[Intel-wired-lan] [PATCH iwl-next v7 02/12] ice: support Rx timestamp on flex descriptor

2024-06-04 Thread Mateusz Polchlopek
From: Simei Su To support Rx timestamp offload, VIRTCHNL_OP_1588_PTP_CAPS is sent by the VF to request PTP capability and responded by the PF what capability is enabled for that VF. Hardware captures timestamps which contain only 32 bits of nominal nanoseconds, as opposed to the 64bit timestamps

[Intel-wired-lan] [PATCH iwl-next v7 01/12] virtchnl: add support for enabling PTP on iAVF

2024-06-04 Thread Mateusz Polchlopek
From: Jacob Keller Add support for allowing a VF to enable PTP feature - Rx timestamps The new capability is gated by VIRTCHNL_VF_CAP_PTP, which must be set by the VF to request access to the new operations. In addition, the VIRTCHNL_OP_1588_PTP_CAPS command is used to determine the specific cap

[Intel-wired-lan] [PATCH iwl-next v7 00/12] Add support for Rx timestamping for both ice and iavf drivers.

2024-06-04 Thread Mateusz Polchlopek
Initially, during VF creation it registers the PTP clock in the system and negotiates with PF it's capabilities. In the meantime the PF enables the Flexible Descriptor for VF. Only this type of descriptor allows to receive Rx timestamps. Enabling virtual clock would be possible, though it would pr

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

2024-06-04 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 v3 iwl-net 7/8] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog

2024-06-04 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 v3 iwl-net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool

2024-06-04 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 v3 iwl-net 5/8] ice: toggle netif_carrier when setting up XSK pool

2024-06-04 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. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Revi

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

2024-06-04 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 v3 iwl-net 3/8] ice: replace synchronize_rcu with synchronize_net

2024-06-04 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 v3 iwl-net 2/8] ice: don't busy wait for Rx queue disable in ice_qp_dis()

2024-06-04 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 v3 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-04 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 v3 iwl-net 0/8] ice: fix AF_XDP ZC timeout and concurrency issues

2024-06-04 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 iwl-net v4] ice: implement AQ download pkg retry

2024-06-04 Thread Wojciech Drewek
ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due to FW issue. Fix this by retrying five times before moving to Safe Mode. Sleep for 20 ms before retrying. This was tested with the 4.40 firmware. Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download"

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

2024-06-04 Thread Maciej Fijalkowski
On Tue, Jun 04, 2024 at 12:52:16PM +0200, Maciej Fijalkowski wrote: > On Fri, May 31, 2024 at 04:49:05PM -0700, Nelson, Shannon wrote: > > On 5/29/2024 4:23 AM, Maciej Fijalkowski wrote: > > > > > > xsk_buff_pool pointers that ice ring structs hold are updated via > > > ndo_bpf that is executed in

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

2024-06-04 Thread Maciej Fijalkowski
On Fri, May 31, 2024 at 04:49:05PM -0700, Nelson, Shannon wrote: > On 5/29/2024 4:23 AM, Maciej Fijalkowski wrote: > > > > 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 withi

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

2024-06-04 Thread Maciej Fijalkowski
On Fri, May 31, 2024 at 04:49:01PM -0700, Nelson, Shannon wrote: > On 5/29/2024 4:23 AM, Maciej Fijalkowski wrote: > > > > 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. A

Re: [Intel-wired-lan] [PATCH iwl-net v3] ice: implement AQ download pkg retry

2024-06-04 Thread Pucha, HimasekharX Reddy
> -Original Message- > From: Intel-wired-lan On Behalf Of > Wojciech Drewek > Sent: Friday, May 31, 2024 3:02 PM > To: net...@vger.kernel.org > Cc: Keller, Jacob E ; k...@kernel.org; > intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH iwl-net v3] ice: implement AQ down

Re: [Intel-wired-lan] [PATCH net, v2] ice: avoid IRQ collision to fix init failure on ACPI S3 resume

2024-06-04 Thread Pucha, HimasekharX Reddy
> -Original Message- > From: Intel-wired-lan On Behalf Of Ricky > Wu > Sent: Thursday, May 30, 2024 7:52 PM > To: Brandeburg, Jesse > Cc: pmen...@molgen.mpg.de; michal.swiatkow...@linux.intel.com; Drewek, > Wojciech ; intel-wired-...@lists.osuosl.org; > rickywu0...@gmail.com; linux-ker

Re: [Intel-wired-lan] [PATCH iwl-next v3] ice: Add support for devlink local_forwarding param.

2024-06-04 Thread Wojciech Drewek
On 04.06.2024 07:56, Hariprasad Kelam wrote: > > >> From: Pawel Kaminski >> >> Add support for driver-specific devlink local_forwarding param. >> Supported values are "enabled", "disabled" and "prioritized". >> Default configuration is set to "enabled". >> >> Add documentation in networking/d

Re: [Intel-wired-lan] [PATCH iwl-next v3] ice: Add support for devlink local_forwarding param.

2024-06-04 Thread Wojciech Drewek
On 03.06.2024 14:46, Jiri Pirko wrote: > Mon, Jun 03, 2024 at 02:31:46PM CEST, wojciech.dre...@intel.com wrote: >> From: Pawel Kaminski >> >> Add support for driver-specific devlink local_forwarding param. >> Supported values are "enabled", "disabled" and "prioritized". >> Default configuration