[PATCH v2 15/17] net/cnxk: add PMD API to retrieve the model string

2024-09-30 Thread Nithin Dabilpuram
From: Srujana Challa This patch adds PMD API to retrieve the model string. This API allows applications to get the HW model string directly. Signed-off-by: Srujana Challa --- drivers/net/cnxk/cnxk_ethdev.c | 7 +++ drivers/net/cnxk/rte_pmd_cnxk.h | 9 + drivers/net/cnxk/version.ma

[PATCH v2 13/17] net/cnxk: add PMD API to retrieve CPT queue statistics

2024-09-30 Thread Nithin Dabilpuram
From: Srujana Challa Introduces a new PMD API to obtain CPT queue statistics, including: - CPT_LF_CTX_ENC_BYTE_CNT - Encrypted byte count on the given queue - CPT_LF_CTX_ENC_PKT_CNT - Encrypted packet count on the given queue - CPT_LF_CTX_DEC_BYTE_CNT - Decrypted byte count on the given queue - C

[PATCH v2 01/17] net/cnxk: added telemetry support do dump SA information

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla Added new telemetry command to dump SA taking portid and SA index as parameters. Ex: /cnxk/ipsec/sa_info,0,3 dumps inbound and outbound SA information of SA index 3 Signed-off-by: Rakesh Kudurumalla --- v2: - Splitted series from "[PATCH 00/33] add Marvell cn20k SOC su

[PATCH v3 5/6] app/test-eventdev: add pre-scheduling support

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Add support to configure pre-scheduling for eventdev test application. Option `--preschedule` 0 - Disable pre-scheduling. 1 - Enable pre-scheduling. 2 - Enable pre-schedule with adaptive mode (Default). Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_common

[PATCH v3 6/6] examples: use eventdev pre-scheduling

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Enable event pre-scheduling if supported by the event device. Signed-off-by: Pavan Nikhilesh --- examples/eventdev_pipeline/pipeline_worker_generic.c | 6 ++ examples/eventdev_pipeline/pipeline_worker_tx.c | 6 ++ examples/ipsec-secgw/event_helper.c

[PATCH v3 4/6] event/cnkx: add pre-schedule support

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Add device level and port level pre-schedule support for cnxk eventdev. Signed-off-by: Pavan Nikhilesh --- doc/guides/eventdevs/features/cnxk.ini | 1 + drivers/event/cnxk/cn10k_eventdev.c| 40 -- drivers/event/cnxk/cnxk_eventdev.c | 2 --

[PATCH v3 1/6] eventdev: introduce event pre-scheduling

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Event pre-scheduling improves scheduling performance by assigning events to event ports in advance when dequeues are issued. The dequeue operation initiates the pre-schedule operation, which completes in parallel without affecting the dequeued event flow contexts and dequeue

[PATCH v3 3/6] eventdev: add SW event preschedule hint

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Add a new eventdev API to provide a hint to the eventdev PMD to pre-schedule the next event into the event port, without releasing the current flow context. Event device that support this feature advertises the capability using the RTE_EVENT_DEV_CAP_SW_PRESCHEDULE capability

[PATCH v3 2/6] eventdev: add event port pre-schedule modify

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Some event devices allow pre-schedule types to be modified at runtime on an event port. Add `RTE_EVENT_DEV_CAP_EVENT_PER_PORT_PRESCHEDULE` capability to indicate that the event device supports this feature. Add `rte_event_port_preschedule_modify()` API to modify the pre-sch

[PATCH v3 0/6] Introduce event pre-scheduling

2024-09-30 Thread pbhagavatula
From: Pavan Nikhilesh Event pre-scheduling improves scheduling performance by assigning events to event ports in advance when dequeues are issued. This series introduces various types and levels of pre-scheduling to the eventdev library. pre-scheduling Types: * RTE_EVENT_DEV_PRESCHEDULE_NONE: N

[PATCH v2 03/17] net/cnxk: update Rx offloads to handle timestamp

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla RX offloads flags are updated to handle timestamp in VF when ptp is enabled in respective PF in kernle Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cn10k_ethdev.c | 6 +- drivers/net/cnxk/cn9k_ethdev.c | 5 - drivers/net/cnxk/cnxk_ethdev.h | 7 +

[PATCH v2 11/17] net/cnxk: add PMD APIs for IPsec SA base and flush

2024-09-30 Thread Nithin Dabilpuram
From: Srujana Challa Introduces new PMD APIs for Inline IPsec, including hardware SA flush and obtaining the base address for the inline device sa table. This allows applications to directly manage IPsec SAs. This patch also updates the rte_pmd_cnxk_hw_sa_read|write() API's to get use portid inst

[PATCH v2 09/17] common/cnxk: add flush wait after write of inline ctx

2024-09-30 Thread Nithin Dabilpuram
Reading a CPT_LF_CTX_ERR csr will ensure writes for FLUSH are complete and also tell whether flush is complete or not. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_nix_inl.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/c

[PATCH v2 17/17] event/cnxk: handle inbound out of place processing

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla update event device with NIX_RX_REAS_F to handle out of place processing for boards that does not support reassembly as cn10k driver process OOP with NIX_RX_REAS_F enabled. Signed-off-by: Rakesh Kudurumalla --- drivers/event/cnxk/cn10k_eventdev.c | 18 -

[PATCH v2 16/17] net/cnxk: handle OOP for inbound packet

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla To handle OOP for inbound packet, processing is done based on NIX_RX_REAS_F flag. but for boards that does not support reassembly Inbound Out-Of-Place processing test case fails because reassembly flag is not updated in event mode. This patch fixes the same. Signed-off-b

[PATCH v3 41/47] net/bnxt: tf_ulp: support a few generic template items

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha This patch provides the following changes. support generic template items Add support for jump action, dynamic tunnels and flow priority to thor2 platform. fix generic application template The queue action is enabled for Thor2 platform. E

[PATCH v2 14/17] net/cnxk: add option to enable custom inbound sa usage

2024-09-30 Thread Nithin Dabilpuram
From: Srujana Challa Introduces a device argument (custom_inb_sa) to activate the usage of custom inbound SA. If inline device is used then this device argument will be required for both inline device and eth device. With custom_inb_sa configuration, application can do the post processing of inli

[PATCH v2 12/17] net/cnxk: add PMD APIs to submit CPT instruction

2024-09-30 Thread Nithin Dabilpuram
From: Srujana Challa Introduces new PMD APIs for submitting CPT instructions to the Inline Device. These APIs allows applications to directly submit CPT instructions to the Inline Device. Signed-off-by: Srujana Challa --- drivers/common/cnxk/roc_nix_inl.h | 12 ++- drivers/common/cnxk

[PATCH v2 08/17] net/cnxk: move PMD function defines to common code

2024-09-30 Thread Nithin Dabilpuram
Move PMD function definitions to common code for cn9k/cn10k since they are declared commonly. Also remove the reference to 'struct rte_security_session' since it is now a driver internal structure and not exported to application code. Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn10k_

[PATCH v2 10/17] common/cnxk: fix CPT HW word size for outbound SA

2024-09-30 Thread Nithin Dabilpuram
Fix the CPT HW word size inited for outbound SA to be two words. Fixes: 5ece02e736c3 ("common/cnxk: use common SA init API for default options") Cc: sta...@dpdk.org Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_ie_ot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/c

[PATCH v2 05/17] net/cnxk: update mbuf and rearm data for Rx inject packets

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla When nix receives second pass packets injected to CPT next segments of primary mbuf are accessed directly using mbuf next pointer since we do not know at what offset mbuf is available.To achieve this we do no update mbut next pointer to NULL for Rx injected packets. Sign

[PATCH v2 07/17] common/cnxk: allow MAC address set/add with active VFs

2024-09-30 Thread Nithin Dabilpuram
From: Sunil Kumar Kori If device is in reconfigure state then it throws error while changing default MAC or adding new MAC in LMAC filter table if there are active VFs on a PF. Allowing MAC address set/add even active VFs are present on PF. Signed-off-by: Sunil Kumar Kori --- drivers/common/c

[PATCH v2 06/17] common/cnxk: remove restriction to clear RPM stats

2024-09-30 Thread Nithin Dabilpuram
From: Sunil Kumar Kori Linux does not support clearing RPM stats on cn10k platform. Hence restriction is added that when user requests to clear xstats then request is discarded silently. Hence removing restriction for cn10k. Signed-off-by: Sunil Kumar Kori --- drivers/common/cnxk/roc_nix_mac.

[PATCH v2 04/17] event/cnxk: handle timestamp for event mode

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla handle timestamp correctly for VF when ptp is enabled before running application in event mode by updating RX offload flags in link up notification Signed-off-by: Rakesh Kudurumalla --- drivers/event/cnxk/cn10k_eventdev.c | 32 drivers/eve

[PATCH v2 02/17] net/cnxk: handle timestamp correctly for VF

2024-09-30 Thread Nithin Dabilpuram
From: Rakesh Kudurumalla When timestamp is enabled on PF in kernel and respective VF is attached to application in DPDK mbuf_addr is getting corrupted in cnxk_nix_timestamp_dynfield() as "tstamp_dynfield_offset" is zero for PTP enabled PF This patch fixes the same Signed-off-by: Rakesh Kudurumal

[PATCH v3 47/47] net/bnxt: tf_ulp: add stats cache for thor2

2024-09-30 Thread Sriharsha Basavapatna
From: Peter Spreadborough This change adds a stats cache for Thor2 flows using counters. Flow stats will be harvested periodically in the background and stats reads by the application will be returned stats from the cache and not by initiating a read from HW. This change also adds read-clear fun

[PATCH v3 45/47] net/bnxt: tf_ulp: support a few feature extensions

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha This patch supports the following features. add support for port table write operation Added support for port table write operation from the template so that template can write mirror id details into the port database. support generic template fo

[PATCH v3 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha Added truflow feature bit meson configuration parameter to enable optional capability features of the appplication. Signed-off-by: Kishore Padmanabha Signed-off-by: Sriharsha Basavapatna Reviewed-by: Shahaji Bhosle Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_

[PATCH v3 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2

2024-09-30 Thread Sriharsha Basavapatna
From: Shuanglin Wang TFC supports the flow scale query feature for OVS application. The resource usage(WC-TCAM) is tracked inside Thor2 firmware. This patch is to query the wc-tcam usage info when adding/ deleting a flow. It is just for debugging purpose and disabled by default. Using the build

[PATCH v3 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash

2024-09-30 Thread Sriharsha Basavapatna
From: Peter Spreadborough The RTE hash is highly optimized and will use HW acceleration when available. Signed-off-by: Peter Spreadborough Signed-off-by: Sriharsha Basavapatna Reviewed-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 4 dr

[PATCH v3 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP

2024-09-30 Thread Sriharsha Basavapatna
From: Randy Schacher Support flow query rss command for truflow in ULP layer. Signed-off-by: Randy Schacher Signed-off-by: Sriharsha Basavapatna Reviewed-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_vnic.c| 39 +- drivers/net/bnxt/bnxt_

[PATCH v3 35/47] net/bnxt: tf_ulp: TF support flow scale query

2024-09-30 Thread Sriharsha Basavapatna
From: Shuanglin Wang TF supports the flow scale query feature for OVS application. The resource usage is tracked when opening a TF session or adding/deleting a flow. The resources includes WC TCAM, EM, Action, Counter, Meter, ACT_ENCAP, ACT_ENCAP, and SP_SMAC. User can query the resource usage us

[PATCH v3 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2

2024-09-30 Thread Sriharsha Basavapatna
From: Jay Ding 1. Implement Thor2 meter template tables 2. Add Thor2 meter support in ULP 3. Make rte_mtr API implementation device independent to adapt Thor2 meter hw change 4. Fix the round issue in xir calculation Signed-off-by: Jay Ding Signed-off-by: Sriharsha Basavapatna Reviewed-by:

[PATCH v3 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha If application does not specify mask in a field description then use the default mask values from dpdk header files. This patch also includes the following related changes. fix stats collection for shared session The stats accumulation was being performed on def

[PATCH v3 29/47] net/bnxt: tf_ulp: update template files

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha This patch updates template files for the following list of changes, that are being added in the next patch. dynamic support for VF representor mode (template files only) The configurable VF representor mode is removed and it is dynamic. The action record

[PATCH v3 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard

2024-09-30 Thread Sriharsha Basavapatna
From: Shuanglin Wang Modified return values of the several ULP utilities to comply C coding standard. Like using macros EXIT_SUCCESS(0) and EXIT_FAILURE(1) for the conventional status value for success and failure, respectively. They are declared in the file stdlib.h. Signed-off-by: Shuanglin W

[PATCH v3 27/47] net/bnxt: tf_ulp: fixed parent child db counters

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha The locking for the parent child counters need to be done till the stats are retrieved. Also the OVS is creating multiple F1 flows for same tunnel hence reference count needs to be maintined for the F1 flows. Fix name conflicts for class and action tables. Matcher alloca

[PATCH v3 26/47] net/bnxt: tf_ulp: enable recipe id generation

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha Added support to generate recipe id generation. This patch includes a few related changes: fix segfault in the wildcard recipe process The recipe id is being passed as 8 bit instead of 64bit causing the crash. Ported code using default_non_ha resource

[PATCH v3 25/47] net/bnxt: tf_ulp: update template files

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha This patch updates template files for the following list of changes, that are being added in the next patch. - enable recipe id generation - fix segfault in the wildcard recipe process Signed-off-by: Kishore Padmanabha Signed-off-by: Sriharsha Basavapatna Reviewed-by:

[PATCH v3 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2

2024-09-30 Thread Sriharsha Basavapatna
From: Mike Baucom Update to VFR code to: - add the endpoint (efid) to the session - modify the generic tables to write the l2 context id - tfc session code changes to allow the efid to be added to the sid - release both rfid and efid from afm This patch includes a few related changes: Thor2 cha

[PATCH v3 21/47] net/bnxt: tf_ulp: add action read and clear support

2024-09-30 Thread Sriharsha Basavapatna
From: Jay Ding Implement action read and clear support. Change flow query count to reset the count after read in ULP. Update cli cmds accordingly. Fixed bnxt_mpc_xmit() to pad the mpc message to be multiple of 16 bytes. Signed-off-by: Jay Ding Signed-off-by: Sriharsha Basavapatna Reviewed-by:

[PATCH v3 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha Converted the recipe table allocation from static model to dynamic memory allocation model. Signed-off-by: Kishore Padmanabha Signed-off-by: Sriharsha Basavapatna Reviewed-by: Michael Baucom Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 175 +

[PATCH v3 15/47] net/bnxt: tf_ulp: Wh+ mirroring support

2024-09-30 Thread Sriharsha Basavapatna
From: Manish Kurup 1. ULP fixes to enable primitives to support mirroring 2. RTE parser changes to support and use multiple ports in RTE input msgs 3. Template changes required to support ingress mirroring 4. Template changes required to support egress mirroring (using VFR pipeline) Signed

[PATCH v3 16/47] net/bnxt: tf_ulp: miscellaneous fixes

2024-09-30 Thread Sriharsha Basavapatna
From: Mike Baucom Template compiler modifications for v3 api: Compile named/unnamed shared app resources for the applications that are capable. Change app id signature with base zero offset: The app id is used in the calculation of the matching signatures and as app id value incr

[PATCH v3 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha Added support for the vf to vf flow offload for the whitney platform. It includes the change of the pipeline from using vlan tags to using custom L2 encap and decap of the packets. Signed-off-by: Kishore Padmanabha Signed-off-by: Sriharsha Basavapatna Reviewed-by: Shah

[PATCH v3 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support

2024-09-30 Thread Sriharsha Basavapatna
From: Shahaji Bhosle Add hooks in the hwrm and ulp layer to enable, custom tunnel header support on wh+ generic app(ovs). Signed-off-by: Shahaji Bhosle Signed-off-by: Sriharsha Basavapatna Reviewed-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h| 4

[PATCH v3 10/47] net/bnxt: tf_core: remove dead code from session-based priority TCAM mgr

2024-09-30 Thread Sriharsha Basavapatna
From: Randy Schacher Remove references to tx_tcam_supported and rx_tcam_supported logic which chooses between FW-based tcam resource allocation and driver-based tcam manager. Signed-off-by: Randy Schacher Signed-off-by: Sriharsha Basavapatna Reviewed-by: Peter Spreadborough Reviewed-by: Manis

[PATCH v3 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr

2024-09-30 Thread Sriharsha Basavapatna
From: Randy Schacher Remove references to AFM allocated memory which is no longer supported with TCAM mgr and truflow Signed-off-by: Randy Schacher Signed-off-by: Sriharsha Basavapatna Reviewed-by: Farah Smith Reviewed-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/

[PATCH v3 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move

2024-09-30 Thread Sriharsha Basavapatna
From: Sangtani Parag Satishbhai When entries are moved during HA, a shared move function transfers TCAM entries by using get/set message APIs, and the slice number of the entry is required to accomplish the movement. The slice number is calculated as the product of row_slice and entry size. Befor

[PATCH v3 06/47] net/bnxt: tf_core: TF support flow scale query

2024-09-30 Thread Sriharsha Basavapatna
From: Shuanglin Wang TF supports the flow scale query feature for OVS application. The resource usage is tracked when opening a TF session or adding/deleting a flow. The resources includes WC TCAM, EM, Action, Counter, Meter, ACT_ENCAP, ACT_ENCAP, and SP_SMAC. User can query the resource usage us

[PATCH v3 05/47] net/bnxt: tf_core: flow scale improvement

2024-09-30 Thread Sriharsha Basavapatna
From: Kishore Padmanabha Added logic to add flows to wildcard tcam if flows fail to be added to exact match table. Signed-off-by: Kishore Padmanabha Reviewed-by: Michael Baucom Reviewed-by: Ajit Khaparde Reviewed-by: Shahaji Bhosle Signed-off-by: Sriharsha Basavapatna --- drivers/net/bnxt/

[PATCH v3 04/47] net/bnxt: tf_core: Thor TF EM key size check

2024-09-30 Thread Sriharsha Basavapatna
From: Farah Smith The maximum EM key size is 640 bits for Thor. But the lookup record + the key size is 679 bits. This value must be rounded up to a 128 bit aligned number. So the size check should be 96 bytes rather than 80. This fix allows keys > 601 bits to be successfully inserted. Fixes:

[PATCH v3 03/47] net/bnxt: tf_core: External EM support cleanup

2024-09-30 Thread Sriharsha Basavapatna
From: Shuanglin Wang Isolate external EM support as it is now defunct on Wh+. Signed-off-by: Shuanglin Wang Signed-off-by: Sriharsha Basavapatna Reviewed-by: Shahaji Bhosle Reviewed-by: Farah Smith Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/meson.build |2 - drivers/ne

[PATCH v3 02/47] net/bnxt: tf_core: tcam manager data corruption

2024-09-30 Thread Sriharsha Basavapatna
From: Shahaji Bhosle Max entries per session were not getting initialized to 0, when the sessions were closed. Reset max entries counter session when the session is initialized Fixes: 97435d7906d7 ("net/bnxt: update Truflow core") Signed-off-by: Shahaji Bhosle Signed-off-by: Sriharsha Basavapat

[PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue

2024-09-30 Thread Sriharsha Basavapatna
From: Shahaji Bhosle FW tries to update the HWRM request data in the delete case to update the mode bit and also update invalid profile id. This update only happens when the data is send over DMA. HWRM requests are read only buffers and cannot be updated. So driver now will always send WC tcam se

[PATCH v3 00/47] TruFlow update for Thor2

2024-09-30 Thread Sriharsha Basavapatna
This patch series introduces TruFlow functionality for Broadcom Thor2 NIC. TruFlow(TF) is the software library that exposes CFA HW resources to upper layer protocols or applications. This patch series implements the tfc (tf_core) and the tf_ulp libraries as a part of the bnxt PMD, so that upper la

[PATCH v3 1/2] timer/linux: lower rounding of tsc estimation to 100KHz

2024-09-30 Thread Isaac Boukris
In practice, the estimation result is just a couple of KHz away from the kernel's tsc_khz value, so it should suffice. Rounding to 10MHz can cause a significant drift from real time, up to a second per 10 minutes. See also bugzilla: 959 Signed-off-by: Isaac Boukris --- lib/eal/linux/eal_timer.

[PATCH v3 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq

2024-09-30 Thread Isaac Boukris
If the tsc_known_freq cpu flag is missing, it means the kernel doesn't trust it and calculates its own. We should do the same to avoid drift. Signed-off-by: Isaac Boukris --- lib/eal/common/eal_common_timer.c | 3 +- lib/eal/common/eal_private.h | 2 +- lib/eal/freebsd/eal_timer.c |

[PATCH v3 0/2] Improve TSC frequency accuracy on Linux

2024-09-30 Thread Isaac Boukris
Changes in V3: - fixed ifdef logic. - avoid breaking a debug line. Isaac Boukris (2): timer/linux: lower rounding of tsc estimation to 100KHz timer/linux/x86: override TSC freq if no tsc_known_freq lib/eal/common/eal_common_timer.c | 3 +- lib/eal/common/eal_private.h | 2 +- lib/ea

[PATCH v2 1/2] timer/linux: lower rounding of tsc estimation to 100KHz

2024-09-30 Thread Isaac Boukris
In practice, the estimation result is just a couple of KHz away from the kernel's tsc_khz value, so it should suffice. Rounding to 10MHz can cause a significant drift from real time, up to a second per 10 minutes. See also bugzilla: 959 Signed-off-by: Isaac Boukris --- lib/eal/linux/eal_timer.

[PATCH v2 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq

2024-09-30 Thread Isaac Boukris
If the tsc_known_freq cpu flag is missing, it means the kernel doesn't trust it and calculates its own. We should do the same to avoid drift. Signed-off-by: Isaac Boukris --- lib/eal/common/eal_common_timer.c | 3 +- lib/eal/common/eal_private.h | 2 +- lib/eal/freebsd/eal_timer.c |

Re: [PATCH v3 1/1] ethdev: fix int overflow in descriptor count logic

2024-09-30 Thread Ferruh Yigit
On 9/30/2024 2:40 PM, Niall Meade wrote: > Addressed a specific overflow issue in the eth_dev_adjust_nb_desc() > function where the uint16_t variable nb_desc would overflow when its > value was greater than (2^16 - nb_align). This overflow caused nb_desc > to incorrectly wrap around between 0 and n

[PATCH v2 0/2] Improve TSC frequency accuracy on Linux

2024-09-30 Thread Isaac Boukris
Changes in V2: - changed rounding to 100KHz which should be pretty safe. - limited the tsc_known_freq flag check to x86 arch. Isaac Boukris (2): timer/linux: lower rounding of tsc estimation to 100KHz timer/linux/x86: override TSC freq if no tsc_known_freq lib/eal/common/eal_common_timer.c

Re: [PATCH 3/5] dts: use Pydantic in the configuration

2024-09-30 Thread Dean Marx
On Thu, Aug 22, 2024 at 12:40 PM Luca Vizzarro wrote: > This change brings in Pydantic in place of Warlock. Pydantic offers > a built-in model validation system in the classes, which allows for > a more resilient and simpler code. As a consequence of this change: > > - most validation is now buil

Re: [PATCH 0/5] Increase minimum meson version

2024-09-30 Thread Tyler Retzlaff
On Fri, Sep 20, 2024 at 01:57:32PM +0100, Bruce Richardson wrote: > This patchset proposed increasing the minimum meson version to 0.57 > and makes changes to update our build files appropriately for that > change: replacing deprecated functions, removing unnecessary version > checks and taking adv

Re: Meson get_cross_property deprecated

2024-09-30 Thread Tyler Retzlaff
On Fri, Sep 20, 2024 at 11:20:12AM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > Sent: Friday, 20 September 2024 11.08 > > > > On Fri, Sep 20, 2024 at 10:22:59AM +0200, Morten Brørup wrote: > > >Hi Bruce, > > > > > > > > >Meson version 1.3.2

Re: [PATCH v3 0/3] add frequency adjustment support for PTP

2024-09-30 Thread Ferruh Yigit
On 9/30/2024 9:42 AM, Mingjin Ye wrote: > [1/3] ethdev: add frequency adjustment API > [2/3] net/ice: add frequency adjustment support for PTP > [3/3] examples/ptpclient: add frequency adjustment support > --- > v2: rte_eth_timesync_adjust_freq marked as experimental. > --- > v3: Add more descripti

Re: [PATCH v3 1/3] ethdev: add frequency adjustment API

2024-09-30 Thread Ferruh Yigit
On 9/30/2024 9:42 AM, Mingjin Ye wrote: > This patch adds freq adjustment API for PTP high accuracy. > > Signed-off-by: Simei Su > Signed-off-by: Mingjin Ye > Reviewed-by: Ferruh Yigit

Re: [PATCH v3 3/3] examples/ptpclient: add frequency adjustment support

2024-09-30 Thread Ferruh Yigit
On 9/30/2024 9:42 AM, Mingjin Ye wrote: > This patch adds PI servo algorithm to support frequency > adjustment API for IEEE1588 PTP. > > For example, the command for starting ptpclient with PI algorithm is: > ./build/examples/dpdk-ptpclient -a :81:00.0 -c 1 -n 3 -- -T 0 -p 0x1 > --controller=p

Re: [PATCH 2/5] dts: add Pydantic and remove Warlock

2024-09-30 Thread Dean Marx
On Thu, Aug 22, 2024 at 12:40 PM Luca Vizzarro wrote: > Add Pydantic to the project dependencies while dropping Warlock. > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > dts/poetry.lock| 346 + > dts/pyproject.toml | 3 +-

Re: [PATCH v25 15/15] doc: add release note about log library

2024-09-30 Thread Tyler Retzlaff
On Thu, Sep 19, 2024 at 08:04:21AM -0700, Stephen Hemminger wrote: > Significant enough to add some documentation. > > Signed-off-by: Stephen Hemminger > Acked-by: Morten Brørup > Acked-by: Bruce Richardson > Acked-by: Chengwen Feng > --- Acked-by: Tyler Retzlaff

Re: [PATCH v4 02/17] cryptodev/bcmfs: fix mis-matched free

2024-09-30 Thread Ajit Khaparde
On Mon, Sep 30, 2024 at 11:46 AM Stephen Hemminger wrote: > > The device structure is allocated with rte_malloc() and > then incorrectly freed with free(). This will lead to > corrupt malloc pool. > > Bugzilla ID: 1552 > Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") > Cc: sta...@dpd

[PATCH v3] examples/flow_filtering: introduce use cases snippets

2024-09-30 Thread Shani Peretz
These code snippets demonstrate rule creation using template and non-template APIs. They include functions that enable developers to create rules. The purpose of providing these snippets is to allow developers to reuse them, thereby saving time and effort during the implementation of flow rules. T

[PATCH v4 14/17] drivers/ifpga: fix free function mismatch

2024-09-30 Thread Stephen Hemminger
The raw ifpga driver redefines malloc to be opae_malloc and free to be opae_free; which is a bad idea. This leads to case where interrupt efd array is allocated with calloc() and then passed to rte_free. The workaround is to allocate the array with rte_calloc() instead. Fixes: d61138d4f0e2 ("driv

[PATCH v4 17/17] eal: add function attributes for allocation functions

2024-09-30 Thread Stephen Hemminger
The allocation functions take a alignment argument that can be useful to hint the compiler optimizer. This is supported by Gcc and Clang but only useful with Gcc because Clang gives warning if alignment is 0. Recent versions of GCC have a malloc attribute that can be used to find mismatches betwe

[PATCH v4 16/17] common/idpf: fix use after free due

2024-09-30 Thread Stephen Hemminger
The macro in this driver was redefining LIST_FOR_EACH_ENTRY_SAFE as a simple LIST_FOR_EACH macro. But they are not the same the _SAFE variant guarantees that there will not be use after free. Fixes: fb4ac04e9bfa ("common/idpf: introduce common library") Cc: junfeng@intel.com Signed-off-by: Ste

[PATCH v4 15/17] baseband/la12xx: prevent use after free

2024-09-30 Thread Stephen Hemminger
It is possible that the info pointer (hp) could get freed twice. Fix by nulling after free. In function 'setup_la12xx_dev', inlined from 'la12xx_bbdev_create' at ../drivers/baseband/la12xx/bbdev_la12xx.c:1029:8, inlined from 'la12xx_bbdev_probe' at ../drivers/baseband/la12xx/bbdev_la12xx.c:1075:

[PATCH v4 09/17] net/sfc: fix use-after-free warning messages

2024-09-30 Thread Stephen Hemminger
If compiler detection of use-after-free is enabled then this drivers debug messages will cause warnings. Change to move debug message before the object is freed. Bugzilla ID: 1551 Fixes: 55c1238246d5 ("net/sfc: add more debug messages to transfer flows") Signed-off-by: Stephen Hemminger Reviewed-

[PATCH v4 12/17] raw/ifpga/base: fix use after free

2024-09-30 Thread Stephen Hemminger
The TAILQ_FOREACH() macro would refer to info after it had been freed. Fix by introducing TAILQ_FOREACH_SAFE here. Fixes: 4a19f89104f8 ("raw/ifpga/base: support multiple cards") Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/raw/ifpga/base/opae_intel_max10.c | 11 +--

[PATCH v4 10/17] net/cpfl: fix free of nonheap object

2024-09-30 Thread Stephen Hemminger
With proper annotation, GCC discovers that this driver is calling rte_free() on an object that was not allocated (it is part of array in another object). In function ‘cpfl_flow_js_mr_layout’, inlined from ‘cpfl_flow_js_mr_action’ at ../drivers/net/cpfl/cpfl_flow_parser.c:848:9, inlined fr

[PATCH v4 13/17] common/qat: fix use after free

2024-09-30 Thread Stephen Hemminger
Checking return value of rte_memzone_free() is pointless and if it failed then it was because the pointer was null. Fixes: 7b1374b1e6e7 ("common/qat: limit configuration to primary process") Cc: arkadiuszx.kusz...@intel.com Signed-off-by: Stephen Hemminger --- drivers/common/qat/qat_device.c |

[PATCH v4 11/17] net/nfp: fix duplicate call to rte_free

2024-09-30 Thread Stephen Hemminger
Calling rte_free twice on same object will corrupt the heap. Warning is: In function 'nfp_pre_tun_table_check_del', inlined from 'nfp_flow_destroy' at ../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9: ../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9: error: pointer 'entry' used after 'rte_fre

[PATCH v4 08/17] net/e1000: fix use-after-free

2024-09-30 Thread Stephen Hemminger
The driver cleanup code was freeing the filter object then dereferencing it. Bugzilla ID: 1550 Fixes: 6a4d050e2855 ("net/igb: flush all the filter") Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/e1000/igb_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v4 07/17] bpf: fix free mismatch if convert fails

2024-09-30 Thread Stephen Hemminger
If conversion of cBF to eBPF fails then an object allocated with rte_malloc() would be passed to free(). [908/3201] Compiling C object lib/librte_bpf.a.p/bpf_bpf_convert.c.o ../lib/bpf/bpf_convert.c: In function ‘rte_bpf_convert’: ../lib/bpf/bpf_convert.c:559:17: warning: ‘free’ called on pointer

[PATCH v4 06/17] net/cnxk: fix use-after-free

2024-09-30 Thread Stephen Hemminger
The driver would refer to the mempool object after it was freed. Bugzilla ID: 1554 Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF") Cc: rbhans...@marvell.com Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/cnxk/cnxk_ethdev_sec.c | 2 +- 1 file changed,

[PATCH v4 03/17] dma/ixd: fix incorrect free function in cleanup

2024-09-30 Thread Stephen Hemminger
The data structure is allocated with rte_malloc and incorrectly freed in cleanup logic using free. Bugzilla ID: 1549 Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe") Cc: kevin.la...@intel.com Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/dma/idxd/idxd_pc

[PATCH v4 04/17] event/cnxk: fix pointer mismatch in cleanup

2024-09-30 Thread Stephen Hemminger
The code to cleanup in case of error was passing incorrect value to rte_free. The ports[] entry was allocated with rte_malloc and that should be used instead of the offset in that object. Fixes: 97a05c1fe634 ("event/cnxk: add port config") Cc: sthot...@marvell.com Cc: sta...@dpdk.org Signed-off-b

[PATCH v4 05/17] examples/vhost: fix free function mismatch

2024-09-30 Thread Stephen Hemminger
The pointer bdev is allocated with rte_zmalloc() and then incorrectly freed with free() which will lead pool corruption. Bugzilla ID: 1553 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng ---

[PATCH v4 02/17] cryptodev/bcmfs: fix mis-matched free

2024-09-30 Thread Stephen Hemminger
The device structure is allocated with rte_malloc() and then incorrectly freed with free(). This will lead to corrupt malloc pool. Bugzilla ID: 1552 Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/crypto/bcmfs/bcmfs_d

[PATCH v4 01/17] memzone: fix use after free in tracing

2024-09-30 Thread Stephen Hemminger
Using the freed value for tracing is not a good idea. Although it is harmless for tracing, it will cause analyzers to flag this as unsafe. Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng --- lib/eal/common/eal_common_memzone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH v4 00/17] Fix allocation bugs and hardening for rte_malloc

2024-09-30 Thread Stephen Hemminger
Recent versions of GCC have some additional function attributes that can help with DPDK performance and stability. The alloc_align attribute tells the compiler what the alignment of the allocation will be, and the optimizer can use this to produce better code (especially memcpy and structure copie

Re: [PATCH 3/5] dts: use Pydantic in the configuration

2024-09-30 Thread Nicholas Pratte
Hi Luca! See my comments below, thanks! On Thu, Aug 22, 2024 at 12:40 PM Luca Vizzarro wrote: > > This change brings in Pydantic in place of Warlock. Pydantic offers > a built-in model validation system in the classes, which allows for > a more resilient and simpler code. As a consequence of this

Re: [PATCH v2] examples/flow_filtering: introduce use cases snippets

2024-09-30 Thread Bruce Richardson
On Mon, Sep 30, 2024 at 09:58:55AM -0700, Stephen Hemminger wrote: > On Mon, 30 Sep 2024 19:40:15 +0300 > Shani Peretz wrote: > > > + /* Function responsible for creating the flow rule. 8< */ > > What is with the 8< in the comments in this file. > Seems like something non-standard and trying t

Re: [PATCH 0/4] fix issues with using AVX-512 drivers on 32-bit

2024-09-30 Thread Bruce Richardson
On Mon, Sep 30, 2024 at 04:57:21PM +0100, Bruce Richardson wrote: > On Mon, Sep 30, 2024 at 05:38:44PM +0200, David Marchand wrote: > > On Fri, Sep 6, 2024 at 4:11 PM Bruce Richardson > > wrote: > > > > > > The AVX-512 copy code in multiple drivers was incorrect for 32-bit as it > > > assumed that

[PATCH v1 8/8] net/idpf: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/net/idpf/meson.build | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/net/idpf/meson.build b/drivers/net/idpf/meson.build

[PATCH v1 7/8] net/ice: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/net/ice/meson.build | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index

[PATCH v1 6/8] net/iavf: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/net/iavf/meson.build | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index

[PATCH v1 5/8] net/i40e: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/net/i40e/meson.build | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index

[PATCH v1 4/8] net/cpfl: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/net/cpfl/meson.build | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build

[PATCH v1 3/8] common/idpf: use global AVX-512 variables

2024-09-30 Thread Bruce Richardson
Replace per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/common/idpf/meson.build | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meso

  1   2   >