RE: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread Ding, Xuan
Hi, > -Original Message- > From: Maxime Coquelin > Sent: 2022年7月7日 19:31 > To: Xia, Chenbo ; Ding, Xuan > Cc: dev@dpdk.org; Hu, Jiayu ; He, Xingguang > ; Yang, YvonneX ; Jiang, > Cheng1 > Subject: Re: [PATCH] vhost: fix unnecessary dirty page logging > > > > On 7/7/22 11:51, Xia, Che

[PATCH] common/sfc_efx/base: remove VQ index check during VQ start

2022-07-08 Thread abhimanyu.saini
From: Abhimanyu Saini The used/avail queue indexes are not bound by queue size, because the descriptor entry index is calculated by a simple modulo between queue index and queue_size So, do not check initial used and avail queue indexes against queue size because it is possible for these indexes

RE: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread He, Xingguang
> -Original Message- > From: Ding, Xuan > Sent: Friday, July 8, 2022 3:04 PM > To: Maxime Coquelin ; Xia, Chenbo > > Cc: dev@dpdk.org; Hu, Jiayu ; He, Xingguang > ; Yang, YvonneX ; > Jiang, Cheng1 > Subject: RE: [PATCH] vhost: fix unnecessary dirty page logging > > Hi, > > > -Origi

Re: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread Maxime Coquelin
Hi, On 7/8/22 09:04, Ding, Xuan wrote: Hi, -Original Message- From: Maxime Coquelin Sent: 2022年7月7日 19:31 To: Xia, Chenbo ; Ding, Xuan Cc: dev@dpdk.org; Hu, Jiayu ; He, Xingguang ; Yang, YvonneX ; Jiang, Cheng1 Subject: Re: [PATCH] vhost: fix unnecessary dirty page logging On 7/7

[PATCH] vdpa/sfc: enable support for multi-queue

2022-07-08 Thread abhimanyu.saini
From: Abhimanyu Saini Increase the number to defaut RX/TX queue pairs to 8, and add MQ feature flag to vDPA protocol features. Signed-off-by: Abhimanyu Saini --- drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 ++ drivers/vdpa/sfc/sfc_vdpa_ops.c | 6 -- drivers/vdpa/sfc/sfc_vdpa_ops.h | 2 +- 3 files

RE: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread Ding, Xuan
> -Original Message- > From: Maxime Coquelin > Sent: 2022年7月8日 15:58 > To: Ding, Xuan ; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; He, Xingguang > ; Yang, YvonneX ; Jiang, > Cheng1 > Subject: Re: [PATCH] vhost: fix unnecessary dirty page logging > > Hi, > > On 7/8/22 09:04, Ding, Xu

Re: [PATCH] vdpa/sfc: resolve race between libvhost and dev_conf

2022-07-08 Thread David Marchand
Hello Abhimanyu, Vijay, On Thu, Jul 7, 2022 at 2:38 PM Maxime Coquelin wrote: > On 7/6/22 11:24, abhimanyu.sa...@xilinx.com wrote: > > From: Abhimanyu Saini > > > > libvhost calls dev_conf() before prosessing the > > VHOST_USER_SET_VRING_CALL message for the last VQ. So > > this message is proce

RE: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread He, Xingguang
> -Original Message- > From: He, Xingguang > Sent: Friday, July 8, 2022 3:53 PM > To: Ding, Xuan ; Maxime Coquelin > ; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Yang, YvonneX > ; Jiang, Cheng1 > Subject: RE: [PATCH] vhost: fix unnecessary dirty page logging > > > -Original Messa

RE: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

2022-07-08 Thread Jiang, YuX
> -Original Message- > From: Li, WeiyuanX > Sent: Friday, July 8, 2022 1:32 PM > To: Huisong Li ; ferruh.yi...@xilinx.com; > andrew.rybche...@oktetlabs.ru; dev@dpdk.org > Cc: tho...@monjalon.net; huangda...@huawei.com; > liudongdo...@huawei.com > Subject: RE: [PATCH V2] app/testpmd: fix di

[PATCH v2] vdpa/sfc: enable support for multi-queue

2022-07-08 Thread abhimanyu.saini
From: Abhimanyu Saini Increase the number to default RX/TX queue pairs to 8, and add MQ feature flag to vDPA protocol features. Signed-off-by: Abhimanyu Saini --- v2: Fix checkpatch warnings drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 ++ drivers/vdpa/sfc/sfc_vdpa_ops.c | 6 -- drivers/vdpa/sfc/s

Re: [PATCH] vdpa/ifc/base: fix null pointer dereference

2022-07-08 Thread Maxime Coquelin
On 7/8/22 07:57, Andy Pei wrote: Fix null pointer dereference reported in coverity scan. Output some log information when lm_cfg is null. Make lm_cfg is not null before operate on lm_cfg. Make sure* Coverity issue: 378882 Fixes: d7fe5a2861e7 ("net/ifc: support live migration") Signed-off

[Bug 1050] Burst packet receive from Mellanox gives "Segmentation fault" on CQE decompression

2022-07-08 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1050 Bug ID: 1050 Summary: Burst packet receive from Mellanox gives "Segmentation fault" on CQE decompression Product: DPDK Version: unspecified Hardware: All OS: Linux

[PATCH v2] vdpa/ifc/base: fix null pointer dereference

2022-07-08 Thread Andy Pei
Fix null pointer dereference reported in coverity scan. Output some log information when lm_cfg is null. Make sure lm_cfg is not null before operate on lm_cfg. Coverity issue: 378882 Fixes: d7fe5a2861e7 ("net/ifc: support live migration") Signed-off-by: Andy Pei --- drivers/vdpa/ifc/base/ifcvf.

Re: [PATCH v2] vdpa/ifc/base: fix null pointer dereference

2022-07-08 Thread Maxime Coquelin
On 7/8/22 11:10, Andy Pei wrote: Fix null pointer dereference reported in coverity scan. Output some log information when lm_cfg is null. Make sure lm_cfg is not null before operate on lm_cfg. Coverity issue: 378882 Fixes: d7fe5a2861e7 ("net/ifc: support live migration") Signed-off-by: Andy

Re: [PATCH] vdpa/ifc/base: fix null pointer dereference

2022-07-08 Thread Maxime Coquelin
On 7/8/22 07:57, Andy Pei wrote: Fix null pointer dereference reported in coverity scan. Output some log information when lm_cfg is null. Make lm_cfg is not null before operate on lm_cfg. Coverity issue: 378882 Fixes: d7fe5a2861e7 ("net/ifc: support live migration") Signed-off-by: Andy Pei

Re: [PATCH] vhost: fix unnecessary dirty page logging

2022-07-08 Thread Maxime Coquelin
On 7/7/22 08:55, xuan.d...@intel.com wrote: From: Xuan Ding The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else j

Re: [PATCH v3] doc: add release notes for async vhost dequeue data-path

2022-07-08 Thread Maxime Coquelin
On 6/28/22 04:06, Cheng Jiang wrote: Add release notes for asynchronous vhost dequeue data-path. Emphasize that split virtqueue and packed virtqueue are both supported in asynchronous vhost dequeue data-path. Signed-off-by: Cheng Jiang --- v3: code rebased. v2: fixed a full stop missing in t

Re: [PATCH] vdpa/mlx5: fix leak on event thread creation

2022-07-08 Thread Maxime Coquelin
On 6/20/22 15:10, David Marchand wrote: As stated in the manual, pthread_attr_init return value should be checked. Besides, a pthread_attr_t should be destroyed once unused. In practice, we may have no leak (from what I read in glibc current code), but this may change in the future. Stick to

Re: [PATCH v3 0/4] Enhance docs on virtio-user as KNI replacement

2022-07-08 Thread Maxime Coquelin
On 6/10/22 17:35, Bruce Richardson wrote: Since use of KNI is no longer advised (due to known issues and the fact it's an out-of-tree module), virtio-user is recommended for new developments. To help encourage this, we improve the doc HOWTO section on using virtio-user and add a link to that d

RE: [PATCH] vdpa/ifc/base: fix null pointer dereference

2022-07-08 Thread Pei, Andy
Hi Maxime, Thanks for your efforts. > -Original Message- > From: Maxime Coquelin > Sent: Friday, July 8, 2022 5:11 PM > To: Pei, Andy ; dev@dpdk.org > Cc: Xia, Chenbo ; Wang, Xiao W > > Subject: Re: [PATCH] vdpa/ifc/base: fix null pointer dereference > > > > On 7/8/22 07:57, Andy Pei

Re: [PATCH] vdpa/sfc: resolve race between libvhost and dev_conf

2022-07-08 Thread Maxime Coquelin
On 7/6/22 11:24, abhimanyu.sa...@xilinx.com wrote: From: Abhimanyu Saini libvhost calls dev_conf() before prosessing the VHOST_USER_SET_VRING_CALL message for the last VQ. So this message is processed after dev_conf() returns. However, the dev_conf() function spawns a thread to set rte_vhos

Re: [PATCH 1/2] common: add safe version of foreach-list to Linux

2022-07-08 Thread Thomas Monjalon
08/07/2022 10:56, Khan, Hamza: > From: Thomas Monjalon > > 07/07/2022 17:59, Khan, Hamza: > > > I have sent v2 patch with the aforementioned fix. > > > However Is being held until the list moderator can review it for > > > approval > > > > I've unblocked it. > > This is blocked because you are no

Re: [PATCH] vdpa/sfc: resolve race between libvhost and dev_conf

2022-07-08 Thread Maxime Coquelin
On 7/8/22 11:23, Maxime Coquelin wrote: On 7/6/22 11:24, abhimanyu.sa...@xilinx.com wrote: From: Abhimanyu Saini libvhost calls dev_conf() before prosessing the VHOST_USER_SET_VRING_CALL message for the last VQ. So this message is processed after dev_conf() returns. However, the dev_conf

RE: [PATCH 1/2] common: add safe version of foreach-list to Linux

2022-07-08 Thread Khan, Hamza
> -Original Message- > From: Thomas Monjalon > Sent: Friday 8 July 2022 10:25 > To: Khan, Hamza > Cc: dev@dpdk.org > Subject: Re: [PATCH 1/2] common: add safe version of foreach-list to Linux > > 08/07/2022 10:56, Khan, Hamza: > > From: Thomas Monjalon > > > 07/07/2022 17:59, Khan, H

Re: [PATCH v3] examples/vm_power_manager: use safe version of list iterator

2022-07-08 Thread Hunt, David
On 08/07/2022 09:51, Hamza Khan wrote: Currently, when vm_power_manager exits, we are using a LIST_FOREACH macro to iterate over VM info structures while freeing them. This leads to use-after-free error. To address this, replace all usages of LIST_* with TAILQ_* macros, and use the RTE_TAILQ_FO

[PATCH V1] doc: add tested Intel platforms with Intel NICs

2022-07-08 Thread Lingli Chen
Add tested Intel platforms with Intel NICs to v22.07 release note. Signed-off-by: Lingli Chen --- doc/guides/rel_notes/release_22_07.rst | 104 + 1 file changed, 104 insertions(+) diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.r

RE: [PATCH] vdpa/sfc: resolve race between libvhost and dev_conf

2022-07-08 Thread Saini, Abhimanyu
[AMD Official Use Only - General] Sorry Maxime, I forgot to copy stable. Yes it's required, the faulty commit is : 630be406dcbfc26260e9d9688c40a381d0f012db -Original Message- From: Maxime Coquelin Sent: Friday, July 8, 2022 2:55 PM To: abhimanyu.sa...@xilinx.com; dev@dpdk.org Cc: chenb

Re: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

2022-07-08 Thread Ferruh Yigit
On 7/8/2022 6:32 AM, Li, WeiyuanX wrote: -Original Message- From: Huisong Li Sent: Friday, July 8, 2022 9:42 AM To: ferruh.yi...@xilinx.com; andrew.rybche...@oktetlabs.ru; dev@dpdk.org Cc: tho...@monjalon.net; Li, WeiyuanX ; huangda...@huawei.com; liudongdo...@huawei.com; lihuis...@huawe

Re: [PATCH] vdpa/sfc: resolve race between libvhost and dev_conf

2022-07-08 Thread Maxime Coquelin
On 7/8/22 12:25, Saini, Abhimanyu wrote: [AMD Official Use Only - General] Sorry Maxime, I forgot to copy stable. Yes it's required, the faulty commit is : 630be406dcbfc26260e9d9688c40a381d0f012db Thanks, ammended the commit message and applied to dpdk-next-virtio/main. -Original Me

Re: [PATCH 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Mattias Rönnblom
On 2022-07-07 23:44, Morten Brørup wrote: >> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] >> Sent: Thursday, 7 July 2022 20.35 >> >> From: Mattias Rönnblom >> >> __rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its >> data through an uint16_t pointer, which allowed the co

Re: [PATCH v3] config/arm: add Phytium FT-2000+

2022-07-08 Thread Thomas Monjalon
05/07/2022 15:50, Ruifeng Wang: > > From: luzhipeng > > > > Here adds configs for Phytium server. > > > > Signed-off-by: luzhipeng > > Reviewed-by: Thomas Monjalon > > --- > > I did some changes in this v3: > > - PHYTIUM -> Phytium (as on the website) > > - ft2000plus -> FT-2000+ (as found onl

[PATCH 1/2] test/service: add perf measurements for with stats mode

2022-07-08 Thread Harry van Haaren
This commit improves the performance reporting of the service cores polling loop to show both with and without statistics collection modes. Collecting cycle statistics is costly, due to calls to rte_rdtsc() per service iteration. Reported-by: Mattias Rönnblom Suggested-by: Honnappa Nagarahalli S

[PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Harry van Haaren
This commit fixes a potential racey-add that could occur if multiple service-lcores were executing the same MT-safe service at the same time, with service statistics collection enabled. Because multiple threads can run and execute the service, the stats values can have multiple writer threads, res

RE: Service core statistics MT safety

2022-07-08 Thread Van Haaren, Harry
> -Original Message- > From: Honnappa Nagarahalli > Sent: Thursday, July 7, 2022 6:26 PM > To: Van Haaren, Harry ; Morten Brørup > ; Mattias Rönnblom ; > mattias.ronnblom ; dev@dpdk.org > Cc: nd ; nd > Subject: RE: Service core statistics MT safety > > > > Yes, understood and agree.

[PATCH v2 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Mattias Rönnblom
__rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its data through an uint16_t pointer, which allowed the compiler to assume the data was 16-bit aligned. This in turn would, with certain architectures and compiler flag combinations, result in code with SIMD load or store instruction

[PATCH v2 1/2] app/test: add cksum performance test

2022-07-08 Thread Mattias Rönnblom
Add performance test for the rte_raw_cksum() function, which delegates the actual work to __rte_raw_cksum(), which in turn is used by other functions in need of Internet checksum calculation. Signed-off-by: Mattias Rönnblom --- v2: * Added __rte_unused to unused volatile variable, to keep the

RE: [PATCH 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Friday, 8 July 2022 14.44 > > On 2022-07-07 23:44, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > >> Sent: Thursday, 7 July 2022 20.35 > >> > >> From: Mattias Rönnblom > >> > >> __rte_raw_ck

[PATCH v9] sched: enable CMAN at runtime

2022-07-08 Thread Marcin Danilewicz
Added changes to enable CMAN (RED or PIE) at init from profile configuration file. By default CMAN code is enable but not in use, when there is no RED or PIE profile configured. Signed-off-by: Marcin Danilewicz --- Log: v2 change in rte_sched.h to avoid ABI breakage. v3 changes from comment

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Morten Brørup
> From: Harry van Haaren [mailto:harry.van.haa...@intel.com] > Sent: Friday, 8 July 2022 14.57 > > This commit fixes a potential racey-add that could occur if > multiple service-lcores were executing the same MT-safe service > at the same time, with service statistics collection enabled. > > Beca

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Van Haaren, Harry
> -Original Message- > From: Morten Brørup > Sent: Friday, July 8, 2022 2:23 PM > To: Van Haaren, Harry ; dev@dpdk.org > Cc: mattias.ronnblom ; Honnappa Nagarahalli > > Subject: RE: [PATCH 2/2] service: fix potential stats race-condition on MT > services > > This patch causes a 1.25x

Re: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Mattias Rönnblom
On 2022-07-08 14:56, Harry van Haaren wrote: > This commit fixes a potential racey-add that could occur if > multiple service-lcores were executing the same MT-safe service > at the same time, with service statistics collection enabled. > > Because multiple threads can run and execute the service,

[PATCH] vhost/crypto: fix out of bound access

2022-07-08 Thread Fan Zhang
Coverity issue: 379211 Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12") Cc: david.march...@redhat.com Signed-off-by: Fan Zhang --- lib/vhost/vhost_crypto.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypt

Re: [PATCH 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Mattias Rönnblom
On 2022-07-08 15:02, Morten Brørup wrote: >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] >> Sent: Friday, 8 July 2022 14.44 >> >> On 2022-07-07 23:44, Morten Brørup wrote: From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] Sent: Thursday, 7 July 2022 20.35 F

[PATCH v2] vhost/crypto: fix out of bound access

2022-07-08 Thread Fan Zhang
Coverity issue: 379211 Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12") Cc: david.march...@redhat.com Signed-off-by: Fan Zhang --- v2: fix format-warning lib/vhost/vhost_crypto.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/vhost/vhost_crypt

Re: [PATCH 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Bruce Richardson
On Fri, Jul 08, 2022 at 01:52:12PM +, Mattias Rönnblom wrote: > On 2022-07-08 15:02, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > >> Sent: Friday, 8 July 2022 14.44 > >> > >> On 2022-07-07 23:44, Morten Brørup wrote: > From: Mattias Rönnblom [ma

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Morten Brørup
> From: Van Haaren, Harry [mailto:harry.van.haa...@intel.com] > Sent: Friday, 8 July 2022 15.45 > > > From: Morten Brørup > > Sent: Friday, July 8, 2022 2:23 PM > > > > > > This patch causes a 1.25x increase in cycle-cost for polling a > > > MT safe service when statistics are enabled. No chan

[PATCH v10] sched: enable CMAN at runtime

2022-07-08 Thread Marcin Danilewicz
Added changes to enable CMAN (RED or PIE) at init from profile configuration file. By default CMAN code is enable but not in use, when there is no RED or PIE profile configured. Signed-off-by: Marcin Danilewicz --- Log: v2 change in rte_sched.h to avoid ABI breakage. v3 changes from comment

Re: [PATCH v2] common/mlx5: update DevX error logging

2022-07-08 Thread Thomas Monjalon
06/07/2022 16:02, Gregory Etelson: > Current PMD logs all DevX errors at error level. > > DevX interface can fail queue counters allocation on some hardware > types. That is a known issue. > PMD fallback to VERB API to allocate queue counters > when it detects the fault. > That DevX failure should

Re: [PATCH v2 0/2] DLB2: cq_weight fixes

2022-07-08 Thread Thomas Monjalon
06/07/2022 23:46, Timothy McDaniel: > This patch series contains the following: > - fix coverity issue 379234 > - improve error reporting for cq_weight feature > > Changes since V1 > - fixed a repeated word in the commit message of patch 1 > > Timothy McDaniel (2): > event/dlb2: fix cq_weight a

RE: [PATCH 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Morten Brørup
> From: Bruce Richardson [mailto:bruce.richard...@intel.com] > Sent: Friday, 8 July 2022 16.10 > > On Fri, Jul 08, 2022 at 01:52:12PM +, Mattias Rönnblom wrote: > > On 2022-07-08 15:02, Morten Brørup wrote: > > >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > > >> Sent: Frida

Re: [PATCH v2 2/2] net: have checksum routines accept unaligned data

2022-07-08 Thread Ferruh Yigit
On 7/8/2022 1:56 PM, Mattias Rönnblom wrote: __rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its data through an uint16_t pointer, which allowed the compiler to assume the data was 16-bit aligned. This in turn would, with certain architectures and compiler flag combinations, res

Re: [PATCH v2] examples/link_status_interrupt: fix stats refresh rate

2022-07-08 Thread Thomas Monjalon
07/07/2022 10:22, Omar Awaysa: > From: Raja Zidane > > TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond, > current definition is correct for cores with frequency of 2GHZ, for cores > with different frequency, it caused different periods between refresh, > (i.e. the definit

Re: [PATCH v9 1/4] ethdev: introduce protocol header API

2022-07-08 Thread Andrew Rybchenko
On 6/13/22 13:25, wenxuanx...@intel.com wrote: From: Wenxuan Wu This patch added new ethdev API to retrieve supported protocol header mask This patch added -> Add of a PMD, which helps to configure protocol header based buffer split. I'd like to see motivation why single mask is considere

Re: [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split

2022-07-08 Thread Andrew Rybchenko
On 6/13/22 13:25, wenxuanx...@intel.com wrote: From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However

RE: [PATCH v2 0/2] DLB2: cq_weight fixes

2022-07-08 Thread McDaniel, Timothy
> -Original Message- > From: Thomas Monjalon > Sent: Friday, July 8, 2022 9:26 AM > To: McDaniel, Timothy > Cc: dev@dpdk.org; jer...@marvell.com; jerinjac...@gmail.com; > sta...@dpdk.org > Subject: Re: [PATCH v2 0/2] DLB2: cq_weight fixes > > 06/07/2022 23:46, Timothy McDaniel: > > Th

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Honnappa Nagarahalli
> > This commit fixes a potential racey-add that could occur if multiple service- > lcores were executing the same MT-safe service at the same time, with > service statistics collection enabled. > > Because multiple threads can run and execute the service, the stats values > can have multiple wr

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Van Haaren, Harry
> -Original Message- > From: Honnappa Nagarahalli > Sent: Friday, July 8, 2022 4:16 PM > To: Van Haaren, Harry ; dev@dpdk.org > Cc: mattias.ronnblom ; Morten Brørup > ; nd ; nd > Subject: RE: [PATCH 2/2] service: fix potential stats race-condition on MT > services > > diff --git a/lib

Re: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Bruce Richardson
On Fri, Jul 08, 2022 at 03:31:01PM +, Van Haaren, Harry wrote: > > -Original Message- > > From: Honnappa Nagarahalli > > Sent: Friday, July 8, 2022 4:16 PM > > To: Van Haaren, Harry ; dev@dpdk.org > > Cc: mattias.ronnblom ; Morten Brørup > > ; nd ; nd > > Subject: RE: [PATCH 2/2] serv

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Morten Brørup
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@arm.com] > Sent: Friday, 8 July 2022 17.16 > > > > > > This commit fixes a potential racey-add that could occur if multiple > service- > > lcores were executing the same MT-safe service at the same time, with > > service statistics collect

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Honnappa Nagarahalli
> > > > > > > > diff --git a/lib/eal/common/rte_service.c > > > > b/lib/eal/common/rte_service.c index ef31b1f63c..f045e74ef3 100644 > > > > --- a/lib/eal/common/rte_service.c > > > > +++ b/lib/eal/common/rte_service.c > > > > @@ -363,9 +363,15 @@ service_runner_do_callback(struct > > > > rte_serv

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Honnappa Nagarahalli
> > > > > > This commit fixes a potential racey-add that could occur if multiple > > service- > > > lcores were executing the same MT-safe service at the same time, > > > with service statistics collection enabled. > > > > > > Because multiple threads can run and execute the service, the stats > >

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Morten Brørup
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@arm.com] > Sent: Friday, 8 July 2022 18.46 > > > > > > > > > > This commit fixes a potential racey-add that could occur if > multiple > > > service- > > > > lcores were executing the same MT-safe service at the same time, > > > > with serv

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Honnappa Nagarahalli
> > > > > > > > > > This commit fixes a potential racey-add that could occur if > > multiple > > > > service- > > > > > lcores were executing the same MT-safe service at the same time, > > > > > with service statistics collection enabled. > > > > > > > > > > Because multiple threads can run and ex

RE: clarification on RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF flag

2022-07-08 Thread Honnappa Nagarahalli
> On Wed, 6 Jul 2022 19:07:54 +0530 > venkatesh bs wrote: > > > Hi All, > > > > In multithreaded/Multicore environment can we use > > RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF > > independently, This flag is about reader-writer concurrency (not writer-writer concurrency). Reader-writer concurren

RE: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Morten Brørup
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@arm.com] > Sent: Friday, 8 July 2022 19.40 > > > > > > > > > > > > > > This commit fixes a potential racey-add that could occur if > > > multiple > > > > > service- > > > > > > lcores were executing the same MT-safe service at the same > t

RE: [RFC] rwlock: prevent readers from starving writers

2022-07-08 Thread Honnappa Nagarahalli
> > The original reader/writer lock in DPDK can cause a stream of readers to > starve writers. > > The new version uses an additional bit to indicate that a writer is waiting > and > which keeps readers from starving the writer. This addition makes sense. I am wondering if we should create a ne

Re: [PATCH 2/2] service: fix potential stats race-condition on MT services

2022-07-08 Thread Mattias Rönnblom
On 2022-07-08 18:21, Bruce Richardson wrote: On Fri, Jul 08, 2022 at 03:31:01PM +, Van Haaren, Harry wrote: -Original Message- From: Honnappa Nagarahalli Sent: Friday, July 8, 2022 4:16 PM To: Van Haaren, Harry ; dev@dpdk.org Cc: mattias.ronnblom ; Morten Brørup ; nd ; nd Subject:

RE: [RFC] rwlock: prevent readers from starving writers

2022-07-08 Thread Morten Brørup
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@arm.com] > Sent: Friday, 8 July 2022 21.22 > > > > > > The original reader/writer lock in DPDK can cause a stream of readers > to > > starve writers. > > > > The new version uses an additional bit to indicate that a writer is > waiting and

[Patch v4 00/17] Introduce Microsoft Azure Network Adatper (MANA) PMD

2022-07-08 Thread longli
From: Long Li MANA is a network interface card to be used in the Azure cloud environment. MANA provides safe access to user memory through memory registration. It has IOMMU built into the hardware. MANA uses IB verbs and RDMA layer to configure hardware resources. It requires the corresponding R

[Patch v4 01/17] net/mana: add basic driver, build environment and doc

2022-07-08 Thread longli
From: Long Li MANA is a PCI device. It uses IB verbs to access hardware through the kernel RDMA layer. This patch introduces build environment and basic device probe functions. Signed-off-by: Long Li --- Change log: v2: Fix typos. Make the driver build only on x86-64 and Linux. Remove unused he

[Patch v4 02/17] net/mana: add device configuration and stop

2022-07-08 Thread longli
From: Long Li MANA defines its memory allocation functions to override IB layer default functions to allocate device queues. This patch adds the code for device configuration and stop. Signed-off-by: Long Li --- Change log: v2: Removed validation for offload settings in mana_dev_configure().

[Patch v4 03/17] net/mana: add function to report support ptypes

2022-07-08 Thread longli
From: Long Li Report supported protocol types. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 16 drivers/net/mana/mana.h | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 147ab144d5..45596320

[Patch v4 04/17] net/mana: add link update

2022-07-08 Thread longli
From: Long Li The carrier state is managed by the Azure host. MANA runs as a VF and always reports "up". Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 17 + 2 files changed, 18 insertions(+) diff --git a/doc/guides/nic

[Patch v4 05/17] net/mana: add function for device removal interrupts

2022-07-08 Thread longli
From: Long Li MANA supports PCI hot plug events. Add this interrupt to DPDK core so its parent PMD can detect device removal during Azure servicing or live migration. Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 97 +++

[Patch v4 06/17] net/mana: add device info

2022-07-08 Thread longli
From: Long Li Add the function to get device info. Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 82 +++ 2 files changed, 83 insertions(+) diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/f

[Patch v4 07/17] net/mana: add function to configure RSS

2022-07-08 Thread longli
From: Long Li Currently this PMD supports RSS configuration when the device is stopped. Configuring RSS in running state will be supported in the future. Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 61 +++

[Patch v4 08/17] net/mana: add function to configure RX queues

2022-07-08 Thread longli
From: Long Li RX hardware queue is allocated when starting the queue. This function is for queue configuration pre starting. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 68 + 1 file changed, 68 insertions(+) diff --git a/drivers/net/mana/mana.c

[Patch v4 09/17] net/mana: add function to configure TX queues

2022-07-08 Thread longli
From: Long Li TX hardware queue is allocated when starting the queue, this is for pre configuration. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 65 + 1 file changed, 65 insertions(+) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana

[Patch v4 10/17] net/mana: implement memory registration

2022-07-08 Thread longli
From: Long Li MANA hardware has iommu built-in, that provides hardware safe access to user memory through memory registration. Since memory registration is an expensive operation, this patch implements a two level memory registration cache mechanisum for each queue and for each port. Signed-off-

[Patch v4 11/17] net/mana: implement the hardware layer operations

2022-07-08 Thread longli
From: Long Li The hardware layer of MANA understands the device queue and doorbell formats. Those functions are implemented for use by packet RX/TX code. Signed-off-by: Long Li --- Change log: v2: Remove unused header files. Rename a camel case. drivers/net/mana/gdma.c | 284

[Patch v4 12/17] net/mana: add function to start/stop TX queues

2022-07-08 Thread longli
From: Long Li MANA allocate device queues through the IB layer when starting TX queues. When device is stopped all the queues are unmapped and freed. Signed-off-by: Long Li --- Change log: v2: Add prefix mana_ to all function names. Remove unused header files. doc/guides/nics/features/mana.in

[Patch v4 13/17] net/mana: add function to start/stop RX queues

2022-07-08 Thread longli
From: Long Li MANA allocates device queues through the IB layer when starting RX queues. When device is stopped all the queues are unmapped and freed. Signed-off-by: Long Li --- Change log: v2: Add prefix mana_ to all function names. Remove unused header files. v4: Move defition "uint32_t i" fr

[Patch v4 14/17] net/mana: add function to receive packets

2022-07-08 Thread longli
From: Long Li With all the RX queues created, MANA can use those queues to receive packets. Signed-off-by: Long Li --- Change log: v2: Add mana_ to all function names. Rename a camel case. doc/guides/nics/features/mana.ini | 2 + drivers/net/mana/mana.c | 2 + drivers/net/mana/m

[Patch v4 15/17] net/mana: add function to send packets

2022-07-08 Thread longli
From: Long Li With all the TX queues created, MANA can send packets over those queues. Signed-off-by: Long Li --- Change log: v2: Rename all camel cases. doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 1 + drivers/net/mana/mana.h | 65 dri

[Patch v4 16/17] net/mana: add function to start/stop device

2022-07-08 Thread longli
From: Long Li Add support for starting/stopping the device. Signed-off-by: Long Li --- Change log: v2: Use spinlock for memory registration cache. Add prefix mana_ to all function names. drivers/net/mana/mana.c | 70 + 1 file changed, 70 insertions(+)

[Patch v4 17/17] net/mana: add function to report queue stats

2022-07-08 Thread longli
From: Long Li Report packet statistics. Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 2 + drivers/net/mana/mana.c | 77 +++ 2 files changed, 79 insertions(+) diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/features/man