From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A36A2460C9; Tue, 21 Jan 2025 04:22:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E86042707; Tue, 21 Jan 2025 04:22:04 +0100 (CET) Received: from lf-2-45.ptr.blmpb.com (lf-2-45.ptr.blmpb.com [101.36.218.45]) by mails.dpdk.org (Postfix) with ESMTP id D6AA240264 for ; Tue, 21 Jan 2025 04:22:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1737429715; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=mRxN4th3JTAuerx76fkbynG8VM4f6yiJ/QcHDxVOliA=; b=Kui8HbjU409WSMz8ER7yolOmxU/gJevaErDoTRxRG83zyBNGRqKXNMOMjNoOXIebVeBS24 uL7FRx9DTsysD46yoXm+p/uzVeU7WzUrQkU68es1IqQQLwix4DFq9I44Ax8rGM8b1NS8kJ M9Jz+3IhaW0MypKr10wY6InwrSOu5HhXT42NtxirWwpsCqKW4lIwEv88B1ktO3kEBjSt4M oMZwDPP3QKuMhvwCW9I341d+O5RSODwjHGQ/bdHFkfu7UMmGam6kOdV7B+zBNv44X5ZVtH tr9NMNaUGVwBo+qJc6qcXsaLA4zQqQdhu4lu/3oZCqZyNFObHmQ51ZB2yxbY6Q== To: "Stephen Hemminger" Subject: Re: [PATCH v6 08/15] net/xsc: add Rx and Tx queue setup X-Original-From: WanRenyong From: "WanRenyong" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Received: from [127.0.0.1] ([218.1.186.193]) by smtp.feishu.cn with ESMTPS; Tue, 21 Jan 2025 11:21:53 +0800 User-Agent: Mozilla Thunderbird X-Lms-Return-Path: References: <20250120111431.1048479-1-wanry@yunsilicon.com> <20250120111447.1048479-9-wanry@yunsilicon.com> <20250120101637.442a7002@hermes.local> Cc: , , , , , , , , Date: Tue, 21 Jan 2025 11:21:52 +0800 Message-Id: <41248987-fe60-45ea-b0d2-07831d4c7ca6@yunsilicon.com> In-Reply-To: <20250120101637.442a7002@hermes.local> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2025/1/21 2:16, Stephen Hemminger wrote: > On Mon, 20 Jan 2025 19:14:48 +0800 > "WanRenyong" 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