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

2024-07-24 Thread kernel test robot
allmodconfig gcc-13.2.0 arc allnoconfig gcc-13.2.0 arc allyesconfig gcc-13.2.0 arc defconfig gcc-13.2.0 arc randconfig-001-20240724 gcc-13.2.0 arc randconfig-002-20240724

[Intel-wired-lan] [PATCH iwl-next v4 13/13] iavf: add support for offloading tc U32 cls filters

2024-07-24 Thread Ahmed Zaki
Add support for offloading cls U32 filters. Only "skbedit queue_mapping" and "drop" actions are supported. Also, only "ip" and "802_3" tc protocols are allowed. The PF must advertise the VIRTCHNL_VF_OFFLOAD_TC_U32 capability flag. Since the filters will be enabled via the FD stage at the PF, a new

[Intel-wired-lan] [PATCH iwl-next v4 12/13] iavf: refactor add/del FDIR filters

2024-07-24 Thread Ahmed Zaki
In preparation for a second type of FDIR filters that can be added by tc-u32, move the add/del of the FDIR logic to be entirely contained in iavf_fdir.c. The iavf_find_fdir_fltr_by_loc() is renamed to iavf_find_fdir_fltr() to be more agnostic to the filter ID parameter (for now @loc, which is rele

[Intel-wired-lan] [PATCH iwl-next v4 11/13] ice: enable FDIR filters from raw binary patterns for VFs

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Enable VFs to create FDIR filters from raw binary patterns. The corresponding processes for raw flow are added in the Parse / Create / Destroy stages. Reviewed-by: Marcin Szycik Signed-off-by: Junfeng Guo Co-developed-by: Ahmed Zaki Signed-off-by: Ahmed Zaki Tested-by: Rafa

[Intel-wired-lan] [PATCH iwl-next v4 10/13] ice: add method to disable FDIR SWAP option

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo The SWAP Flag in the FDIR Programming Descriptor doesn't work properly, it is always set and cannot be unset (hardware bug). Thus, add a method to effectively disable the FDIR SWAP option by setting the FDSWAP instead of FDINSET registers. Reviewed-by: Marcin Szycik Signed-off

[Intel-wired-lan] [PATCH iwl-next v4 09/13] virtchnl: support raw packet in protocol header

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo The patch extends existing virtchnl_proto_hdrs structure to allow VF to pass a pair of buffers as packet data and mask that describe a match pattern of a filter rule. Then the kernel PF driver is requested to parse the pair of buffer and figure out low level hardware metadata (p

[Intel-wired-lan] [PATCH iwl-next v4 08/13] ice: add API for parser profile initialization

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add API ice_parser_profile_init() to init a parser profile based on a parser result and a mask buffer. The ice_parser_profile struct is used by the low level FXP engine to create HW profile/field vectors. Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfe

[Intel-wired-lan] [PATCH iwl-next v4 07/13] ice: add UDP tunnels support to the parser

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add support for the vxlan, geneve, ecpri UDP tunnels through the following APIs: - ice_parser_vxlan_tunnel_set() - ice_parser_geneve_tunnel_set() - ice_parser_ecpri_tunnel_set() Reviewed-by: Simon Horman Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfe

[Intel-wired-lan] [PATCH iwl-next v4 06/13] ice: support turning on/off the parser's double vlan mode

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add API ice_parser_dvm_set() to support turning on/off the parser's double vlan mode. Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfeng Guo Co-developed-by: Ahmed Zaki Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski --- drivers/net/ethernet/

[Intel-wired-lan] [PATCH iwl-next v4 05/13] ice: add parser execution main loop

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Implement the core work of the runtime parser via: - ice_parser_rt_execute() - ice_parser_rt_reset() - ice_parser_rt_pkt_buf_set() Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfeng Guo Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski --- drive

[Intel-wired-lan] [PATCH iwl-next v4 04/13] ice: add parser internal helper functions

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add the following internal helper functions: - ice_bst_tcam_match(): to perform ternary match on boost TCAM. - ice_pg_cam_match(): to perform parse graph key match in cam table. - ice_pg_nm_cam_match(): to perform parse graph key no match in cam table. - ice_ptype_mk_t

[Intel-wired-lan] [PATCH iwl-next v4 03/13] ice: add debugging functions for the parser sections

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add debug for all parser sections. Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfeng Guo Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski --- drivers/net/ethernet/intel/ice/ice_parser.c | 470 1 file changed, 470 insertion

[Intel-wired-lan] [PATCH iwl-next v4 02/13] ice: parse and init various DDP parser sections

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Parse the following DDP sections: - ICE_SID_RXPARSER_IMEM into an array of struct ice_imem_item - ICE_SID_RXPARSER_METADATA_INIT into an array of struct ice_metainit_item - ICE_SID_RXPARSER_CAM or ICE_SID_RXPARSER_PG_SPILL into an array of struct ice_pg_cam_item - ICE_SID

[Intel-wired-lan] [PATCH iwl-next v4 01/13] ice: add parser create and destroy skeleton

2024-07-24 Thread Ahmed Zaki
From: Junfeng Guo Add new parser module which can parse a packet in binary and generate information like ptype, protocol/offset pairs and flags which can be later used to feed the FXP profile creation directly. Add skeleton of the create and destroy APIs: ice_parser_create() ice_parser_destroy()

[Intel-wired-lan] [PATCH iwl-next v4 00/13] ice: iavf: add support for TC U32 filters on VFs

2024-07-24 Thread Ahmed Zaki
The IntelĀ® Ethernet 800 Series is designed with a pipeline that has an on-chip programmable capability called Dynamic Device Personalization (DDP). A DDP package is loaded by the driver during probe time. The DDP package programs functionality in both the parser and switching blocks in the pipeline

[Intel-wired-lan] [PATCH iwl-net] idpf: remove redundant 'req_vec_chunks' NULL check

2024-07-24 Thread Pavan Kumar Linga
'req_vec_chunks' is used to store the vector info received from the device control plane. The memory for it is allocated in idpf_send_alloc_vectors_msg and returns an error if the memory allocation fails. 'req_vec_chunks' cannot be NULL in the later code flow. So remove the conditional check to ex

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

2024-07-24 Thread Nambiar, Amritha
On 7/24/2024 9:48 AM, 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 with .ndo_bpf. At the same

Re: [Intel-wired-lan] [PATCH iwl-next v3 12/13] iavf: refactor add/del FDIR filters

2024-07-24 Thread Ahmed Zaki
On 2024-07-24 10:30 a.m., Simon Horman wrote: On Wed, Jul 24, 2024 at 10:14:19AM -0600, Ahmed Zaki wrote: ... +/** + * iavf_fdir_del_fltr - delete a flow director filter from the list + * @adapter: pointer to the VF adapter structure + * @loc: location to delete. + * + * Return: 0 on succes

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, Larysa Zaremba wrote: > 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

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, Larysa Zaremba wrote: > 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. > Yea, unfortuna

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, Larysa Zaremba wrote: > Consider the following scenario: > > .ndo_bpf()| ice_prepare_for_reset() | > |___| > rtnl_lock() | | > ice_down()

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, Larysa Zaremba wrote: > 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

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, 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: > * ice_vsi_close(

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

2024-07-24 Thread Jacob Keller
On 7/24/2024 9:48 AM, 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 with .ndo_bpf. At

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

2024-07-24 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 v2 5/6] ice: remove ICE_CFG_BUSY locking from AF_XDP code

2024-07-24 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. Despite being useless, it still can deadlock the unfortunate functions t

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

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

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

2024-07-24 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 v2 2/6] ice: protect XDP configuration with a mutex

2024-07-24 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 v2 1/6] ice: move netif_queue_set_napi to rtnl-protected sections

2024-07-24 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 v2 0/6] ice: fix synchronization between .ndo_bpf() and reset

2024-07-24 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 v3 12/13] iavf: refactor add/del FDIR filters

2024-07-24 Thread Simon Horman
On Wed, Jul 24, 2024 at 10:14:19AM -0600, Ahmed Zaki wrote: ... > > > +/** > > > + * iavf_fdir_del_fltr - delete a flow director filter from the list > > > + * @adapter: pointer to the VF adapter structure > > > + * @loc: location to delete. > > > + * > > > + * Return: 0 on success or negative er

Re: [Intel-wired-lan] [PATCH iwl-next v3 03/13] ice: add debugging functions for the parser sections

2024-07-24 Thread Ahmed Zaki
On 2024-07-22 8:53 a.m., Simon Horman wrote: On Wed, Jul 10, 2024 at 02:40:05PM -0600, Ahmed Zaki wrote: From: Junfeng Guo Add debug for all parser sections. Reviewed-by: Marcin Szycik Signed-off-by: Qi Zhang Signed-off-by: Junfeng Guo Signed-off-by: Ahmed Zaki Hi Jungfeng, Ahmed, al

Re: [Intel-wired-lan] [PATCH iwl-next v3 12/13] iavf: refactor add/del FDIR filters

2024-07-24 Thread Ahmed Zaki
On 2024-07-22 9:04 a.m., Simon Horman wrote: On Wed, Jul 10, 2024 at 02:40:14PM -0600, Ahmed Zaki wrote: In preparation for a second type of FDIR filters that can be added by tc-u32, move the add/del of the FDIR logic to be entirely contained in iavf_fdir.c. The iavf_find_fdir_fltr_by_loc()

[Intel-wired-lan] [tnguy-next-queue:dev-queue] BUILD SUCCESS 3229c54b1e37ac1fc71394a9a0da27749286e1fb

2024-07-24 Thread kernel test robot
-13.2.0 arc allnoconfig gcc-13.2.0 arc allyesconfig gcc-13.2.0 arc defconfig gcc-13.2.0 arc randconfig-001-20240724 gcc-13.2.0 arc randconfig-002-20240724 gcc

Re: [Intel-wired-lan] [PATCH iwl-next v2] igc: Get rid of spurious interrupts

2024-07-24 Thread Brett Creeley
On 7/24/2024 12:26 AM, Kurt Kanzenbach wrote: On Tue Jul 23 2024, Brett Creeley wrote: @@ -5811,11 +5815,29 @@ static void igc_watchdog_task(struct work_struct *work) if (adapter->flags & IGC_FLAG_HAS_MSIX) { u32 eics = 0; - for (i = 0; i < adapter->num

[Intel-wired-lan] [PATCH iwl-net 3/3] idpf: fix UAFs when destroying the queues

2024-07-24 Thread Alexander Lobakin
The second tagged commit started sometimes (very rarely, but possible) throwing WARNs from net/core/page_pool.c:page_pool_disable_direct_recycling(). Turned out idpf frees interrupt vectors with embedded NAPIs *before* freeing the queues making page_pools' NAPI pointers lead to freed memory before

[Intel-wired-lan] [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration

2024-07-24 Thread Alexander Lobakin
From: Michal Kubiak The initialization of vport interrupt consists of two functions: 1) idpf_vport_intr_init() where a generic configuration is done 2) idpf_vport_intr_req_irq() where the irq for each q_vector is requested. The first function used to create a base name for each interrupt us

[Intel-wired-lan] [PATCH iwl-net 1/3] idpf: fix memory leaks and crashes while performing a soft reset

2024-07-24 Thread Alexander Lobakin
The second tagged commit introduced a UAF, as it removed restoring q_vector->vport pointers after reinitializating the structures. This is due to that all queue allocation functions are performed here with the new temporary vport structure and those functions rewrite the backpointers to the vport.

[Intel-wired-lan] [PATCH iwl-net 0/3] idpf: fix 3 bugs revealed by the Chapter I

2024-07-24 Thread Alexander Lobakin
The libeth conversion revealed 2 serious issues which lead to sporadic crashes or WARNs under certain configurations. Additional one was found while debugging these two with kmemleak. This one is targeted stable, the rest can be backported manually later if needed. They can be reproduced only after

[Intel-wired-lan] [tnguy-net-queue:100GbE] BUILD SUCCESS 19abb9c2b900bad59e0a9818d6c83bb4cc875437

2024-07-24 Thread kernel test robot
allmodconfig gcc-13.2.0 arc allnoconfig gcc-13.2.0 arc allyesconfig gcc-13.2.0 arc defconfig gcc-13.2.0 arc randconfig-001-20240724 gcc-13.2.0 arc

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

2024-07-24 Thread kernel test robot
hsdk_defconfig gcc-13.2.0 arc randconfig-001-20240724 gcc-13.2.0 arc randconfig-002-20240724 gcc-13.2.0 arm allmodconfig gcc-13.2.0 arm allnoconfig clang-19 arm

Re: [Intel-wired-lan] [PATCH iwl-net] igc: Ensure PTM request is completed before timeout has started

2024-07-24 Thread Kurt Kanzenbach
On Mon Jul 08 2024, Rodrigo Cataldo via B4 Relay wrote: > From: Rodrigo Cataldo > > When a PTM is requested via wr32(IGC_PTM_STAT), the operation may only > be completed by the next read operation (flush). Unfortunately, the next > read operation in the PTM request loop happens after we have alrea

Re: [Intel-wired-lan] [PATCH iwl-next v2] igc: Get rid of spurious interrupts

2024-07-24 Thread Kurt Kanzenbach
On Tue Jul 23 2024, Brett Creeley wrote: >> @@ -5811,11 +5815,29 @@ static void igc_watchdog_task(struct work_struct >> *work) >> if (adapter->flags & IGC_FLAG_HAS_MSIX) { >> u32 eics = 0; >> >> - for (i = 0; i < adapter->num_q_vectors; i++) >> -