Re: [PATCH v11 0/3] add diagnostics macros to make code portable

2025-01-03 Thread Andre Muezerie
On Fri, Jan 03, 2025 at 11:24:02AM -0800, Stephen Hemminger wrote: > On Fri, 3 Jan 2025 07:36:48 -0800 > Andre Muezerie wrote: > > > From: Andre Muezerie > > To: andre...@linux.microsoft.com > > Cc: dev@dpdk.org, step...@networkplumber.org > > Subject: [PATCH v11 0/3] add diagnostics macros to

[PATCH v2 5/5] app/test: add tests for portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. There's a need for a portable version that can also be used with other compilers. This patch adds tests for these new portable functions, to confirm they behave the same way across different compilers. Signed-off-by: Andre Muezerie --- app/test/meson.buil

[PATCH v2 1/5] maintainers: add portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. There's a need for a portable version that can also be used with other compilers. Signed-off-by: Andre Muezerie --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0f940ad713..fb64ba893b 100644 --- a/MAINTAIN

[PATCH v2 4/5] drivers/net: use portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. It should be replaced with a portable version that can also be used with other compilers. Signed-off-by: Andre Muezerie --- drivers/net/ice/base/ice_nvm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/base/ice

[PATCH v2 3/5] doc/api: add portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. There's a need for a portable version that can also be used with other compilers. Signed-off-by: Andre Muezerie --- doc/api/doxy-api-index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index f0

[PATCH v2 2/5] lib/eal: add portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. There's a need for a portable version that can also be used with other compilers. This patch introduces rte_add_overflow. Signed-off-by: Andre Muezerie --- lib/eal/include/meson.build | 1 + lib/eal/include/rte_math.h | 46 ++

[PATCH v2 0/5] add portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
__builtin_add_overflow is gcc specific. There's a need for a portable version that can also be used with other compilers. Andre Muezerie (5): maintainers: add portable version of __builtin_add_overflow lib/eal: add portable version of __builtin_add_overflow doc/api: add portable version of _

Re: [PATCH 2/5] lib/eal: add portable version of __builtin_add_overflow

2025-01-03 Thread Andre Muezerie
On Fri, Jan 03, 2025 at 09:19:42AM +0100, Morten Brørup wrote: > > From: Andre Muezerie [mailto:andre...@linux.microsoft.com] > > Sent: Thursday, 2 January 2025 23.33 > > > > __builtin_add_overflow is gcc specific. There's a need for a portable > > version that can also be used with other compiler

Re: [PATCH v11 0/3] add diagnostics macros to make code portable

2025-01-03 Thread Stephen Hemminger
On Fri, 3 Jan 2025 07:36:48 -0800 Andre Muezerie wrote: > From: Andre Muezerie > To: andre...@linux.microsoft.com > Cc: dev@dpdk.org, step...@networkplumber.org > Subject: [PATCH v11 0/3] add diagnostics macros to make code portable > Date: Fri, 3 Jan 2025 07:36:48 -0800 > X-Mailer: git-send-

Re: [PATCH v4 14/15] net/xsc: add ethdev infos get

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:35 +0800 "WanRenyong" wrote: > + > +static int > +xsc_ethdev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) > +{ > + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); > + > + info->min_rx_bufsize = 64; > + info->max_rx_pktlen = 65536;

Re: [PATCH v4 09/15] net/xsc: add ethdev start

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:23 +0800 "WanRenyong" wrote: > +static int > +xsc_ethdev_start(struct rte_eth_dev *dev) > +{ > + int ret; > + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); > + > + ret = xsc_txq_start(priv); > + if (ret) { > + PMD_DRV_LOG(ERR, "Port

Re: [PATCH v4 07/15] net/xsc: add ethdev configure and RSS ops

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:19 +0800 "WanRenyong" wrote: > +static int > +xsc_ethdev_rss_hash_conf_get(struct rte_eth_dev *dev, > + struct rte_eth_rss_conf *rss_conf) > +{ > + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); > + > + if (!rss_conf) { > +

Re: [PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:13 +0800 "WanRenyong" wrote: > +static int > +xsc_vfio_get_mac(struct xsc_dev *xdev, uint8_t *mac) > +{ > + struct xsc_cmd_query_eth_mac_mbox_in in; > + struct xsc_cmd_query_eth_mac_mbox_out out; > + int ret; > + > + memset(&in, 0, sizeof(in)); > + me

Re: [PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:13 +0800 "WanRenyong" wrote: > +static int > +xsc_vfio_set_mtu(struct xsc_dev *xdev, uint16_t mtu) > +{ > + struct xsc_cmd_set_mtu_mbox_in in; > + struct xsc_cmd_set_mtu_mbox_out out; > + int ret; > + > + memset(&in, 0, sizeof(in)); > + memset(&out, 0

Re: [PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:13 +0800 "WanRenyong" wrote: > +static int > +xsc_vfio_destroy_qp(void *qp) > +{ > + int ret; > + int in_len, out_len, cmd_len; > + struct xsc_cmd_destroy_qp_mbox_in *in; > + struct xsc_cmd_destroy_qp_mbox_out *out; > + struct xsc_vfio_qp *data = (str

Re: [PATCH v4 01/15] net/xsc: add xsc PMD framework

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:06 +0800 "WanRenyong" wrote: > +XSC Poll Mode Driver > +== > + > +The xsc PMD (**librte_net_xsc**) provides poll mode driver support for > +10/25/50/100/200 Gbps Yunsilicon metaScale Series Network Adapters. > + > +Supported NICs > +-- > +

Re: [PATCH v4 02/15] net/xsc: add xsc device initialization

2025-01-03 Thread Stephen Hemminger
On Fri, 03 Jan 2025 23:04:08 +0800 "WanRenyong" wrote: > +struct xsc_hwinfo { > + uint8_t valid; /* 1: current phy info is valid, 0 : invalid */ > + uint32_t pcie_no; /* pcie number , 0 or 1 */ > + uint32_t func_id; /* pf glb func id */ > + uint32_t pcie_host; /* host pcie number

[PATCH v11 0/3] add diagnostics macros to make code portable

2025-01-03 Thread Andre Muezerie
It was a common pattern to have "GCC diagnostic ignored" pragmas sprinkled over the code and only activate these pragmas for certain compilers (gcc and clang). Clang supports GCC's pragma for compatibility with existing source code, so #pragma GCC diagnostic and #pragma clang diagnostic are synonym

[PATCH v11 3/3] drivers/net: add diagnostics macros to make code portable

2025-01-03 Thread Andre Muezerie
It was a common pattern to have "GCC diagnostic ignored" pragmas sprinkled over the code and only activate these pragmas for certain compilers (gcc and clang). Clang supports GCC's pragma for compatibility with existing source code, so #pragma GCC diagnostic and #pragma clang diagnostic are synonym

[PATCH v11 1/3] lib/eal: add diagnostics macros to make code portable

2025-01-03 Thread Andre Muezerie
It was a common pattern to have "GCC diagnostic ignored" pragmas sprinkled over the code and only activate these pragmas for certain compilers (gcc and clang). Clang supports GCC's pragma for compatibility with existing source code, so #pragma GCC diagnostic and #pragma clang diagnostic are synonym

[PATCH v11 2/3] drivers/common: add diagnostics macros to make code portable

2025-01-03 Thread Andre Muezerie
It was a common pattern to have "GCC diagnostic ignored" pragmas sprinkled over the code and only activate these pragmas for certain compilers (gcc and clang). Clang supports GCC's pragma for compatibility with existing source code, so #pragma GCC diagnostic and #pragma clang diagnostic are synonym

[PATCH v4 15/15] net/xsc: add ethdev link and MTU ops

2025-01-03 Thread WanRenyong
Implement xsc ethdev link and MTU ops. Signed-off-by: WanRenyong --- doc/guides/nics/features/xsc.ini | 1 + drivers/net/xsc/xsc_dev.c| 33 ++ drivers/net/xsc/xsc_dev.h| 4 +++ drivers/net/xsc/xsc_ethdev.c | 60 4 files chang

[PATCH v4 00/15] XSC PMD for Yunsilicon NICs

2025-01-03 Thread WanRenyong
This xsc PMD (**librte_net_xsc**) provides poll mode driver for Yunsilicon metaScale serials NICs. Features: - - MTU update - TSO - RSS hash - RSS key update - RSS reta update - L3 checksum offload - L4 checksum offload - Inner L3 checksum - Inner L4 checksum - Basic stats Support NICs:

[PATCH v4 14/15] net/xsc: add ethdev infos get

2025-01-03 Thread WanRenyong
Implement xsc ethdev information get ops. Signed-off-by: WanRenyong --- drivers/net/xsc/xsc_ethdev.c | 61 1 file changed, 61 insertions(+) diff --git a/drivers/net/xsc/xsc_ethdev.c b/drivers/net/xsc/xsc_ethdev.c index e44792e374..f4c127d7d4 100644 --- a/dri

[PATCH v4 12/15] net/xsc: add ethdev Tx burst

2025-01-03 Thread WanRenyong
Implement xsc ethdev Tx burst function. Signed-off-by: WanRenyong Signed-off-by: Dongwei Xu --- doc/guides/nics/features/xsc.ini | 4 + drivers/net/xsc/xsc_ethdev.c | 1 + drivers/net/xsc/xsc_tx.c | 228 +++ drivers/net/xsc/xsc_tx.h | 1 + 4

[PATCH v4 11/15] net/xsc: add ethdev Rx burst

2025-01-03 Thread WanRenyong
Implement xsc ethdev Rx burst function. Signed-off-by: WanRenyong Signed-off-by: Xiaoxiong Zhang --- drivers/net/xsc/xsc_ethdev.c | 2 + drivers/net/xsc/xsc_rx.c | 174 +++ drivers/net/xsc/xsc_rx.h | 1 + drivers/net/xsc/xsc_rxtx.h | 13 +++ 4 file

[PATCH v4 13/15] net/xsc: add basic stats ops

2025-01-03 Thread WanRenyong
Implement xsc ethdev basic statatics ops. Signed-off-by: WanRenyong --- doc/guides/nics/features/xsc.ini | 1 + drivers/net/xsc/xsc_ethdev.c | 75 2 files changed, 76 insertions(+) diff --git a/doc/guides/nics/features/xsc.ini b/doc/guides/nics/features/xsc

[PATCH v4 10/15] net/xsc: add ethdev stop and close

2025-01-03 Thread WanRenyong
Implement xsc ethdev close and stop functions. Signed-off-by: WanRenyong --- drivers/net/xsc/xsc_dev.c| 12 drivers/net/xsc/xsc_dev.h| 2 + drivers/net/xsc/xsc_ethdev.c | 108 +++ drivers/net/xsc/xsc_rx.c | 47 +++ drivers/net/xsc/

[PATCH v4 09/15] net/xsc: add ethdev start

2025-01-03 Thread WanRenyong
Implement xsc ethdev start function. Signed-off-by: WanRenyong Signed-off-by: Rong Qian --- drivers/net/xsc/meson.build | 2 + drivers/net/xsc/xsc_dev.c| 33 drivers/net/xsc/xsc_dev.h| 8 + drivers/net/xsc/xsc_ethdev.c | 174 + drivers/net/xsc/xsc_ethdev.h

[PATCH v4 05/15] net/xsc: add PCT interfaces

2025-01-03 Thread WanRenyong
PCT is the abbreviation of Packet classifier table, which is built in NP to define behavior of various packets. Signed-off-by: WanRenyong --- drivers/net/xsc/meson.build | 1 + drivers/net/xsc/xsc_defs.h | 29 +++ drivers/net/xsc/xsc_dev.c | 19 +- drivers/net/xsc/xsc_dev.h | 3 + dri

[PATCH v4 08/15] net/xsc: add Rx and Tx queue setup

2025-01-03 Thread WanRenyong
Implement xsc ethdev Rx and Tx queue setup functions. Signed-off-by: WanRenyong Signed-off-by: Rong Qian --- drivers/net/xsc/xsc_defs.h | 4 ++ drivers/net/xsc/xsc_ethdev.c | 83 drivers/net/xsc/xsc_rx.h | 59 + drivers/net/xsc

[PATCH v4 07/15] net/xsc: add ethdev configure and RSS ops

2025-01-03 Thread WanRenyong
Implement xsc ethdev configure and RSS hash functions. Signed-off-by: WanRenyong --- doc/guides/nics/features/xsc.ini | 3 + drivers/net/xsc/xsc_defs.h | 15 + drivers/net/xsc/xsc_dev.c| 26 drivers/net/xsc/xsc_dev.h| 1 + drivers/net/xsc/xsc_ethdev.c

[PATCH v4 06/15] net/xsc: initialize xsc representors

2025-01-03 Thread WanRenyong
For the design of the xsc PMD, each ethdev corresponds to a representor. Signed-off-by: WanRenyong --- drivers/net/xsc/xsc_defs.h | 11 +++ drivers/net/xsc/xsc_dev.c| 95 drivers/net/xsc/xsc_dev.h| 3 + drivers/net/xsc/xsc_ethdev.c | 170 +++

[PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver

2025-01-03 Thread WanRenyong
XSC PMD is designed to support both VFIO and private kernel drivers. This commit add xsc dev ops to support VFIO driver. Signed-off-by: WanRenyong Signed-off-by: Na Na --- drivers/net/xsc/meson.build | 1 + drivers/net/xsc/xsc_defs.h | 8 + drivers/net/xsc/xsc_dev.h | 32 ++ drivers/net

[PATCH v4 03/15] net/xsc: add xsc mailbox

2025-01-03 Thread WanRenyong
XSC mailbox is a mechanism used for interaction between PMD and firmware. Signed-off-by: WanRenyong Signed-off-by: Rong Qian --- drivers/net/xsc/meson.build | 1 + drivers/net/xsc/xsc_cmd.h | 387 ++ drivers/net/xsc/xsc_defs.h | 2 + drivers/net/xsc/xsc_vfio_m

[PATCH v4 01/15] net/xsc: add xsc PMD framework

2025-01-03 Thread WanRenyong
Add xsc PMD framework, doc and build infrastructure, supporting PCI probe. Signed-off-by: WanRenyong --- .mailmap | 5 ++ MAINTAINERS| 10 +++ doc/guides/nics/features/xsc.ini | 9 +++ doc/guides/nics/index.rst | 1 +

[PATCH v4 02/15] net/xsc: add xsc device initialization

2025-01-03 Thread WanRenyong
XSC device is a hardware abstract level device serving as a handle to interact with hardware. Signed-off-by: WanRenyong --- drivers/net/xsc/meson.build | 1 + drivers/net/xsc/xsc_defs.h | 16 drivers/net/xsc/xsc_dev.c| 181 +++ drivers/net/xsc/xsc_d

[RFC] net/virtio-user: implement MAC setting for Vhost-kernel

2025-01-03 Thread Maxime Coquelin
This patch implements MAC address setting with Vhost-kernel backends. With this, it is possible to set the TAP interface MAC address using the Ethdev API. Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/vhost_kernel.c | 23 +++ .../net/virtio/virtio_user/vhost_

[PATCH v3 3/3] dts: resolve mypy type errors

2025-01-03 Thread Paul Szczepanek
From: Luca Vizzarro The addition of scapy types yielded new errors in mypy, which could not previously be checked. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek --- .../interactive_remote_session.py | 4 ++-- .../single_active_interactive_shell.py| 2 +- dts/

[PATCH v3 2/3] dts: add missing type stubs

2025-01-03 Thread Paul Szczepanek
From: Luca Vizzarro The invoke and paramiko libraries were missing the type stubs. These are added under the dev dependencies as the only scope in which they are used is through mypy static checking. For the same reason, move the PyYAML subs under the dev dependencies. Signed-off-by: Luca Vizza

[PATCH] net/sxe: add base driver directory and doc

2025-01-03 Thread Jie Liu
Adding a minimum maintainable directory structure for the network driver and request maintenance of the sxe driver. Signed-off-by: Jie Liu --- MAINTAINERS | 6 + doc/guides/nics/features/sxe.ini| 10 +++ doc/guides/nics/features/sxe_vf.ini | 10 +++ doc/g

[PATCH] net/sxe: add base driver directory and doc

2025-01-03 Thread Jie Liu
Adding a minimum maintainable directory structure for the network driver and request maintenance of the sxe driver. Signed-off-by: Jie Liu +F: drivers/net/sxe/ +F: doc/guides/nics/sxe.rst +F: doc/guides/nics/features/sxe*.ini diff --git a/doc/guides/nics/features/sxe.ini b/doc/guides/nics/feature

RE: [PATCH 2/5] lib/eal: add portable version of __builtin_add_overflow

2025-01-03 Thread Morten Brørup
> From: Andre Muezerie [mailto:andre...@linux.microsoft.com] > Sent: Thursday, 2 January 2025 23.33 > > __builtin_add_overflow is gcc specific. There's a need for a portable > version that can also be used with other compilers. > > This patch introduces __rte_add_overflow_u8, __rte_add_overflow_u