[Intel-wired-lan] [PATCH iwl-next] ice: fix BST key index in ice_bst_key_init()

2024-08-23 Thread Ahmed Zaki
Index of the BST keys was wrongly initialized to a larger value, a possible buffer overflow. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/intel-wired-lan/b1fb6ff9-b69e-4026-9988-3c783d86c2e0@stanley.mountain/ Reviewed-by: Przemek Kitszel Fixes: 9a4c07aaa0f5 ("ice: add parser execu

Re: [Intel-wired-lan] [PATCH v7 iwl-next 3/6] ice: Implement PTP support for E830 devices

2024-08-23 Thread Simon Horman
On Tue, Aug 20, 2024 at 12:21:50PM +0200, Karol Kolacinski wrote: > From: Michal Michalik > > Add specific functions and definitions for E830 devices to enable > PTP support. > Introduce new PHY model ICE_PHY_E830. > E830 devices support direct write to GLTSYN_ registers without shadow > register

Re: [Intel-wired-lan] [PATCH v7 iwl-next 4/6] ice: Process TSYN IRQ in a separate function

2024-08-23 Thread Simon Horman
On Tue, Aug 20, 2024 at 12:21:51PM +0200, Karol Kolacinski wrote: > Simplify TSYN IRQ processing by moving it to a separate function and > having appropriate behavior per PHY model, instead of multiple > conditions not related to HW, but to specific timestamping modes. > > Reviewed-by: Przemek Kit

Re: [Intel-wired-lan] [PATCH v7 iwl-next 2/6] ice: Use FIELD_PREP for timestamp values

2024-08-23 Thread Simon Horman
On Tue, Aug 20, 2024 at 12:21:49PM +0200, Karol Kolacinski wrote: > Instead of using shifts and casts, use FIELD_PREP after reading 40b > timestamp values. > > Signed-off-by: Karol Kolacinski > --- > V5 -> V6: Replaced removed macros with the new ones Thanks for the update. Reviewed-by: Simon H

Re: [Intel-wired-lan] [PATCH v7 iwl-next 1/6] ice: Remove unncecessary ice_is_e8xx() functions

2024-08-23 Thread Simon Horman
On Tue, Aug 20, 2024 at 12:21:48PM +0200, Karol Kolacinski wrote: > Remove unnecessary ice_is_e8xx() functions and PHY model. Instead, use > MAC type where applicable. > > Signed-off-by: Karol Kolacinski Hi Karol, Sorry for waiting until v7 until raising this. But I feel that this patch is doin

[Intel-wired-lan] [tnguy-next-queue:dev-queue] BUILD SUCCESS 6c8e5a94ef37f532b20155e95015bdf7afa8672d

2024-08-23 Thread kernel test robot
haps_hs_smp_defconfig gcc-13.2.0 arc nsimosci_hs_defconfig gcc-13.2.0 arc randconfig-001-20240823 gcc-13.2.0 arc randconfig-002-20240823 gcc-13.2.0 arm allmodconfig gcc-13.2.0 arm

[Intel-wired-lan] [tnguy-net-queue:200GbE] BUILD SUCCESS a812a3f45cae787abe29567749a0acc879d2df37

2024-08-23 Thread kernel test robot
nfig gcc-13.2.0 arc nsimosci_hs_defconfig gcc-13.2.0 arc nsimosci_hs_smp_defconfig gcc-13.2.0 arc randconfig-001-20240823 gcc-13.2.0 arc randconfig-002-20240823 gcc-13.2.0 arcvdk_hs38_smp_defconfig gcc-

[Intel-wired-lan] [tnguy-next-queue:10GbE] BUILD SUCCESS d6f75d86aa786740ef7a7607685e9e1039e30aab

2024-08-23 Thread kernel test robot
haps_hs_smp_defconfig gcc-13.2.0 arc nsimosci_hs_defconfig gcc-13.2.0 arc nsimosci_hs_smp_defconfig gcc-13.2.0 arc randconfig-001-20240823 gcc-13.2.0 arc randconfig-002-20240823 gcc-13.2.0 arc

Re: [Intel-wired-lan] [PATCH net-next] idpf: Slightly simplify memory management in idpf_add_del_mac_filters()

2024-08-23 Thread Simon Horman
On Fri, Aug 23, 2024 at 08:23:29AM +0200, Christophe JAILLET wrote: > In idpf_add_del_mac_filters(), filters are chunked up into multiple > messages to avoid sending a control queue message buffer that is too large. > > Each chunk has up to IDPF_NUM_FILTERS_PER_MSG entries. So except for the > las

Re: [Intel-wired-lan] [PATCH][next] idpf: make read-only arrays tx_itr and rx_itr static const

2024-08-23 Thread Alexander Lobakin
From: Colin Ian King Date: Thu, 22 Aug 2024 22:34:10 +0100 > Don't populate the read-only arrays tx_itr and rx_itr on the stack at > run time, instead make them static const. > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 4 ++-- > 1 file changed, 2

Re: [Intel-wired-lan] [PATCH iwl-net v4 4/6] ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset

2024-08-23 Thread Maciej Fijalkowski
On Fri, Aug 23, 2024 at 11:59:29AM +0200, Larysa Zaremba wrote: > Consider the following scenario: > > .ndo_bpf()| ice_prepare_for_reset() | > |___| > rtnl_lock() |

Re: [Intel-wired-lan] [PATCH iwl-net v4 2/6] ice: protect XDP configuration with a mutex

2024-08-23 Thread Maciej Fijalkowski
On Fri, Aug 23, 2024 at 11:59:27AM +0200, Larysa Zaremba wrote: > The main threat to data consistency in ice_xdp() is a possible asynchronous > PF reset. It can be triggered by a user or by TX timeout handler. > > XDP setup and PF reset code access the same resources in the following > sections: >

Re: [Intel-wired-lan] [PATCH iwl-net v4 1/6] ice: move netif_queue_set_napi to rtnl-protected sections

2024-08-23 Thread Maciej Fijalkowski
On Fri, Aug 23, 2024 at 11:59:26AM +0200, Larysa Zaremba wrote: > Currently, netif_queue_set_napi() is called from ice_vsi_rebuild() that is > not rtnl-locked when called from the reset. This creates the need to take > the rtnl_lock just for a single function and complicates the > synchronization w

[Intel-wired-lan] [PATCH iwl-net v4 6/6] ice: do not bring the VSI up, if it was down before the XDP setup

2024-08-23 Thread Larysa Zaremba
After XDP configuration is completed, we bring the interface up unconditionally, regardless of its state before the call to .ndo_bpf(). Preserve the information whether the interface had to be brought down and later bring it up only in such case. Fixes: efc2214b6047 ("ice: Add support for XDP") R

[Intel-wired-lan] [PATCH iwl-net v4 5/6] ice: remove ICE_CFG_BUSY locking from AF_XDP code

2024-08-23 Thread Larysa Zaremba
Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing, because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF state, not VSI one. Therefore it does not protect the queue pair from e.g. reset. Remove ICE_CFG_BUSY locking from ice_qp_dis() and ice_qp_ena(). Fixes:

[Intel-wired-lan] [PATCH iwl-net v4 4/6] ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset

2024-08-23 Thread Larysa Zaremba
Consider the following scenario: .ndo_bpf() | ice_prepare_for_reset() | |___| rtnl_lock() | | ice_down() | |

[Intel-wired-lan] [PATCH iwl-net v4 2/6] ice: protect XDP configuration with a mutex

2024-08-23 Thread Larysa Zaremba
The main threat to data consistency in ice_xdp() is a possible asynchronous PF reset. It can be triggered by a user or by TX timeout handler. XDP setup and PF reset code access the same resources in the following sections: * ice_vsi_close() in ice_prepare_for_reset() - already rtnl-locked * ice_vs

[Intel-wired-lan] [PATCH iwl-net v4 3/6] ice: check for XDP rings instead of bpf program when unconfiguring

2024-08-23 Thread Larysa Zaremba
If VSI rebuild is pending, .ndo_bpf() can attach/detach the XDP program on VSI without applying new ring configuration. When unconfiguring the VSI, we can encounter the state in which there is an XDP program but no XDP rings to destroy or there will be XDP rings that need to be destroyed, but no XD

[Intel-wired-lan] [PATCH iwl-net v4 1/6] ice: move netif_queue_set_napi to rtnl-protected sections

2024-08-23 Thread Larysa Zaremba
Currently, netif_queue_set_napi() is called from ice_vsi_rebuild() that is not rtnl-locked when called from the reset. This creates the need to take the rtnl_lock just for a single function and complicates the synchronization with .ndo_bpf. At the same time, there no actual need to fill napi-to-que

[Intel-wired-lan] [PATCH iwl-net v4 0/6] ice: fix synchronization between .ndo_bpf() and reset

2024-08-23 Thread Larysa Zaremba
PF reset can be triggered asynchronously, by tx_timeout or by a user. With some unfortunate timings both ice_vsi_rebuild() and .ndo_bpf will try to access and modify XDP rings at the same time, causing system crash. The first patch factors out rtnl-locked code from VSI rebuild code to avoid deadlo

Re: [Intel-wired-lan] [PATCH iwl-next v10 02/14] ice: support Rx timestamp on flex descriptor

2024-08-23 Thread Wojciech Drewek
On 21.08.2024 15:29, Alexander Lobakin wrote: > From: Wojciech Drewek > Date: Wed, 21 Aug 2024 14:15:27 +0200 > >> 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 enabl

Re: [Intel-wired-lan] [PATCH net-next] idpf: Slightly simplify memory management in idpf_add_del_mac_filters()

2024-08-23 Thread Dan Carpenter
On Fri, Aug 23, 2024 at 08:23:29AM +0200, Christophe JAILLET wrote: > In idpf_add_del_mac_filters(), filters are chunked up into multiple > messages to avoid sending a control queue message buffer that is too large. > > Each chunk has up to IDPF_NUM_FILTERS_PER_MSG entries. So except for the > las

Re: [Intel-wired-lan] [PATCH net-next v3 2/2] ice: add callbacks for Embedded SYNC enablement on dpll pins

2024-08-23 Thread Jiri Pirko
Fri, Aug 23, 2024 at 12:25:13AM CEST, arkadiusz.kubalew...@intel.com wrote: >Allow the user to get and set configuration of Embedded SYNC feature >on the ice driver dpll pins. > >Reviewed-by: Aleksandr Loktionov >Signed-off-by: Arkadiusz Kubalewski Reviewed-by: Jiri Pirko

Re: [Intel-wired-lan] [PATCH net-next v3 1/2] dpll: add Embedded SYNC feature for a pin

2024-08-23 Thread Jiri Pirko
Fri, Aug 23, 2024 at 12:25:12AM CEST, arkadiusz.kubalew...@intel.com wrote: >Implement and document new pin attributes for providing Embedded SYNC >capabilities to the DPLL subsystem users through a netlink pin-get >do/dump messages. Allow the user to set Embedded SYNC frequency with >pin-set do ne