[Intel-wired-lan] [PATCH v8] ice: Add get/set hw address for VFs using devlink commands

2024-04-04 Thread Karthik Sundaravel
Dear Maintainers, Thanks for the review and suggestions for my patch. v7 -> v8 - Added const keyword for the parameter ``mac`` in ice_set_vf_fn_mac() v6 -> v7 - Addressed Smatch and checkpatch issues v5 -> v6 - Changed data type of vf_id to u16 - Used container_of(

[Intel-wired-lan] [PATCH v8] ice: Add get/set hw address for VFs using devlink commands

2024-04-04 Thread Karthik Sundaravel
Changing the MAC address of the VFs is currently unsupported via devlink. Add the function handlers to set and get the HW address for the VFs. Signed-off-by: Karthik Sundaravel --- drivers/net/ethernet/intel/ice/ice_devlink.c | 60 ++- drivers/net/ethernet/intel/ice/ice_sriov.c

[Intel-wired-lan] [PATCH v5 iwl-next 00/12] Introduce ETH56G PHY model for E825C products

2024-04-04 Thread Karol Kolacinski
E825C products have a different PHY model than E822, E823 and E810 products. This PHY is ETH56G and its support is necessary to have functional PTP stack for E825C products. Grzegorz Nitka (2): ice: Add NAC Topology device capability parser ice: Adjust PTP init for 2x50G E825C devices Jacob K

[Intel-wired-lan] [PATCH v5 iwl-next 02/12] ice: Introduce helper to get tmr_cmd_reg values

2024-04-04 Thread Karol Kolacinski
From: Jacob Keller Multiple places in the driver code need to convert enum ice_ptp_tmr_cmd values into register bits for both the main timer and the PHY port timers. The main MAC register has one bit scheme for timer commands, while the PHY commands use a different scheme. The E810 and E830 devi

[Intel-wired-lan] [PATCH v5 iwl-next 03/12] ice: Implement Tx interrupt enablement functions

2024-04-04 Thread Karol Kolacinski
From: Sergey Temerkhanov Introduce functions enabling/disabling Tx TS interrupts for the E822 and ETH56G PHYs Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c| 63

[Intel-wired-lan] [PATCH v5 iwl-next 01/12] ice: Introduce ice_ptp_hw struct

2024-04-04 Thread Karol Kolacinski
Create new ice_ptp_hw struct and use it for all HW and PTP-related fields from struct ice_hw. Replace definitions with struct fields, which values are set accordingly to a specific device. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V4 -> V

[Intel-wired-lan] [PATCH v5 iwl-next 04/12] ice: Add PHY OFFSET_READY register clearing

2024-04-04 Thread Karol Kolacinski
Add a possibility to mark all transmitted/received timestamps as invalid by clearing PHY OFFSET_READY registers. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c| 11 --- drivers/net/ethernet/int

[Intel-wired-lan] [PATCH v5 iwl-next 06/12] ice: Introduce ice_get_base_incval() helper

2024-04-04 Thread Karol Kolacinski
From: Jacob Keller Add a new helper for getting base clock increment value for specific HW. Signed-off-by: Jacob Keller Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V4 -> V5: Removed unused UNKNOWN_INCVAL_E82X drivers/net/ethernet/intel

[Intel-wired-lan] [PATCH v5 iwl-next 08/12] ice: Change CGU regs struct to anonymous

2024-04-04 Thread Karol Kolacinski
Simplify the code by using anonymous struct in CGU registers instead of naming each structure 'field'. Suggested-by: Przemek Kitszel Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_cgu_regs.h | 12 ++--- dri

[Intel-wired-lan] [PATCH v5 iwl-next 09/12] ice: Add support for E825-C TS PLL handling

2024-04-04 Thread Karol Kolacinski
From: Michal Michalik The CGU layout of E825-C is a little different than E822/E823. Add support the new hardware adding relevant functions. Signed-off-by: Michal Michalik Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V4 -> V5: added UL to

[Intel-wired-lan] [PATCH v5 iwl-next 05/12] ice: Move CGU block

2024-04-04 Thread Karol Kolacinski
From: Sergey Temerkhanov Move CGU block to the beginning of ice_ptp_hw.c Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 984 ++-- 1 file change

[Intel-wired-lan] [PATCH v5 iwl-next 07/12] ice: Introduce ETH56G PHY model for E825C products

2024-04-04 Thread Karol Kolacinski
From: Sergey Temerkhanov E825C products feature a new PHY model - ETH56G. Introduces all necessary PHY definitions, functions etc. for ETH56G PHY, analogous to E82X and E810 ones with addition of a few HW-specific functionalities for ETH56G like one-step timestamping. It ensures correct PTP ini

[Intel-wired-lan] [PATCH v5 iwl-next 10/12] ice: Add NAC Topology device capability parser

2024-04-04 Thread Karol Kolacinski
From: Grzegorz Nitka Add new device capability ICE_AQC_CAPS_NAC_TOPOLOGY which allows to determine the mode of operation (1 or 2 NAC). Define a new structure to store data from new capability and corresponding parser code. Co-developed-by: Prathisna Padmasanan Signed-off-by: Prathisna Padmasana

[Intel-wired-lan] [PATCH v5 iwl-next 11/12] ice: Support 2XNAC configuration using auxbus

2024-04-04 Thread Karol Kolacinski
There are E825C products featuring 2 NACs. Those have only one source clock on the primary NAC. For those devices, there should be only one clock controller on the primary NAC. All PFs from both NACs should connect as auxiliary devices to the auxiliary driver on the primary NAC. Reviewed-by: Igor

[Intel-wired-lan] [PATCH v5 iwl-next 12/12] ice: Adjust PTP init for 2x50G E825C devices

2024-04-04 Thread Karol Kolacinski
From: Grzegorz Nitka >From FW/HW perspective, 2 port topology in E825C devices requires merging of 2 port mapping internally and breakout mapping externally. As a consequence, it requires different port numbering from PTP code perspective. For that topology, pf_id can not be used to index PTP por

Re: [Intel-wired-lan] [PATCH net-next v6 19/21] pfcp: always set pfcp metadata

2024-04-04 Thread Michal Swiatkowski
On Wed, Apr 03, 2024 at 10:59:36PM +0200, Arnd Bergmann wrote: > On Wed, Mar 27, 2024, at 16:23, Alexander Lobakin wrote: > > > +static int pfcp_encap_recv(struct sock *sk, struct sk_buff *skb) > > +{ > > + IP_TUNNEL_DECLARE_FLAGS(flags) = { }; > > + struct metadata_dst *tun_dst; > > + struc

Re: [Intel-wired-lan] [PATCH net-next v6 19/21] pfcp: always set pfcp metadata

2024-04-04 Thread Arnd Bergmann
On Thu, Apr 4, 2024, at 11:45, Michal Swiatkowski wrote: > On Wed, Apr 03, 2024 at 10:59:36PM +0200, Arnd Bergmann wrote: >> On Wed, Mar 27, 2024, at 16:23, Alexander Lobakin wrote: >> >> The memcpy() in the ip_tunnel_info_opts_set() causes >> a string.h fortification warning, with at least gcc-13

Re: [Intel-wired-lan] [PATCH net-next v6 19/21] pfcp: always set pfcp metadata

2024-04-04 Thread Michal Swiatkowski
On Thu, Apr 04, 2024 at 11:56:29AM +0200, Arnd Bergmann wrote: > On Thu, Apr 4, 2024, at 11:45, Michal Swiatkowski wrote: > > On Wed, Apr 03, 2024 at 10:59:36PM +0200, Arnd Bergmann wrote: > >> On Wed, Mar 27, 2024, at 16:23, Alexander Lobakin wrote: > >> > >> The memcpy() in the ip_tunnel_info_op

Re: [Intel-wired-lan] [PATCH v5 iwl-next 03/12] ice: Implement Tx interrupt enablement functions

2024-04-04 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 4 Apr 2024 11:09:51 +0200 > From: Sergey Temerkhanov > > Introduce functions enabling/disabling Tx TS interrupts > for the E822 and ETH56G PHYs > > Signed-off-by: Sergey Temerkhanov > Reviewed-by: Przemek Kitszel > Reviewed-by: Arkadiusz Kubalewski > Signe

Re: [Intel-wired-lan] [PATCH v5 iwl-next 09/12] ice: Add support for E825-C TS PLL handling

2024-04-04 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 4 Apr 2024 11:09:57 +0200 > From: Michal Michalik > > The CGU layout of E825-C is a little different than E822/E823. Add > support the new hardware adding relevant functions. > > Signed-off-by: Michal Michalik > Reviewed-by: Przemek Kitszel > Reviewed-by: A

Re: [Intel-wired-lan] [PATCH v5 iwl-next 05/12] ice: Move CGU block

2024-04-04 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 4 Apr 2024 11:09:53 +0200 > From: Sergey Temerkhanov > > Move CGU block to the beginning of ice_ptp_hw.c > > Signed-off-by: Sergey Temerkhanov > Reviewed-by: Przemek Kitszel > Reviewed-by: Arkadiusz Kubalewski > Signed-off-by: Karol Kolacinski [...] > +

Re: [Intel-wired-lan] [PATCH net-next 2/3] ethtool: Introduce max power support

2024-04-04 Thread Wojciech Drewek
On 04.04.2024 02:18, Jakub Kicinski wrote: > On Wed, 3 Apr 2024 12:19:57 +0200 Wojciech Drewek wrote: >> You're saying that if min_pwr_allowed or max_pwr_allowed taken from get op >> are 0 than we should not allow to set max_pwr_reset and max_pwr_set? > > Yes, return -EOPNOTSUPP and point extac

Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support

2024-04-04 Thread Wojciech Drewek
On 03.04.2024 15:40, Andrew Lunn wrote: > On Wed, Apr 03, 2024 at 03:18:44PM +0200, Wojciech Drewek wrote: >> >> >> On 02.04.2024 16:46, Andrew Lunn wrote: >>> On Tue, Apr 02, 2024 at 01:38:59PM +0200, Wojciech Drewek wrote: On 30.03.2024 22:57, Andrew Lunn wrote: > On Fri, Ma

Re: [Intel-wired-lan] [PATCH v5 iwl-next 09/12] ice: Add support for E825-C TS PLL handling

2024-04-04 Thread Kolacinski, Karol
From: Aleksander Lobakin  Date: Thu,  4 Apr 2024 13:11 +0200 [...] > > +#define NAC_CGU_DWORD16_E825C 0x40 > > +union nac_cgu_dword16_e825c { > > + struct { > > + u32 synce_remndr : 6; > > + u32 synce_phlmt_en : 1; > > + u32 misc13 : 17; > > + u3

Re: [Intel-wired-lan] [PATCH v5 iwl-next 05/12] ice: Move CGU block

2024-04-04 Thread Kolacinski, Karol
From: Aleksander Lobakin   Date: Thu,  4 Apr 2024 13:08 +0200 [...] > > + case ICE_TIME_REF_FREQ_25_000: > > + return "25 MHz"; > > + case ICE_TIME_REF_FREQ_122_880: > > + return "122.88 MHz"; > > + case ICE_TIME_REF_FREQ_125_000: > > + return "125 M

Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support

2024-04-04 Thread Wojciech Drewek
On 03.04.2024 15:49, Andrew Lunn wrote: >>> $ ethtool --set-module enp1s0f0np0 power-max-set 4000 >>> >>> actually talk to the SFP module and tell it the maximum power it can >>> consume. So in this case, it is not the cage, but the module? >> >> It does not work that way in ice example. >>> >>>

Re: [Intel-wired-lan] [PATCH iwl-next v8 2/2] ice: Implement 'flow-type ether' rules

2024-04-04 Thread Simon Horman
On Wed, Apr 03, 2024 at 12:24:02PM +0200, Lukasz Plachno wrote: > From: Jakub Buchocki > > Add support for 'flow-type ether' Flow Director rules via ethtool. > > Create packet segment info for filter configuration based on ethtool > command parameters. Reuse infrastructure already created for >

Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support

2024-04-04 Thread Andrew Lunn
On Thu, Apr 04, 2024 at 02:45:43PM +0200, Wojciech Drewek wrote: > > > On 03.04.2024 15:49, Andrew Lunn wrote: > >>> $ ethtool --set-module enp1s0f0np0 power-max-set 4000 > >>> > >>> actually talk to the SFP module and tell it the maximum power it can > >>> consume. So in this case, it is not the

[Intel-wired-lan] [PATCH iwl-next v5] ice: Add automatic VF reset on Tx MDD events

2024-04-04 Thread Marcin Szycik
In cases when VF sends malformed packets that are classified as malicious, it can cause Tx queue to freeze as a result of Malicious Driver Detection event. Such malformed packets can appear as a result of a faulty userspace app running on VF. This frozen queue can be stuck for several minutes being

Re: [Intel-wired-lan] [PATCH net-next v6 15/21] ip_tunnel: use a separate struct to store tunnel params in the kernel

2024-04-04 Thread Dan Carpenter
On Wed, Mar 27, 2024 at 04:23:52PM +0100, Alexander Lobakin wrote: > +bool ip_tunnel_parm_to_user(void __user *data, struct ip_tunnel_parm_kern > *kp) > +{ > + struct ip_tunnel_parm p; > + > + strscpy(p.name, kp->name); We need to clear out p before copying to user space to avoid an infor

[Intel-wired-lan] ice: lldp packets dropped after changing number of channels

2024-04-04 Thread Matěj Grégr
Hello, we are facing an issue with Intel 100G E810-C card. If we change number of channels using ethtool -L, LLDP packets stop to be forwarded to the network stack and user space. Firmware-based lldp agent is disabled: # ethtool --show-priv-flags hge11 Private flags for hge11: link-down-on-

[Intel-wired-lan] [PATCH net-next v9 0/9] net: intel: start The Great Code Dedup + Page Pool for iavf

2024-04-04 Thread Alexander Lobakin
Here's a two-shot: introduce {,Intel} Ethernet common library (libeth and libie) and switch iavf to Page Pool. Details are in the commit messages; here's a summary: Not a secret there's a ton of code duplication between two and more Intel ethernet modules. Before introducing new changes, which wou

[Intel-wired-lan] [PATCH net-next v9 1/9] net: intel: introduce {, Intel} Ethernet common library

2024-04-04 Thread Alexander Lobakin
Not a secret there's a ton of code duplication between two and more Intel ethernet modules. Before introducing new changes, which would need to be copied over again, start decoupling the already existing duplicate functionality into a new module, which will be shared between several Intel Ethernet

[Intel-wired-lan] [PATCH net-next v9 2/9] iavf: kill "legacy-rx" for good

2024-04-04 Thread Alexander Lobakin
Ever since build_skb() became stable, the old way with allocating an skb for storing the headers separately, which will be then copied manually, was slower, less flexible, and thus obsolete. * It had higher pressure on MM since it actually allocates new pages, which then get split and refcount-b

[Intel-wired-lan] [PATCH net-next v9 3/9] iavf: drop page splitting and recycling

2024-04-04 Thread Alexander Lobakin
As an intermediate step, remove all page splitting/recycling code. Just always allocate a new page and don't touch its refcount, so that it gets freed by the core stack later. Same for the "in-place" recycling, i.e. when an unused buffer gets assigned to a first needs-refilling descriptor. In some

[Intel-wired-lan] [PATCH net-next v9 4/9] slab: introduce kvmalloc_array_node() and kvcalloc_node()

2024-04-04 Thread Alexander Lobakin
Add NUMA-aware counterparts for kvmalloc_array() and kvcalloc() to be able to flexibly allocate arrays for a particular node. Rewrite kvmalloc_array() to kvmalloc_array_node(NUMA_NO_NODE) call. Signed-off-by: Alexander Lobakin --- include/linux/slab.h | 17 +++-- 1 file changed, 15 i

[Intel-wired-lan] [PATCH net-next v9 5/9] page_pool: constify some read-only function arguments

2024-04-04 Thread Alexander Lobakin
There are several functions taking pointers to data they don't modify. This includes statistics fetching, page and page_pool parameters, etc. Constify the pointers, so that call sites will be able to pass const pointers as well. No functional changes, no visible changes in functions sizes. Reviewe

[Intel-wired-lan] [PATCH net-next v9 6/9] page_pool: add DMA-sync-for-CPU inline helper

2024-04-04 Thread Alexander Lobakin
Each driver is responsible for syncing buffers written by HW for CPU before accessing them. Almost each PP-enabled driver uses the same pattern, which could be shorthanded into a static inline to make driver code a little bit more compact. Introduce a simple helper which performs DMA synchronizatio

[Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-04 Thread Alexander Lobakin
Add a couple intuitive helpers to hide Rx buffer implementation details in the library and not multiplicate it between drivers. The settings are sorta optimized for 100G+ NICs, but nothing really HW-specific here. Use the new page_pool_dev_alloc() to dynamically switch between split-page and full-p

[Intel-wired-lan] [PATCH net-next v9 8/9] iavf: pack iavf_ring more efficiently

2024-04-04 Thread Alexander Lobakin
Before replacing the Rx buffer management with libie, clean up &iavf_ring a bit. There are several fields not used anywhere in the code -- simply remove them. Move ::tail up to remove a hole. Replace ::arm_wb boolean with 1-bit flag in ::flags to free 1 more byte. Finally, move ::prev_pkt_ctr out o

[Intel-wired-lan] [PATCH net-next v9 9/9] iavf: switch to Page Pool

2024-04-04 Thread Alexander Lobakin
Now that the IAVF driver simply uses dev_alloc_page() + free_page() with no custom recycling logics, it can easily be switched to using Page Pool / libeth API instead. This allows to removing the whole dancing around headroom, HW buffer size, and page order. All DMA-for-device is now done in the PP

Re: [Intel-wired-lan] [PATCH net-next v6 15/21] ip_tunnel: use a separate struct to store tunnel params in the kernel

2024-04-04 Thread Alexander Lobakin
From: Dan Carpenter Date: Thu, 4 Apr 2024 17:24:23 +0300 > On Wed, Mar 27, 2024 at 04:23:52PM +0100, Alexander Lobakin wrote: >> +bool ip_tunnel_parm_to_user(void __user *data, struct ip_tunnel_parm_kern >> *kp) >> +{ >> +struct ip_tunnel_parm p; >> + >> +strscpy(p.name, kp->name); > >

[Intel-wired-lan] [PATCH net-next] ip_tunnel: harden copying IP tunnel params to userspace

2024-04-04 Thread Alexander Lobakin
Structures which are about to be copied to userspace shouldn't have uninitialized fields or paddings. memset() the whole &ip_tunnel_parm in ip_tunnel_parm_to_user() before filling it with the kernel data. The compilers will hopefully combine writes to it. Fixes: 117aef12a7b1 ("ip_tunnel: use a sep

[Intel-wired-lan] [tnguy-net-queue:dev-queue] BUILD SUCCESS 36adaac21a9d983bad967d089a7d66ac54f072ba

2024-04-04 Thread kernel test robot
gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240404 gcc arc randconfig-002-20240404 gcc arm

Re: [Intel-wired-lan] [PATCH iwl-next v1 1/5] ixgbe: Add support for E610 FW Admin Command Interface

2024-04-04 Thread Vinicius Costa Gomes
Piotr Kwapulinski writes: > Add low level support for Admin Command Interface (ACI). ACI is the > Firmware interface used by a driver to communicate with E610 adapter. Add > the following ACI features: > - data structures, macros, register definitions > - commands handling > - events handling >

Re: [Intel-wired-lan] [PATCH iwl-next v1 3/5] ixgbe: Add link management support for E610 device

2024-04-04 Thread Vinicius Costa Gomes
Piotr Kwapulinski writes: > Add low level link management support for E610 device. Link management > operations are handled via the Admin Command Interface. Add the following > link management operations: > - get link capabilities > - set up link > - get media type > - get link status, link statu

[Intel-wired-lan] How to set interface up / down ?

2024-04-04 Thread James Dutton
Hi, I have source code for a sfp phy that is setting phydev->link = 1 What else do I have to do to make ethtool think the Link detected: yes Is there a function I need to call from the phy code to cause the carrier state to be UP ? ethtool always shows "Link detected: no" state. Kind Regards Ja