[v9,2/9] net/zxdh: add logging implementation

2024-11-03 Thread Junlong Wang
> Are you sure you want "offload_zxdh" prefix for each log, instead of > shorter 'zxdh' one? >> +__func__, __VA_ARGS__) >> + >> +extern int zxdh_logtype_driver; >> +#define RTE_LOGTYPE_ZXDH_DRIVER zxdh_logtype_driver >> +#define PMD_DRV_LOG(level, ...) \ >> +RTE_LOG_LINE_PREFIX(level,

RE: [RFC v3 1/3] eal/lcore: add topology based functions

2024-11-03 Thread Varghese, Vipin
Snipped > > > +struct topology_config { > > +#ifdef RTE_EAL_HWLOC_TOPOLOGY_PROBE > > + hwloc_topology_t topology; > > +#endif > > + > > + /* domain count */ > > + uint16_t l1_count; > > + uint16_t l2_count; > > + uint8_t l3_count; > > + uint8_t io_count; > > + > > + /*

RE: [RFC v3 1/3] eal/lcore: add topology based functions

2024-11-03 Thread Morten Brørup
> From: Vipin Varghese [mailto:vipin.vargh...@amd.com] > Sent: Wednesday, 30 October 2024 06.42 > > Introduce topology aware lcore mapping into lcore API. > With higher core density, more and more cores are categorized > into various chiplets based on IO (memory and PCIe) and > Last Level Cache (m

[PATCH v3] eal/unix: optimize thread creation with glibc

2024-11-03 Thread David Marchand
Setting the cpu affinity of the child thread from the parent thread is racy when using pthread_setaffinity_np, as the child thread may start running and initialize before affinity is set. On the other hand, setting the cpu affinity from the child thread itself may fail, so the parent thread waits

[PATCH v4 3/4] net/nfp: add support for EEPROM functions

2024-11-03 Thread Chaoyong He
Add support for the following EEPROM function callbacks: .get_eeprom_len Get the maximum size of the device EEPROM data. .get_eeprom Get the device EEPROM data at a certain offset and length. .set_eeprom Set the device EEPROM data at a certain offset and length. Note that for an nfp NIC, the "d

[PATCH v4 0/4] NFP PMD enhancement

2024-11-03 Thread Chaoyong He
This patch series fix one problem imported by mistake and add support of two new APIs. --- v4: * Also update the 'nfp.ini' file. v3: * Adapt to the multiple PF firmware. v2: * Add one missing commit. --- Chaoyong He (4): net/nfp: fix port index problem net/nfp: extract function to check physi

[PATCH v4 4/4] net/nfp: add LED support

2024-11-03 Thread Chaoyong He
Implement the necessary functions to allow user to visually identify a physical port associated with a netdev by blinking an LED on that port. Signed-off-by: James Hershaw Signed-off-by: Chaoyong He --- doc/guides/nics/features/nfp.ini | 1 + .../net/nfp/flower/nfp_flower_represen

[PATCH v4 1/4] net/nfp: fix port index problem

2024-11-03 Thread Chaoyong He
Fix one port index problem imported by mistake. Fixes: 97b6825d9a7b ("net/nfp: extract function to allocate PHY") Fixes: fd1ec7bc8f0a ("net/nfp: extract function to initialize PF") Fixes: bb9f9fdcbe00 ("net/nfp: extract function to allocate PF") Fixes: c8e29c168c20 ("net/nfp: extract function to a

[PATCH v4 2/4] net/nfp: extract function to check physical reprsentor

2024-11-03 Thread Chaoyong He
Extract a helper function to check the physical representor port. Signed-off-by: Chaoyong He --- .../net/nfp/flower/nfp_flower_representor.c| 18 -- .../net/nfp/flower/nfp_flower_representor.h| 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/

RE: [RFC v3 1/3] eal/lcore: add topology based functions

2024-11-03 Thread Varghese, Vipin
Snipped > > On Wed, 30 Oct 2024 11:11:31 +0530 > Vipin Varghese wrote: > > > topo_cnfg.l3[j] = (struct core_domain_mapping *) > > + malloc(sizeof(struct > > core_domain_mapping)); > > Minor nit, no need to cast return value from malloc

RE: [EXTERNAL] [RFC v3 2/3] test/lcore: enable tests for topology

2024-11-03 Thread Varghese, Vipin
Snipped > > --- > > > Test fails on ARM platform: > > > lcore 19, socket 0, role RTE, cpuset 19 > Control thread running successfully > INFO: lcore count topology: none (12), io (1), l3 (1), l2 (1), l1 (1). > INFO: worker lcore count topology: none (11), io (1), l3 (1), l2 (1), l1 (1). > INFO:

RE: [RFC v3 1/3] eal/lcore: add topology based functions

2024-11-03 Thread Varghese, Vipin
Snipped > > On Wed, 30 Oct 2024 11:11:31 +0530 > Vipin Varghese wrote: > > > + if (topo_cnfg.io) { > > + free(topo_cnfg.io); > > + topo_cnfg.io = NULL; > > + } > > No need to check for NULL before calling free. Thank you Stepehen on this, the reason why we speci

RE: [RFC v3 1/3] eal/lcore: add topology based functions

2024-11-03 Thread Varghese, Vipin
Snipped > > > + /* domain count */ > > + uint16_t l1_count; > > + uint16_t l2_count; > > + uint8_t l3_count; > > + uint8_t io_count; > > Make them all uint16_t, the space is there already. Thank you, fixing this in v4

Re:[PATCH] raw/gdtc: introduce gdtc raw device driver

2024-11-03 Thread Yong Zhang
Hi thomas, I submitted a patch on October 29 and haven't received response. Wondering if any modifications are needed? Could you provide an update on the review? Thanks. Looking forward to hearing from you. Best regards,

[PATCH v9 0/9] net/zxdh: introduce net zxdh driver

2024-11-03 Thread Junlong Wang
>> net/zxdh: add zxdh get device backend infos >> net/zxdh: add configure zxdh intr implementation >> net/zxdh: add zxdh dev infos get ops >> net/zxdh: add zxdh dev configure ops >> > Hi Junlong, > I can see not all of the eth_dev_ops implemented, and datapath not > implemented, so drive

[PATCH v3 00/13] Wangxun fixes

2024-11-03 Thread Jiawen Wu
Fix some bugs in txgbe/ngbe, and optimize the Tx flow. v2 -> v3: - Reset Tx desc error statistics in .stats_reset(). - Add comment for Tx desc error count. v1 -> v2: - Fix build errors on ARM platform. Jiawen Wu (13): net/txgbe: fix swfw mbox failure net/txgbe: fix VF-PF mbox interrupt net

[PATCH v3 02/13] net/txgbe: fix VF-PF mbox interrupt

2024-11-03 Thread Jiawen Wu
There was a incorrect bit to define TXGBE_ICRMISC_VFMBX that prevents the interrupt from being handled correctly. Fixes: a6712cd029a4 ("net/txgbe: add PF module init and uninit for SRIOV") Cc: sta...@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/base/txgbe_regs.h | 2 +- 1 file change

答复: [PATCH v5 00/18] modify code as suggested by the maintainer

2024-11-03 Thread 王颢
Dear Ferruh, Thank you for your comments. I will make the changes you suggested. Our DPDK PMD is developed based on our company’s Linux kernel drivers r8125 and r8126, which are more comprehensive and detailed. To facilitate synchronized maintenance, I have retained the CamelCase. Best Regards

[PATCH v3 04/13] net/txgbe: fix driver load bit to inform firmware

2024-11-03 Thread Jiawen Wu
Drv_load bit will be reset to default 0 after hardware LAN reset, reconfigure it to inform firmware that driver is loaded. And set it to 0 when device is closed. Fixes: b1f596677d8e ("net/txgbe: support device start") Cc: sta...@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethd

[PATCH v3 03/13] net/txgbe: remove outer UDP checksum capability

2024-11-03 Thread Jiawen Wu
The hardware does not support outer UDP checksum for tunnel packets. It's wrong to claim this Tx offload capability, so fix it. Bugzilla ID: 1529 Fixes: b950203be7f1 ("net/txgbe: support VXLAN-GPE") Fixes: 295968d17407 ("ethdev: add namespace") Cc: sta...@dpdk.org Signed-off-by: Jiawen Wu --- d

RE: [EXTERNAL] [RFC v3 3/3] examples: add lcore topology API calls

2024-11-03 Thread Varghese, Vipin
Snipped > > > > > > > > I see compilation failure on ARM platforms due to missing header > > > > include. > > > > > > > > ../examples/helloworld/main.c: In function 'parse_topology': > > > > ../examples/helloworld/main.c:83:13: error: implicit declaration > > > > of function 'strtoul'; did you me

[PATCH v3 05/13] net/txgbe: enable Tx descriptor error interrupt

2024-11-03 Thread Jiawen Wu
Enable Tdm_desc_chk then handle the interrupt of TDM desc error. If it's a non-fatal error, clear the error to reset the queue. If it's a fatal error, require users to manually restart the port. This flow prevents the hardware from PCIe pending due to Tx hang, resulting in a reboot to recover. But

[PATCH v3 06/13] net/txgbe: check length of Tx packets

2024-11-03 Thread Jiawen Wu
Add checking of the Tx packet length to avoid TDM fatal error as far as possible. Set the pkt_len=1518 for invalid packet in simple Tx code path, and drop it directly in featured Tx code path. Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_rxtx.c | 33 + dr

[PATCH v3 13/13] net/ngbe: restrict configuration of VLAN strip offload

2024-11-03 Thread Jiawen Wu
There is a hardware limitation that Rx ring config register is not writable when Rx ring is enabled, i.e. the NGBE_RXCFG_ENA bit is set. But disabling the ring when there is traffic will cause ring get stuck. So restrict the configuration of VLAN strip offload only if device is started. Fixes: 59b

[PATCH v3 12/13] net/ngbe: fix interrupt lost in legacy or MSI mode

2024-11-03 Thread Jiawen Wu
When interrupt is legacy or MSI mode, shared interrupt may cause the interrupt cannot be re-enabled. So fix to read the shared interrupt. Fixes: b9246b8fa280 ("net/ngbe: support link update") Cc: sta...@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/ngbe/ngbe_ethdev.c | 13 + 1 f

[PATCH v3 07/13] net/txgbe: add Tx descriptor error statistics

2024-11-03 Thread Jiawen Wu
Count the number of packets not sent due to Tx descriptor error. Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 13 + drivers/net/txgbe/txgbe_rxtx.c | 6 ++ drivers/net/txgbe/txgbe_rxtx.h | 1 + 3 files changed, 20 insertions(+) diff --git a/drivers/net/tx

[PATCH v3 09/13] net/ngbe: add Tx descriptor error statistics

2024-11-03 Thread Jiawen Wu
Count the number of packets not sent due to Tx descriptor error. Signed-off-by: Jiawen Wu --- drivers/net/ngbe/ngbe_ethdev.c | 13 + drivers/net/ngbe/ngbe_rxtx.c | 2 ++ drivers/net/ngbe/ngbe_rxtx.h | 1 + 3 files changed, 16 insertions(+) diff --git a/drivers/net/ngbe/ngbe_et

[PATCH v3 08/13] net/ngbe: check length of Tx packets

2024-11-03 Thread Jiawen Wu
Add checking of the Tx packet length to avoid TDM fatal error as far as possible. Set the pkt_len=1518 for invalid packet in simple Tx code path, and drop it directly in featured Tx code path. Althrough the hardware does not support TDM desc check. Signed-off-by: Jiawen Wu --- drivers/net/ngbe/n

[PATCH v3 11/13] net/ngbe: reconfigure more MAC Rx registers

2024-11-03 Thread Jiawen Wu
When link status changes, there is a probability that no more packets can be received on the port, due to hardware defects. These MAC Rx registers should be reconfigured to fix this problem. Fixes: b9246b8fa280 ("net/ngbe: support link update") Fixes: a7c5f95ed9c2 ("net/ngbe: reconfigure MAC Rx wh

[PATCH v3 10/13] net/ngbe: fix driver load bit to inform firmware

2024-11-03 Thread Jiawen Wu
Drv_load bit will be reset to default 0 after hardware LAN reset, reconfigure it to inform firmware that driver is loaded. And set it to 0 when device is closed. Fixes: 3518df5774c7 ("net/ngbe: support device start/stop") Fixes: cc63194e89cb ("net/ngbe: support close and reset device") Cc: sta...@

[PATCH v3 01/13] net/txgbe: fix swfw mbox failure

2024-11-03 Thread Jiawen Wu
There is a unknown bug that the register TXGBE_MNGMBX cannot be written in the loop, when DPDK is built with GCC high version. Access any register before write TXGBE_MNGMBX can fix it. Bugzilla ID: 1531 Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions") Cc: sta...@dpdk.org Signed-off-by: Jia

Re: [v9,6/9] net/zxdh: add zxdh get device backend infos

2024-11-03 Thread Junlong Wang
>> +uint16_t zxdh_vport_to_vfid(union zxdh_virport_num v) >> +{ >> +/* epid > 4 is local soft queue. return 1192 */ >> +if (v.epid > 4) >> +return 1192; >> +if (v.vf_flag) >> +return v.epid * 256 + v.vfid; >> +else >> +return (v.epid * 8 + v.pfid) + 1152; >>

Re:[v9,4/9] net/zxdh: add msg chan and msg hwlock init

2024-11-03 Thread Junlong Wang
>> err_zxdh_init: >> +zxdh_bar_msg_chan_exit(); >> > Should 'zxdh_bar_msg_chan_exit()' called during zxdh_eth_dev_uninit()? Yes, it is. I forget it. I will put it in the zxdh_eth_dev_uninit(). Thanks.

Re: [PATCH] eal/unix: optimize thread creation with glibc

2024-11-03 Thread David Marchand
On Sat, Nov 2, 2024 at 8:58 PM Stephen Hemminger wrote: > > On Sat, 2 Nov 2024 11:08:39 +0100 > David Marchand wrote: > > > Setting the cpu affinity of the child thread from the parent thread is > > racy when using pthread_setaffinity_np, as the child thread may start > > running and initialize

Re: [PATCH v3] eal/unix: optimize thread creation with glibc

2024-11-03 Thread fengchengwen
Acked-by: Chengwen Feng On 2024/11/3 19:25, David Marchand wrote: > Setting the cpu affinity of the child thread from the parent thread is > racy when using pthread_setaffinity_np, as the child thread may start > running and initialize before affinity is set. > > On the other hand, setting the c

RE: [PATCH v02] net/af_packet: add rollover and defrag options

2024-11-03 Thread Gur Stavi
> > net_af_packet PMD multi "queue" support relies on Linux FANOUT > capability. > > Linux FANOUT is a SW based load balancer that is similar to HW RSS > which > > is more common for DPDK PMDs. Instead of multiple HW descriptor queues, > > AF PACKET uses multiple sockets. > > HW RSS will typically