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

2023-12-13 Thread Przemek Kitszel
On 12/12/23 11:46, Jedrzej Jagielski wrote: Currently ixgbe driver is notified of overheating events via internal IXGBE_ERR_OVERTEMP error code. Change the approach for handle_lasi() to use freshly introduced is_overtemp function parameter which set when such event occurs. Change check_overtemp(

Re: [Intel-wired-lan] [PATCH v2 iwl-next] ice: Fix some null pointer dereference issues in ice_ptp.c

2023-12-13 Thread Przemek Kitszel
On 12/12/23 03:40, Kunwu Chan wrote: devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: d938a8cca88a ("ice: Auxbus devices & driver for E822 TS") Cc: Kunwu Chan Suggested-by: Przemek Kitszel You found the bug (or some some static analysi

Re: [Intel-wired-lan] [PATCH net-next v6 08/12] libie: add Rx buffer management (via Page Pool)

2023-12-13 Thread Alexander Lobakin
From: Jakub Kicinski Date: Mon, 11 Dec 2023 11:23:32 -0800 > On Mon, 11 Dec 2023 11:16:20 +0100 Alexander Lobakin wrote: >> Ideally, I'd like to pass a CPU ID this queue will be run on and use >> cpu_to_node(), but currently there's no NUMA-aware allocations in the >> Intel drivers and Rx queues

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

2023-12-13 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 v7 00/12] net: intel: start The Great Code Dedup + Page Pool for iavf

2023-12-13 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] [PATCH net-next v7 02/12] page_pool: don't use driver-set flags field directly

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

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

2023-12-13 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 v7 05/12] iavf: drop page splitting and recycling

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

2023-12-13 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 v7 07/12] page_pool: add DMA-sync-for-CPU inline helper

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

2023-12-13 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 v7 09/12] iavf: pack iavf_ring more efficiently

2023-12-13 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 v7 10/12] iavf: switch to Page Pool

2023-12-13 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 v7 11/12] libie: add common queue stats

2023-12-13 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 v7 12/12] iavf: switch queue stats to libie

2023-12-13 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

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: enable WB_ON_ITR

2023-12-13 Thread Michal Kubiak
On Tue, Dec 12, 2023 at 05:50:55PM +0100, Paul Menzel wrote: > Dear Michal, dear Joshua, > > > Thank you for your patch. > > On 12/12/23 15:55, Michal Kubiak wrote: > > From: Joshua Hay > > > > Tell hardware to writeback completed descriptors even when interrupts > > Should you resend, the ve

Re: [Intel-wired-lan] [net PATCH] i40e: fix use-after-free in i40e_aqc_add_filters()

2023-12-13 Thread Sokolowski, Jan
>Commit 3116f59c12bd ("i40e: fix use-after-free in >i40e_sync_filters_subtask()") avoided use-after-free issues, >by increasing refcount during update the VSI filter list to >the HW. However, it missed the unicast situation. > >When deleting an unicast FDB entry, the i40e driver will release >the m

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: enable WB_ON_ITR

2023-12-13 Thread Michal Kubiak
On Wed, Dec 13, 2023 at 02:23:19PM +0100, Michal Kubiak wrote: > On Tue, Dec 12, 2023 at 05:50:55PM +0100, Paul Menzel wrote: > > Dear Michal, dear Joshua, > > > > > > Thank you for your patch. > > > > On 12/12/23 15:55, Michal Kubiak wrote: > > > From: Joshua Hay > > > > > > Tell hardware to

Re: [Intel-wired-lan] [PATCH iwl-next v2 14/15] ice: cleanup inconsistent code

2023-12-13 Thread Kalesh Anakkur Purayil
On Wed, Dec 6, 2023 at 6:32 AM Jesse Brandeburg wrote: > It was found while doing further testing of the previous commit > fbf32a9bab91 ("ice: field get conversion") that one of the FIELD_GET > conversions should really be a FIELD_PREP. The previous code was styled > as a match to the FIELD_GET c

[Intel-wired-lan] [net PATCH] i40e: fix use-after-free in i40e_aqc_add_filters()

2023-12-13 Thread Ke Xiao
Commit 3116f59c12bd ("i40e: fix use-after-free in i40e_sync_filters_subtask()") avoided use-after-free issues, by increasing refcount during update the VSI filter list to the HW. However, it missed the unicast situation. When deleting an unicast FDB entry, the i40e driver will release the mac_filt

Re: [Intel-wired-lan] [PATCH v2 iwl-next] ice: Fix some null pointer dereference issues in ice_ptp.c

2023-12-13 Thread Simon Horman
On Wed, Dec 13, 2023 at 10:49:10AM +0100, Przemek Kitszel wrote: > On 12/12/23 03:40, Kunwu Chan wrote: > > devm_kasprintf() returns a pointer to dynamically allocated memory > > which can be NULL upon failure. > > > > Fixes: d938a8cca88a ("ice: Auxbus devices & driver for E822 TS") > > Cc: Kunwu

Re: [Intel-wired-lan] [PATCH iwl-next v2 14/15] ice: cleanup inconsistent code

2023-12-13 Thread Jesse Brandeburg
Please don't use HTML email, your reply was likely dropped by most lists that filter HTML. On 12/12/2023 8:06 PM, Kalesh Anakkur Purayil wrote: > -       change_type = FIELD_GET(ICE_AQ_LLDP_MIB_TYPE_M,  mib->type); > +       change_type = FIELD_GET(ICE_AQ_LLDP_MIB_TYPE_M, mib->type); > >

[Intel-wired-lan] [tnguy-net-queue:40GbE] BUILD SUCCESS 7ae42ef308ed0f6250b36f43e4eeb182ebbe6215

2023-12-13 Thread kernel test robot
arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc nsimosci_hs_defconfig gcc arc randconfig-001-20231213 gcc arc

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

2023-12-13 Thread Jacob Keller
On 12/12/2023 4:24 AM, 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 add

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: enable WB_ON_ITR

2023-12-13 Thread Nguyen, Anthony L
> -Original Message- > From: Kubiak, Michal > Sent: Wednesday, December 13, 2023 5:51 AM > > On Wed, Dec 13, 2023 at 02:23:19PM +0100, Michal Kubiak wrote: > > On Tue, Dec 12, 2023 at 05:50:55PM +0100, Paul Menzel wrote: > > > Dear Michal, dear Joshua, > > > > > > > > > Thank you for y

[Intel-wired-lan] [tnguy-next-queue:1GbE] BUILD SUCCESS bf88f7d920da2bbabef16404a449a4f72cc0ffcd

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

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: enable WB_ON_ITR

2023-12-13 Thread Tony Nguyen
On 12/13/2023 2:22 PM, Nguyen, Anthony L wrote: -Original Message- From: Kubiak, Michal Sent: Wednesday, December 13, 2023 5:51 AM On Wed, Dec 13, 2023 at 02:23:19PM +0100, Michal Kubiak wrote: On Tue, Dec 12, 2023 at 05:50:55PM +0100, Paul Menzel wrote: Dear Michal, dear Joshua

Re: [Intel-wired-lan] [PATCH net-next 0/2] idpf: add get/set for Ethtool's header split ringparam

2023-12-13 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Tue, 12 Dec 2023 15:27:50 +0100 you wrote: > Currently, the header split feature (putting headers in one smaller > buffer and then the data in a separate bigger one) is always enabled > in idpf when supported. > O

Re: [Intel-wired-lan] [PATCH] igb: Add null pointer check to igb_set_fw_version

2023-12-13 Thread Kunwu Chan
Thanks for your reply. I'll try to use snprintf in v2 patch. On 2023/12/13 05:26, Jakub Kicinski wrote: On Mon, 11 Dec 2023 11:13:36 +0800 Kunwu Chan wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 1978d3ead82c ("intel: fix string t

Re: [Intel-wired-lan] [PATCH net-next v9 0/8] Support symmetric-xor RSS hash

2023-12-13 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Tue, 12 Dec 2023 17:33:13 -0700 you wrote: > Patches 1 and 2 modify the get/set_rxh ethtool API to take a pointer to > struct of parameters instead of individual params. This will allow future > changes to the uAP

Re: [Intel-wired-lan] [PATCH] iavf: Fix null pointer dereference in iavf_print_link_message

2023-12-13 Thread Kunwu Chan
Thanks for your reply. Sure, the only thing 'iavf_print_link_message' do is to print a msg by netdev_info. The 'iavf_virtchnl_completion' assume that no errors will be returned. Whether we could just execute 'netdev_info(netdev, "NIC Link is Up Speed is %s Full Duplex\n", speed? speed :"");' w

Re: [Intel-wired-lan] [PATCH iwl-next v2 14/15] ice: cleanup inconsistent code

2023-12-13 Thread Przemek Kitszel
On 12/13/23 19:27, Jesse Brandeburg wrote: Please don't use HTML email, your reply was likely dropped by most lists that filter HTML. On 12/12/2023 8:06 PM, Kalesh Anakkur Purayil wrote: -       change_type = FIELD_GET(ICE_AQ_LLDP_MIB_TYPE_M,  mib->type); +       change_type = FIELD_G