From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Jie Hai <haijie1@huawei.com>,
dev@dpdk.org, Yisen Zhuang <yisen.zhuang@huawei.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Huisong Li <lihuisong@huawei.com>,
"Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
Hao Chen <chenh@yusur.tech>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: fengchengwen@huawei.com, liudongdong3@huawei.com,
David Marchand <david.marchand@redhat.com>,
Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH v3 1/4] net/hns3: refactor VF mailbox message struct
Date: Thu, 7 Dec 2023 12:47:59 +0000 [thread overview]
Message-ID: <92f8434c-bc12-4d51-9675-d1e7a4a025a8@amd.com> (raw)
In-Reply-To: <20231207013732.3987482-2-haijie1@huawei.com>
On 12/7/2023 1:37 AM, Jie Hai wrote:
> From: Dengdui Huang <huangdengdui@huawei.com>
>
> The data region in VF to PF mbx message command is
> used to communicate with PF driver. And this data
> region exists as an array. As a result, some complicated
> feature commands, like setting promisc mode, map/unmap
> ring vector and setting VLAN id, have to use magic number
> to set them. This isn't good for maintenance of driver.
> So this patch refactors these messages by extracting an
> hns3_vf_to_pf_msg structure.
>
> In addition, the PF link change event message is reported
> by the firmware and is reported in hns3_mbx_vf_to_pf_cmd
> format, it also needs to be modified.
>
> Fixes: 463e748964f5 ("net/hns3: support mailbox")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
> Signed-off-by: Jie Hai <haijie1@huawei.com>
<...>
> @@ -107,6 +106,48 @@ struct hns3_mbx_resp_status {
> uint8_t additional_info[HNS3_MBX_MAX_RESP_DATA_SIZE];
> };
>
> +struct hns3_ring_chain_param {
> + uint8_t ring_type;
> + uint8_t tqp_index;
> + uint8_t int_gl_index;
> +};
> +
> +#pragma pack(1)
> +struct hns3_mbx_vlan_filter {
> + uint8_t is_kill;
> + uint16_t vlan_id;
> + uint16_t proto;
> +};
> +#pragma pack()
> +
>
Please prefer '__rte_packed' instead of "#pragma pack()", as it is more
consisted way for same purpose.
But I see multiple instances of "#pragma pack()" already exists.
@Tyler,
as for as I understand '__attribute__((__packed__))' (__rte_packed) is
GCC way and "#pragma pack()" is Windows way.
Is __rte_packed causing problem with latest windows compilers?
And should we have an abstract __rte_packed that works for both windows
compiler and gcc?
next prev parent reply other threads:[~2023-12-07 12:48 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 3:44 [PATCH 0/5] net/hns3: fix and refactor mailbox code Jie Hai
2023-11-08 3:44 ` [PATCH 1/5] net/hns3: fix sync mailbox failure forever Jie Hai
2023-11-08 3:44 ` [PATCH 2/5] net/hns3: refactor VF mailbox message struct Jie Hai
2023-11-09 18:51 ` Ferruh Yigit
2023-11-08 3:44 ` [PATCH 3/5] net/hns3: refactor PF " Jie Hai
2023-11-08 3:44 ` [PATCH 4/5] net/hns3: refactor send mailbox function Jie Hai
2023-11-08 3:44 ` [PATCH 5/5] net/hns3: refactor handle " Jie Hai
2023-11-09 18:50 ` [PATCH 0/5] net/hns3: fix and refactor mailbox code Ferruh Yigit
2023-11-10 6:21 ` Jie Hai
2023-11-10 12:35 ` Ferruh Yigit
2023-11-10 6:13 ` [PATCH v2 0/6] net/hns3: fix and refactor some codes Jie Hai
2023-11-10 6:13 ` [PATCH v2 1/6] net/hns3: fix sync mailbox failure forever Jie Hai
2023-11-10 6:13 ` [PATCH v2 2/6] net/hns3: use stdatomic API Jie Hai
2023-11-10 6:13 ` [PATCH v2 3/6] net/hns3: refactor VF mailbox message struct Jie Hai
2023-11-10 6:13 ` [PATCH v2 4/6] net/hns3: refactor PF " Jie Hai
2023-11-10 6:13 ` [PATCH v2 5/6] net/hns3: refactor send mailbox function Jie Hai
2023-11-10 16:23 ` Ferruh Yigit
2023-11-10 6:13 ` [PATCH v2 6/6] net/hns3: refactor handle " Jie Hai
2023-11-10 16:12 ` [PATCH v2 0/6] net/hns3: fix and refactor some codes Ferruh Yigit
2023-12-07 1:37 ` [PATCH v3 0/4] net/hns3: refactor mailbox Jie Hai
2023-12-07 1:37 ` [PATCH v3 1/4] net/hns3: refactor VF mailbox message struct Jie Hai
2023-12-07 12:47 ` Ferruh Yigit [this message]
2023-12-07 1:37 ` [PATCH v3 2/4] net/hns3: refactor PF " Jie Hai
2023-12-07 1:37 ` [PATCH v3 3/4] net/hns3: refactor send mailbox function Jie Hai
2023-12-07 1:37 ` [PATCH v3 4/4] net/hns3: refactor handle " Jie Hai
2023-12-07 12:31 ` [PATCH v3 0/4] net/hns3: refactor mailbox Ferruh Yigit
2023-12-08 1:06 ` Jie Hai
2023-12-08 6:55 ` [PATCH v4 " Jie Hai
2023-12-08 6:55 ` [PATCH v4 1/4] net/hns3: refactor VF mailbox message struct Jie Hai
2023-12-08 6:55 ` [PATCH v4 2/4] net/hns3: refactor PF " Jie Hai
2023-12-08 6:55 ` [PATCH v4 3/4] net/hns3: refactor send mailbox function Jie Hai
2023-12-08 6:55 ` [PATCH v4 4/4] net/hns3: refactor handle " Jie Hai
2023-12-08 10:48 ` [PATCH v4 0/4] net/hns3: refactor mailbox Ferruh Yigit
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=92f8434c-bc12-4d51-9675-d1e7a4a025a8@amd.com \
--to=ferruh.yigit@amd.com \
--cc=chenh@yusur.tech \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=haijie1@huawei.com \
--cc=humin29@huawei.com \
--cc=lihuisong@huawei.com \
--cc=liudongdong3@huawei.com \
--cc=roretzla@linux.microsoft.com \
--cc=thomas@monjalon.net \
--cc=xavier.huwei@huawei.com \
--cc=yisen.zhuang@huawei.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).