From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 3686646033;
	Tue, 14 Jan 2025 19:15:57 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id D18A940299;
	Tue, 14 Jan 2025 19:15:56 +0100 (CET)
Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com
 [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 8191040298
 for <dev@dpdk.org>; Tue, 14 Jan 2025 19:15:55 +0100 (CET)
Received: by mail-pj1-f42.google.com with SMTP id
 98e67ed59e1d1-2eec9b3a1bbso7771736a91.3
 for <dev@dpdk.org>; Tue, 14 Jan 2025 10:15:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736878554;
 x=1737483354; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=JChCLo7Jiy5oPiaX3i5V3rFRHJf/EGwzl8Wy7euaopk=;
 b=VpoWPRJTtncgFVo6XkDzzrgx2OlAIrTDIe4F8PN1auZyHOYZVs2muum4SyQekF8iRA
 M9YNnvHD8CO/0woQC7uuQeDBgygQkJqR4kNt/u7z/g2MTPJ6Jjic8cAmru1xxmOHeaKA
 iipi4nl0KYvl4qxFaCeQDtlZj/oJ2j+yQTcT+mXTQ0yF2WtQn/JyY7397NLVEeeY0PrB
 ppHTcD47ntViPMM5BdSM5ZR2TwEqnRCjJ1v1mwvfGQ8BB1h1u+XgJCE2iv8fHcIJOYJR
 HAFvGVJ8Q00Sd6g3z6hmtsvqmhvwZ1lh8G/2rRtVJbFkc7EeFlWpR9wpFdgdXAtLRoRa
 HzqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1736878554; x=1737483354;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=JChCLo7Jiy5oPiaX3i5V3rFRHJf/EGwzl8Wy7euaopk=;
 b=ktpILPQLuSDjtRrzsxzkFDVGcSySghZRiuMeHqmOMB/H9MpVAOADhcdr3wxvohZum5
 /DO6VeFk2jBq3TW4b0RIQLTs9qvhNxRJOBptZkwgxzZwhaHaozlkuwhn/s0PaXetvPUX
 S+LAWW4KQZI+j097LrLQZa99hcm4n2nODLGRWHKUveum0p+TcznjSf2Ln9xUnDZPAH43
 5qLrxP9yMqWQEqXx+JHy9u//NdTaAoD005JRheUp/PLL7X/HWHkIodFEvBPaZjjpT0Jj
 m/ikabu7Dwop1ueHhuyd7kOuKDjxCN7XMBsYcKBCAx4V/FzqNhdtbPqJbpxWaDXzfjmD
 qybQ==
X-Gm-Message-State: AOJu0YzlnWOZD4rCBrHP54ng14Nos/xV5t/ppB6V5ZqR2X87gWyc6NS1
 hY6glE2d2KTWzTO5DPiSTq+izXQ+1XjprfUBm8u91O/nw9D5JoYLOrwxwZTB1Nw=
X-Gm-Gg: ASbGncs+ATsqwtNhkIMTRmR8L4ExorqUKTicRQ8guvwYlzbh9lDusXV7ohtBxX7rLW0
 1UCVTIEVltBNEbN3Wh9jSH7706yxk9pikN4KXAQVTlCCyzVCZPLPEqZY3m8rbky3e4QZZ0+cj6l
 v0FmBvYhwcQ8qGFOKePC4ZQ9fGZ4YgEGoiUAl78IYS0qNaXajjF0/Ev5oOxeejTF7EtD5nKVkR8
 ILxwp6K8NiLUKaeNMtC7iwGF5btZWa8xhDrvqCB2Q5jPecqOGiKAjh97RkYSxGvnXY42oO5QcfK
 8mOmXrqOFx551fNg4S/HmFNMp3bLe3I8rw==
X-Google-Smtp-Source: AGHT+IEVU8hI85Qv1/mrvsaY+FboabtwoOfa4NVZsyHjf3PLn3pI2TN7igR6poqjdQlZsArqL1JXAw==
X-Received: by 2002:a17:90a:d648:b0:2f4:9e8b:6aad with SMTP id
 98e67ed59e1d1-2f548da4606mr44304672a91.0.1736878554428; 
 Tue, 14 Jan 2025 10:15:54 -0800 (PST)
Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2f54a2872a3sm11948904a91.16.2025.01.14.10.15.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 14 Jan 2025 10:15:53 -0800 (PST)
Date: Tue, 14 Jan 2025 10:15:52 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Junlong Wang <wang.junlong1@zte.com.cn>
Cc: dev@dpdk.org
Subject: Re: [PATCH v6 00/15] net/zxdh: updated net zxdh driver
Message-ID: <20250114101552.2d022be9@hermes.local>
In-Reply-To: <20241226033719.1629989-1-wang.junlong1@zte.com.cn>
References: <20241210055333.782901-2-wang.junlong1@zte.com.cn>
 <20241226033719.1629989-1-wang.junlong1@zte.com.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, 26 Dec 2024 11:37:04 +0800
Junlong Wang <wang.junlong1@zte.com.cn> wrote:

> V6:
>   - Remove unnecessary __rte_packed in the virtqueue structure and others.
>   - Remove Some blank before or after log message,
>     and remove some end with period in log message.
>=20
> V5:
>   - Simplify the notify_data part in the zxdh_notify_queue function.
>   - Replace rte_zmalloc with rte_calloc in the rss_reta_update function.
>   - Remove unnecessary check in mtu_set function.
>=20
> V4:
>   - resolved ci compile issues.
>=20
> V3:
>   - use rte_zmalloc and rte_calloc to avoid memset.
>   - remove unnecessary initialization, which first usage will set.
>   - adjust some function which is always return 0, changed to void=20
>     and skip the ASSERTION later.
>   - resolved some WARNING:MACRO_ARG_UNUSED issues.
>   - resolved some other issues.
>=20
> V2:
>   - resolve code style and github-robot build issue.
>=20
> V1:
>   - updated net zxdh driver
>     provided insert/delete/get table code funcs.
>     provided link/mac/vlan/promiscuous/rss/mtu ops.
>=20
> Junlong Wang (15):
>   net/zxdh: zxdh np init implementation
>   net/zxdh: zxdh np uninit implementation
>   net/zxdh: port tables init implementations
>   net/zxdh: port tables unint implementations
>   net/zxdh: rx/tx queue setup and intr enable
>   net/zxdh: dev start/stop ops implementations
>   net/zxdh: provided dev simple tx implementations
>   net/zxdh: provided dev simple rx implementations
>   net/zxdh: link info update, set link up/down
>   net/zxdh: mac set/add/remove ops implementations
>   net/zxdh: promisc/allmulti ops implementations
>   net/zxdh: vlan filter/ offload ops implementations
>   net/zxdh: rss hash config/update, reta update/get
>   net/zxdh: basic stats ops implementations
>   net/zxdh: mtu update ops implementations
>=20
>  doc/guides/nics/features/zxdh.ini  |   18 +
>  doc/guides/nics/zxdh.rst           |   17 +
>  drivers/net/zxdh/meson.build       |    4 +
>  drivers/net/zxdh/zxdh_common.c     |   28 +-
>  drivers/net/zxdh/zxdh_common.h     |    1 +
>  drivers/net/zxdh/zxdh_ethdev.c     |  603 +++++++-
>  drivers/net/zxdh/zxdh_ethdev.h     |   40 +
>  drivers/net/zxdh/zxdh_ethdev_ops.c | 1573 +++++++++++++++++++++
>  drivers/net/zxdh/zxdh_ethdev_ops.h |   80 ++
>  drivers/net/zxdh/zxdh_msg.c        |  205 ++-
>  drivers/net/zxdh/zxdh_msg.h        |  232 ++++
>  drivers/net/zxdh/zxdh_np.c         | 2060 ++++++++++++++++++++++++++++
>  drivers/net/zxdh/zxdh_np.h         |  579 ++++++++
>  drivers/net/zxdh/zxdh_pci.c        |   27 +-
>  drivers/net/zxdh/zxdh_pci.h        |    9 +-
>  drivers/net/zxdh/zxdh_queue.c      |  242 +++-
>  drivers/net/zxdh/zxdh_queue.h      |  164 ++-
>  drivers/net/zxdh/zxdh_rxtx.c       |  804 +++++++++++
>  drivers/net/zxdh/zxdh_rxtx.h       |   20 +-
>  drivers/net/zxdh/zxdh_tables.c     |  794 +++++++++++
>  drivers/net/zxdh/zxdh_tables.h     |  231 ++++
>  21 files changed, 7649 insertions(+), 82 deletions(-)
>  create mode 100644 drivers/net/zxdh/zxdh_ethdev_ops.c
>  create mode 100644 drivers/net/zxdh/zxdh_ethdev_ops.h
>  create mode 100644 drivers/net/zxdh/zxdh_np.c
>  create mode 100644 drivers/net/zxdh/zxdh_np.h
>  create mode 100644 drivers/net/zxdh/zxdh_rxtx.c
>  create mode 100644 drivers/net/zxdh/zxdh_tables.c
>  create mode 100644 drivers/net/zxdh/zxdh_tables.h
>=20

Building with address-of-packed structure warning produces this warning.
Is it fixable?


[1589/3228] Compiling C object drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxd=
h_ethdev_ops.c.o
../drivers/net/zxdh/zxdh_ethdev_ops.c: In function =E2=80=98zxdh_dev_rss_re=
ta_update=E2=80=99:
../drivers/net/zxdh/zxdh_ethdev_ops.c:921:59: warning: taking address of pa=
cked member of =E2=80=98union <anonymous>=E2=80=99 may result in an unalign=
ed pointer value [-Waddress-of-packed-member]
  921 |                 ret =3D zxdh_rss_table_set(hw->vport.vport, &msg.da=
ta.rss_reta);
      |                                                           ^~~~~~~~~=
~~~~~~~~~
../drivers/net/zxdh/zxdh_ethdev_ops.c: In function =E2=80=98zxdh_dev_rss_re=
ta_query=E2=80=99:
../drivers/net/zxdh/zxdh_ethdev_ops.c:979:59: warning: taking address of pa=
cked member of =E2=80=98union <anonymous>=E2=80=99 may result in an unalign=
ed pointer value [-Waddress-of-packed-member]
  979 |                 ret =3D zxdh_rss_table_get(hw->vport.vport, &reply_=
msg.reply_body.rss_reta);
      |                                                           ^~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~
../drivers/net/zxdh/zxdh_ethdev_ops.c:993:44: warning: taking address of pa=
cked member of =E2=80=98union <anonymous>=E2=80=99 may result in an unalign=
ed pointer value [-Waddress-of-packed-member]
  993 |         struct zxdh_rss_reta *reta_table =3D &reply_msg.reply_body.=
rss_reta;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~
../drivers/net/zxdh/zxdh_ethdev_ops.c: In function =E2=80=98zxdh_rss_config=
ure=E2=80=99:
../drivers/net/zxdh/zxdh_ethdev_ops.c:1247:59: warning: taking address of p=
acked member of =E2=80=98union <anonymous>=E2=80=99 may result in an unalig=
ned pointer value [-Waddress-of-packed-member]
 1247 |                 ret =3D zxdh_rss_table_set(hw->vport.vport, &msg.da=
ta.rss_reta);
      |                                                           ^~~~~~~~~=
~~~~~~~~~