From: "WanRenyong" <wanry@yunsilicon.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>,
<qianr@yunsilicon.com>, <nana@yunsilicon.com>,
<zhangxx@yunsilicon.com>, <xudw@yunsilicon.com>,
<jacky@yunsilicon.com>, <weihg@yunsilicon.com>
Subject: Re: [PATCH v6 08/15] net/xsc: add Rx and Tx queue setup
Date: Tue, 21 Jan 2025 11:21:52 +0800 [thread overview]
Message-ID: <41248987-fe60-45ea-b0d2-07831d4c7ca6@yunsilicon.com> (raw)
In-Reply-To: <20250120101637.442a7002@hermes.local>
On 2025/1/21 2:16, Stephen Hemminger wrote:
> On Mon, 20 Jan 2025 19:14:48 +0800
> "WanRenyong" <wanry@yunsilicon.com> wrote:
>
>> +struct __rte_packed_begin xsc_send_wqe_ctrl_seg {
>> + rte_le32_t msg_opcode:8;
>> + rte_le32_t with_immdt:1;
>> + rte_le32_t csum_en:2;
>> + rte_le32_t ds_data_num:5;
>> + rte_le32_t wqe_id:16;
>> + rte_le32_t msg_len;
>> + union __rte_packed_begin {
>> + rte_le32_t opcode_data;
>> + struct __rte_packed_begin {
>> + rte_le16_t has_pph:1;
>> + rte_le16_t so_type:1;
>> + rte_le16_t so_data_size:14;
>> + rte_le16_t rsv1:8;
>> + rte_le16_t so_hdr_len:8;
>> + } __rte_packed_end;
>> + struct __rte_packed_begin {
>> + rte_le16_t desc_id;
>> + rte_le16_t is_last_wqe:1;
>> + rte_le16_t dst_qp_id:15;
>> + } __rte_packed_end;
>> + } __rte_packed_end;
>> + rte_le32_t se:1;
> If the whole structure is marked with packed attribute,
> don't think you also need to mark the sub structures and unions
> as packed.
>
> This is what is confusing the checkpatch check for __rte_packed_begin / __rte_packed_end
Hello, Stephen Hemminger,
Thanks for your review.
Initially, we did not mark sub structures and unions with the packed
attribute. However, when we encountered checkpatch errors due to
unmatched|__rte_packed_begin|/|__rte_packed_end|pairs,
we referred to other PMD codes in DPDK and marked the sub structures and
unions with the packed attribute as well. Unfortunately, this did not
resolve the checkpatch errors.
I think that might be a bug in the|checkpatch|tool, so I have submitted
a patch to address this
issue:https://inbox.dpdk.org/dev/20250120112654.1049456-1-wanry@yunsilicon.com/.
Regardless, I will remove the packed attribute from sub structures and
unions in the next verion.
--
Best regards,
WanRenyong
next prev parent reply other threads:[~2025-01-21 3:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 11:15 [PATCH v6 00/15] XSC PMD for Yunsilicon NICs WanRenyong
2025-01-20 11:14 ` [PATCH v6 01/15] net/xsc: add xsc PMD framework WanRenyong
2025-01-20 11:14 ` [PATCH v6 02/15] net/xsc: add xsc device initialization WanRenyong
2025-01-20 11:14 ` [PATCH v6 03/15] net/xsc: add xsc mailbox WanRenyong
2025-01-20 18:18 ` Stephen Hemminger
2025-01-21 2:39 ` WanRenyong
2025-01-20 18:19 ` Stephen Hemminger
2025-01-21 3:31 ` WanRenyong
2025-01-20 11:14 ` [PATCH v6 04/15] net/xsc: add xsc dev ops to support VFIO driver WanRenyong
2025-01-20 11:14 ` [PATCH v6 05/15] net/xsc: add PCT interfaces WanRenyong
2025-01-20 18:24 ` Stephen Hemminger
2025-01-21 3:44 ` WanRenyong
2025-01-20 11:14 ` [PATCH v6 06/15] net/xsc: initialize xsc representors WanRenyong
2025-01-20 19:06 ` Stephen Hemminger
2025-01-21 5:27 ` WanRenyong
2025-01-20 11:14 ` [PATCH v6 07/15] net/xsc: add ethdev configure and RSS ops WanRenyong
2025-01-20 11:14 ` [PATCH v6 08/15] net/xsc: add Rx and Tx queue setup WanRenyong
2025-01-20 18:16 ` Stephen Hemminger
2025-01-21 3:21 ` WanRenyong [this message]
2025-01-20 11:14 ` [PATCH v6 09/15] net/xsc: add ethdev start WanRenyong
2025-01-20 11:14 ` [PATCH v6 10/15] net/xsc: add ethdev stop and close WanRenyong
2025-01-20 11:14 ` [PATCH v6 11/15] net/xsc: add ethdev Rx burst WanRenyong
2025-01-20 11:14 ` [PATCH v6 12/15] net/xsc: add ethdev Tx burst WanRenyong
2025-01-20 11:15 ` [PATCH v6 13/15] net/xsc: add basic stats ops WanRenyong
2025-01-20 11:15 ` [PATCH v6 14/15] net/xsc: add ethdev infos get WanRenyong
2025-01-20 11:15 ` [PATCH v6 15/15] net/xsc: add ethdev link and MTU ops WanRenyong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41248987-fe60-45ea-b0d2-07831d4c7ca6@yunsilicon.com \
--to=wanry@yunsilicon.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jacky@yunsilicon.com \
--cc=nana@yunsilicon.com \
--cc=qianr@yunsilicon.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=weihg@yunsilicon.com \
--cc=xudw@yunsilicon.com \
--cc=zhangxx@yunsilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).