From: Simon Horman <horms@kernel.org>
To: Xin Tian <tianx@yunsilicon.com>
Cc: netdev@vger.kernel.org, leon@kernel.org, andrew+netdev@lunn.ch,
kuba@kernel.org, pabeni@redhat.com, edumazet@google.com,
davem@davemloft.net, jeff.johnson@oss.qualcomm.com,
przemyslaw.kitszel@intel.com, weihg@yunsilicon.com,
wanry@yunsilicon.com
Subject: Re: [PATCH v3 04/14] net-next/yunsilicon: Add qp and cq management
Date: Fri, 17 Jan 2025 13:45:23 +0000 [thread overview]
Message-ID: <20250117134523.GO6206@kernel.org> (raw)
In-Reply-To: <20250115102249.3541496-5-tianx@yunsilicon.com>
On Wed, Jan 15, 2025 at 06:22:51PM +0800, Xin Tian wrote:
> Add qp(queue pair) and cq(completion queue) resource management APIs
>
> Co-developed-by: Honggang Wei <weihg@yunsilicon.com>
> Signed-off-by: Honggang Wei <weihg@yunsilicon.com>
> Co-developed-by: Lei Yan <jacky@yunsilicon.com>
> Signed-off-by: Lei Yan <jacky@yunsilicon.com>
> Signed-off-by: Xin Tian <tianx@yunsilicon.com>
...
> diff --git a/drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h b/drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h
...
> +// qp
> +struct xsc_send_wqe_ctrl_seg {
> + __le32 msg_opcode:8;
> + __le32 with_immdt:1;
> + __le32 csum_en:2;
> + __le32 ds_data_num:5;
> + __le32 wqe_id:16;
> + __le32 msg_len;
> + union {
> + __le32 opcode_data;
> + struct {
> + u8 has_pph:1;
> + u8 so_type:1;
> + __le16 so_data_size:14;
> + u8:8;
> + u8 so_hdr_len:8;
> + };
> + struct {
> + __le16 desc_id;
> + __le16 is_last_wqe:1;
> + __le16 dst_qp_id:15;
> + };
> + };
> + __le32 se:1;
> + __le32 ce:1;
> + __le32:30;
> +};
> +
> +struct xsc_wqe_data_seg {
> + union {
> + __le32 in_line:1;
> + struct {
> + __le32:1;
> + __le32 seg_len:31;
> + __le32 mkey;
> + __le64 va;
> + };
> + struct {
> + __le32:1;
> + __le32 len:7;
> + u8 in_line_data[15];
> + };
> + };
> +};
Hi Xin Tian,
Sparse seems very unhappy about the combination of __le32 and bitfields
in struct xsc_send_wqe_ctrl_seg and struct xsc_wqe_data_seg.
.../xsc_core.h:87:35: error: invalid bitfield specifier for type restricted __le32.
...
I did not look into this deeply. But, in general, I would suggest using
GET_FIELD and SET_FIELD as an alternative to bitfields.
...
next prev parent reply other threads:[~2025-01-17 13:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 10:23 [PATCH v3 00/14] net-next/yunsilicon: ADD Yunsilicon XSC Ethernet Driver Xin Tian
2025-01-15 10:22 ` [PATCH v3 01/14] net-next/yunsilicon: Add xsc driver basic framework Xin Tian
2025-01-15 15:54 ` Simon Horman
2025-01-16 7:03 ` tianx
2025-01-15 16:04 ` Simon Horman
2025-01-16 8:04 ` tianx
2025-01-16 10:53 ` Simon Horman
2025-01-15 10:22 ` [PATCH v3 02/14] net-next/yunsilicon: Enable CMDQ Xin Tian
2025-01-16 10:30 ` Przemek Kitszel
2025-02-13 2:09 ` tianx
2025-01-16 13:55 ` Simon Horman
2025-01-17 3:42 ` tianx
2025-01-17 13:33 ` Simon Horman
2025-01-15 10:22 ` [PATCH v3 03/14] net-next/yunsilicon: Add hardware setup APIs Xin Tian
2025-01-15 10:22 ` [PATCH v3 04/14] net-next/yunsilicon: Add qp and cq management Xin Tian
2025-01-17 13:45 ` Simon Horman [this message]
2025-01-15 10:22 ` [PATCH v3 05/14] net-next/yunsilicon: Add eq and alloc Xin Tian
2025-01-15 10:22 ` [PATCH v3 06/14] net-next/yunsilicon: Add pci irq Xin Tian
2025-01-15 10:22 ` [PATCH v3 07/14] net-next/yunsilicon: Init auxiliary device Xin Tian
2025-01-15 10:23 ` [PATCH v3 08/14] net-next/yunsilicon: Add ethernet interface Xin Tian
2025-01-15 10:23 ` [PATCH v3 09/14] net-next/yunsilicon: Init net device Xin Tian
2025-01-15 10:23 ` [PATCH v3 10/14] net-next/yunsilicon: Add eth needed qp and cq apis Xin Tian
2025-01-15 10:23 ` [PATCH v3 11/14] net-next/yunsilicon: ndo_open and ndo_stop Xin Tian
2025-01-15 10:23 ` [PATCH v3 12/14] net-next/yunsilicon: Add ndo_start_xmit Xin Tian
2025-01-15 10:23 ` [PATCH v3 13/14] net-next/yunsilicon: Add eth rx Xin Tian
2025-01-15 10:23 ` [PATCH v3 14/14] net-next/yunsilicon: add ndo_get_stats64 Xin Tian
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=20250117134523.GO6206@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=tianx@yunsilicon.com \
--cc=wanry@yunsilicon.com \
--cc=weihg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.