Re: [Intel-wired-lan] [PATCH iwl-next v4 12/12] vfio/ice: Implement vfio_pci driver for E800 devices

2023-12-07 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, December 8, 2023 11:42 AM > > > From: Alex Williamson > > Sent: Friday, December 8, 2023 6:43 AM > > > + > > > + if (cur == VFIO_DEVICE_STATE_RUNNING && > > > + new == VFIO_DEVICE_STATE_RUNNING_P2P) { > > > + ice_migration_suspend_dev(ice_vdev->pf,

Re: [Intel-wired-lan] [PATCH iwl-next v4 12/12] vfio/ice: Implement vfio_pci driver for E800 devices

2023-12-07 Thread Tian, Kevin
> From: Alex Williamson > Sent: Friday, December 8, 2023 6:43 AM > > + > > + if (cur == VFIO_DEVICE_STATE_RUNNING && > > + new == VFIO_DEVICE_STATE_RUNNING_P2P) { > > + ice_migration_suspend_dev(ice_vdev->pf, ice_vdev->vf_id); > > + return NULL; > > + } > > + > > +

Re: [Intel-wired-lan] [PATCH iwl-next v4 08/12] ice: Save and load RX Queue head

2023-12-07 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, December 7, 2023 10:46 PM > > On Thu, Dec 07, 2023 at 07:55:17AM +, Tian, Kevin wrote: > > > From: Cao, Yahui > > > Sent: Tuesday, November 21, 2023 10:51 AM > > > > > > + > > > + /* Once RX Queue is enabled, network traffic may come in at >

Re: [Intel-wired-lan] [PATCH iwl-next v4 05/12] ice: Log virtual channel messages in PF

2023-12-07 Thread Brett Creeley
On 11/20/2023 6:51 PM, Yahui Cao wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. From: Lingyu Liu Save the virtual channel messages sent by VF on the source side during runtime. The logged virtchn

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

2023-12-07 Thread Pawel Kaminski
Add support for driver-specific devlink loopback 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 NICs the trasmit scheduler was only limited by PCIe ba

Re: [Intel-wired-lan] [PATCH iwl-next v1] ice: remove rx_len_errors statistic

2023-12-07 Thread Tony Nguyen
On 12/6/2023 2:43 AM, Jan Sokolowski wrote: It was found that this statistic is incorrectly reported by HW and thus, useless. As RX length error statistics are shown to the end user when requested, the values reported are misleading. Thus, that value is no longer reported and doesn't count a

Re: [Intel-wired-lan] [PATCH iwl-next v2 2/2] ixgbe: Refactor returning internal error codes

2023-12-07 Thread Tony Nguyen
On 12/5/2023 3:28 AM, Jedrzej Jagielski wrote: Change returning codes to the kernel ones instead of the internal ones for the entire ixgbe driver. Reviewed-by: Jacob Keller Reviewed-by: Przemek Kitszel Signed-off-by: Jedrzej Jagielski --- ... @@ -3897,14 +3886,14 @@ static s32 ixgbe_ge

Re: [Intel-wired-lan] [PATCH iwl-next v2 1/2] ixgbe: Refactor overtemp event handling

2023-12-07 Thread Tony Nguyen
On 12/5/2023 3:28 AM, Jedrzej Jagielski wrote: Currently ixgbe driver is notified of overheating events via internal IXGBE_ERR_OVERTEMP error code. Change the approach to use freshly introduced is_overtemp function parameter which set when such event occurs. Add new parameter to the check_overte

Re: [Intel-wired-lan] [PATCH iwl-next v4 12/12] vfio/ice: Implement vfio_pci driver for E800 devices

2023-12-07 Thread Alex Williamson
On Tue, 21 Nov 2023 02:51:11 + Yahui Cao wrote: > From: Lingyu Liu > > Add a vendor-specific vfio_pci driver for E800 devices. > > It uses vfio_pci_core to register to the VFIO subsystem and then > implements the E800 specific logic to support VF live migration. > > It implements the devi

[Intel-wired-lan] [PATCH iwl-next v4 2/7] ip_tunnel: convert __be16 tunnel flags to bitmaps

2023-12-07 Thread Marcin Szycik
From: Alexander Lobakin Historically, tunnel flags like TUNNEL_CSUM or TUNNEL_ERSPAN_OPT have been defined as __be16. Now all of those 16 bits are occupied and there's no more free space for new flags. It can't be simply switched to a bigger container with no adjustments to the values, since it's

Re: [Intel-wired-lan] [PATCH iwl-net v3] i40e: Restore VF MSI-X state during PCI reset

2023-12-07 Thread kernel test robot
Hi Andrii, kernel test robot noticed the following build errors: [auto build test ERROR on tnguy-net-queue/dev-queue] url: https://github.com/intel-lab-lkp/linux/commits/Andrii-Staikov/i40e-Restore-VF-MSI-X-state-during-PCI-reset/20231206-205526 base: https://git.kernel.org/pub/scm/linux/k

[Intel-wired-lan] [PATCH iwl-next] ice: alter feature support check for SRIOV and LAG

2023-12-07 Thread Dave Ertman
Previously, the ice driver had support for using a hanldler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utili

[Intel-wired-lan] [tnguy-net-queue:main] BUILD SUCCESS fe2b1226656afae56702d1d84c6900f6b67df297

2023-12-07 Thread kernel test robot
allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231207 gcc arc randconfig-002-20231207 gcc arm

Re: [Intel-wired-lan] [PATCH net v3] net: ethtool: do runtime PM outside RTNL

2023-12-07 Thread Jakub Kicinski
On Thu, 7 Dec 2023 11:16:10 +0100 Przemek Kitszel wrote: > I have let know our igc TL, architect, and anybody that could be > interested via cc: IWL. And I'm happy that this could be done at > relaxed pace thanks to Johannes I think you may be expecting us to take Johannes's patch. It's still on t

[Intel-wired-lan] [PATCH net-next v6 12/12] iavf: switch queue stats to libie

2023-12-07 Thread Alexander Lobakin
iavf is pretty much ready for using the generic libie stats, so drop all the custom code and just use generic definitions. The only thing is that it previously lacked the counter of Tx queue stops. It's present in the other drivers, so add it here as well. The rest is straightforward. Note that it

[Intel-wired-lan] [PATCH net-next v6 11/12] libie: add common queue stats

2023-12-07 Thread Alexander Lobakin
Next stop, per-queue private stats. They have only subtle differences from driver to driver and can easily be resolved. Define common structures, inline helpers and Ethtool helpers to collect, update and export the statistics. Use u64_stats_t right from the start, as well as the corresponding helpe

[Intel-wired-lan] [PATCH net-next v6 10/12] iavf: switch to Page Pool

2023-12-07 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 / libie 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

[Intel-wired-lan] [PATCH net-next v6 09/12] iavf: pack iavf_ring more efficiently

2023-12-07 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 v6 08/12] libie: add Rx buffer management (via Page Pool)

2023-12-07 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 optimized for Intel hardware, but nothing really HW-specific here. Use the new page_pool_dev_alloc() to dynamically switch between split-page and full-pag

[Intel-wired-lan] [PATCH net-next v6 07/12] page_pool: add DMA-sync-for-CPU inline helper

2023-12-07 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 v6 06/12] page_pool: constify some read-only function arguments

2023-12-07 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. Signed-

[Intel-wired-lan] [PATCH net-next v6 05/12] iavf: drop page splitting and recycling

2023-12-07 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 v6 04/12] iavf: kill "legacy-rx" for good

2023-12-07 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 v6 03/12] net: intel: introduce Intel Ethernet common library

2023-12-07 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 v6 02/12] page_pool: don't use driver-set flags field directly

2023-12-07 Thread Alexander Lobakin
page_pool::p is driver-defined params, copied directly from the structure passed to page_pool_create(). The structure isn't meant to be modified by the Page Pool core code and this even might look confusing[0][1]. In order to be able to alter some flags, let's define our own, internal fields the sa

[Intel-wired-lan] [PATCH net-next v6 01/12] page_pool: make sure frag API fields don't span between cachelines

2023-12-07 Thread Alexander Lobakin
After commit 5027ec19f104 ("net: page_pool: split the page_pool_params into fast and slow") that made &page_pool contain only "hot" params at the start, cacheline boundary chops frag API fields group in the middle again. To not bother with this each time fast params get expanded or shrunk, let's ju

[Intel-wired-lan] [PATCH net-next v6 00/12] net: intel: start The Great Code Dedup + Page Pool for iavf

2023-12-07 Thread Alexander Lobakin
Here's a two-shot: introduce Intel Ethernet common library (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 would need to be

[Intel-wired-lan] [tnguy-net-queue:dev-queue] BUILD SUCCESS 3c1dd2ac39c55beaace43fec4466abb740b2b276

2023-12-07 Thread kernel test robot
arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231207 gcc arc randconfig-002-20231207 gcc arm

Re: [Intel-wired-lan] [PATCH iwl-next v4] ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi()

2023-12-07 Thread Romanowski, Rafal
> -Original Message- > From: Petr Oros > Sent: Thursday, November 30, 2023 10:33 AM > To: Keller, Jacob E ; Intel Wired LAN l...@lists.osuosl.org> > Cc: Kitszel, Przemyslaw ; Romanowski, Rafal > ; Michal Swiatkowski > ; Buchocki, JakubX > ; Nguyen, Anthony L > > Subject: Re: [PATCH iwl-n

[Intel-wired-lan] [PATCH iwl-next v4 7/7] ice: Add support for PFCP hardware offload in switchdev

2023-12-07 Thread Marcin Szycik
Add support for creating PFCP filters in switchdev mode. Add support for parsing PFCP-specific tc options: S flag and SEID. To create a PFCP filter, a special netdev must be created and passed to tc command: ip link add pfcp0 type pfcp tc filter add dev eth0 ingress prio 1 flower pfcp_opts \

[Intel-wired-lan] [PATCH iwl-next v4 5/7] pfcp: always set pfcp metadata

2023-12-07 Thread Marcin Szycik
From: Michal Swiatkowski In PFCP receive path set metadata needed by flower code to do correct classification based on this metadata. Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Signed-off-by: Marcin Szycik --- drivers/net/pfcp.c | 81 - i

[Intel-wired-lan] [PATCH iwl-next v4 6/7] ice: refactor ICE_TC_FLWR_FIELD_ENC_OPTS

2023-12-07 Thread Marcin Szycik
FLOW_DISSECTOR_KEY_ENC_OPTS can be used for multiple headers, but currently it is treated as GTP-exclusive in ice. Rename ICE_TC_FLWR_FIELD_ENC_OPTS to ICE_TC_FLWR_FIELD_GTP_OPTS and check for tunnel type earlier. After this refactor, it is easier to add new headers using FLOW_DISSECTOR_KEY_ENC_OPT

[Intel-wired-lan] [PATCH iwl-next v4 4/7] pfcp: add PFCP module

2023-12-07 Thread Marcin Szycik
From: Wojciech Drewek Packet Forwarding Control Protocol (PFCP) is a 3GPP Protocol used between the control plane and the user plane function. It is specified in TS 29.244[1]. Note that this module is not designed to support this Protocol in the kernel space. There is no support for parsing any

[Intel-wired-lan] [PATCH iwl-next v4 3/7] lib/bitmap: add tests for IP tunnel flags conversion helpers

2023-12-07 Thread Marcin Szycik
From: Alexander Lobakin Now that there are helpers for converting IP tunnel flags between the old __be16 format and the bitmap format, make sure they work as expected by adding a couple of tests to the bitmap testing suite. The helpers are all inline, so no dependencies on the related CONFIG_* (o

[Intel-wired-lan] [PATCH iwl-next v4 1/7] ip_tunnel: use a separate struct to store tunnel params in the kernel

2023-12-07 Thread Marcin Szycik
From: Alexander Lobakin Unlike IPv6 tunnels which use purely-kernel __ip6_tnl_parm structure to store params inside the kernel, IPv4 tunnel code uses the same ip_tunnel_parm which is being used to talk with the userspace. This makes it difficult to alter or add any fields or use a different forma

[Intel-wired-lan] [PATCH iwl-next v4 0/7] Add PFCP filter support

2023-12-07 Thread Marcin Szycik
Add support for creating PFCP filters in switchdev mode. Add pfcp module that allows to create a PFCP-type netdev. The netdev then can be passed to tc when creating a filter to indicate that PFCP filter should be created. To add a PFCP filter, a special netdev must be created and passed to tc comm

Re: [Intel-wired-lan] [PATCH net-next v5 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-12-07 Thread Wei Fang
> -Original Message- > From: justinst...@google.com > Sent: 2023年12月7日 7:16 > To: David S. Miller ; Eric Dumazet > ; Jakub Kicinski ; Paolo Abeni > ; Shay Agroskin ; Arthur > Kiyanovski ; David Arinzon > ; Noam Dagan ; Saeed > Bishara ; Rasesh Mody ; > Sudarsana Kalluru ; gr-linux-nic-...@

Re: [Intel-wired-lan] [PATCH net-next v8 1/8] net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops

2023-12-07 Thread Kiyanovski, Arthur
> The get/set_rxfh ethtool ops currently takes the rxfh (RSS) parameters > as direct function arguments. This will force us to change the API (and > all drivers' functions) every time some new parameters are added. > > This is part 1/2 of the fix, as suggested in [1]: > > - First simplify the c

Re: [Intel-wired-lan] [PATCH net-next v5 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-12-07 Thread Andrew Lunn
On Wed, Dec 06, 2023 at 11:16:12PM +, justinst...@google.com wrote: > This patch converts some basic cases of ethtool_sprintf() to > ethtool_puts(). > > The conversions are used in cases where ethtool_sprintf() was being used > with just two arguments: > | ethtool_sprintf(&data, buffer[i

Re: [Intel-wired-lan] [PATCH net-next v5 1/3] ethtool: Implement ethtool_puts()

2023-12-07 Thread Andrew Lunn
On Wed, Dec 06, 2023 at 11:16:10PM +, justinst...@google.com wrote: > Use strscpy() to implement ethtool_puts(). > > Functionally the same as ethtool_sprintf() when it's used with two > arguments or with just "%s" format specifier. > > Signed-off-by: Justin Stitt Reviewed-by: Andrew Lunn

Re: [Intel-wired-lan] [PATCH iwl-next v4 09/12] ice: Save and load TX Queue head

2023-12-07 Thread Jason Gunthorpe
On Thu, Dec 07, 2023 at 08:22:53AM +, Tian, Kevin wrote: > > In virtual channel model, VF driver only send TX queue ring base and > > length info to PF, while rest of the TX queue context are managed by PF. > > TX queue length must be verified by PF during virtual channel message > > processing

Re: [Intel-wired-lan] [PATCH iwl-next v4 08/12] ice: Save and load RX Queue head

2023-12-07 Thread Jason Gunthorpe
On Thu, Dec 07, 2023 at 07:55:17AM +, Tian, Kevin wrote: > > From: Cao, Yahui > > Sent: Tuesday, November 21, 2023 10:51 AM > > > > + > > + /* Once RX Queue is enabled, network traffic may come in at > > any > > +* time. As a result, RX Queue head needs to be loaded > > b

Re: [Intel-wired-lan] [PATCH iwl] idpf: fix corrupted frames and skb leaks in singleq mode

2023-12-07 Thread Alexander Lobakin
From: Eric Dumazet Date: Thu, 7 Dec 2023 13:48:52 +0100 > On Thu, Dec 7, 2023 at 12:58 PM Simon Horman wrote: >> >> On Fri, Dec 01, 2023 at 03:38:21PM +0100, Alexander Lobakin wrote: >>> idpf_ring::skb serves only for keeping an incomplete frame between >>> several NAPI Rx polling cycles, as one

Re: [Intel-wired-lan] [PATCH v4 3/3] e1000e: Use pcie_capability_read_word() for reading LNKSTA

2023-12-07 Thread naamax.meir
On 11/21/2023 14:34, Ilpo Järvinen wrote: Use pcie_capability_read_word() for reading LNKSTA and remove the custom define that matches to PCI_EXP_LNKSTA. As only single user for cap_offset remains, replace it with a call to pci_pcie_cap(). Instead of e1000_adapter, make local variable out of pci

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

2023-12-07 Thread Lukasz Plachno
From: Jakub Buchocki Add support for 'flow-type ether' Flow Director rules via ethtool. Rules not containing masks are processed by the Flow Director, and support the following set of input parameters in all combinations: src, dst, proto, vlan-etype, vlan, action. It is possible to specify addr

[Intel-wired-lan] [PATCH iwl-next v2 1/2] ice: Remove unnecessary argument from ice_fdir_comp_rules()

2023-12-07 Thread Lukasz Plachno
Passing v6 argument is unnecessary as flow_type is still analyzed inside the function. Reviewed-by: Przemek Kitszel Signed-off-by: Lukasz Plachno --- drivers/net/ethernet/intel/ice/ice_fdir.c | 85 +++ 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/drivers/n

Re: [Intel-wired-lan] [PATCH iwl] idpf: fix corrupted frames and skb leaks in singleq mode

2023-12-07 Thread Eric Dumazet
On Thu, Dec 7, 2023 at 12:58 PM Simon Horman wrote: > > On Fri, Dec 01, 2023 at 03:38:21PM +0100, Alexander Lobakin wrote: > > idpf_ring::skb serves only for keeping an incomplete frame between > > several NAPI Rx polling cycles, as one cycle may end up before > > processing the end of packet desc

[Intel-wired-lan] [PATCH iwl-next v2 0/2] ice: Support flow director ether type filters

2023-12-07 Thread Lukasz Plachno
Ethtool allows creating rules with type=ether, add support for such filters in ice driver. Patch 1 allows extending ice_fdir_comp_rules() with handling additional type of filters. v2: fixed compilation warning by moving default: case between commits Jakub Buchocki (1): ice: Implement 'flow-type

Re: [Intel-wired-lan] [PATCH iwl] idpf: fix corrupted frames and skb leaks in singleq mode

2023-12-07 Thread Simon Horman
On Fri, Dec 01, 2023 at 03:38:21PM +0100, Alexander Lobakin wrote: > idpf_ring::skb serves only for keeping an incomplete frame between > several NAPI Rx polling cycles, as one cycle may end up before > processing the end of packet descriptor. The pointer is taken from > the ring onto the stack bef

Re: [Intel-wired-lan] [PATCH net v3] net: ethtool: do runtime PM outside RTNL

2023-12-07 Thread Przemek Kitszel
On 12/6/23 17:46, Johannes Berg wrote: On Wed, 2023-12-06 at 08:44 -0800, Jakub Kicinski wrote: On Wed, 6 Dec 2023 11:39:32 +0100 Johannes Berg wrote: As reported by Marc MERLIN, at least one driver (igc) wants or needs to acquire the RTNL inside suspend/resume ops, which can be called from he

Re: [Intel-wired-lan] [PATCH iwl-net v3] i40e: Restore VF MSI-X state during PCI reset

2023-12-07 Thread Przemek Kitszel
On 12/6/23 13:51, Andrii Staikov wrote: During a PCI FLR the MSI-X Enable flag in the VF PCI MSI-X capability register will be cleared. This can lead to issues when a VF is assigned to a VM because in these cases the VF driver receives no indication of the PF PCI error/reset and additionally it i

Re: [Intel-wired-lan] [PATCH iwl-next v1 0/3] ice: add E825C device family support

2023-12-07 Thread Mateusz Polchlopek
On 12/6/2023 8:29 PM, Grzegorz Nitka wrote: This patch series is supposed to add very basic support in ice driver for new Intel Ethernet device family E825C. E825C device consists of 2 NAC (Network Acceleration Complex) instances in the IO die and supports max of 8 ports with combined bandwidt

Re: [Intel-wired-lan] [PATCH iwl-next v4 09/12] ice: Save and load TX Queue head

2023-12-07 Thread Tian, Kevin
> From: Cao, Yahui > Sent: Tuesday, November 21, 2023 10:51 AM > > To advance TX Head queue, HW needs to touch memory by DMA. But > directly > touching VM's memory to advance TX Queue head does not follow vfio > migration protocol design, because vIOMMU state is not defined by the > protocol. Eve