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 D844345FF9; Mon, 6 Jan 2025 04:29:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8662A40264; Mon, 6 Jan 2025 04:29:34 +0100 (CET) Received: from lf-2-47.ptr.blmpb.com (lf-2-47.ptr.blmpb.com [101.36.218.47]) by mails.dpdk.org (Postfix) with ESMTP id 87A354014F for ; Mon, 6 Jan 2025 04:29:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1736134162; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=RX5EsKhqYwan8Z5YCTeKh2VP0CKtQxXoW3b9qe9dTdg=; b=fvKGsPPH6dCJm1ryaG/n0SCJ674a4xzZCwc9CDfM6Rjnp8n5P7PUGFriJcUEqpY7EZlzaE WhB9fDcB0bd/nxfYjiym9QiuqQ0ZLB+Cpy7gb3fsntk9dhmDiQV/nNFGrHlE+uNTPtd7lb cBo41xSzzMgd0LvelYdXNVCX5Z8LiSchCt4okKs/ivxxticlb/fjv7jIZQtH4cy5YTmHA+ 6gTnkDoUcLC6kScqvrfukDg5KMlH7QNzA0WFff6KbTEo+WAOlxsT/Xi3SsOYuZuqOHhTeL YkGAFJlgjV1Y8rIUcc9J77+np16N2kabyZ3yalPm2vPOANillGFLBZeTlIrrDg== Content-Transfer-Encoding: 7bit X-Lms-Return-Path: X-Original-From: WanRenyong Received: from [127.0.0.1] ([116.231.104.97]) by smtp.feishu.cn with ESMTPS; Mon, 06 Jan 2025 11:29:19 +0800 To: "Stephen Hemminger" Cc: , , , , , , , , Subject: Re: [PATCH v4 02/15] net/xsc: add xsc device initialization In-Reply-To: <20250103105851.1dde1210@pi5> From: "WanRenyong" Mime-Version: 1.0 User-Agent: Mozilla Thunderbird References: <20250103150404.1529663-1-wanry@yunsilicon.com> <20250103150407.1529663-3-wanry@yunsilicon.com> <20250103105851.1dde1210@pi5> Date: Mon, 6 Jan 2025 11:29:21 +0800 Message-Id: Content-Type: text/plain; charset=UTF-8 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/4 2:58, Stephen Hemminger wrote: > On Fri, 03 Jan 2025 23:04:08 +0800 > "WanRenyong" wrote: > >> +struct xsc_hwinfo { >> + uint8_t valid; /* 1: current phy info is valid, 0 : invalid */ >> + uint32_t pcie_no; /* pcie number , 0 or 1 */ >> + uint32_t func_id; /* pf glb func id */ >> + uint32_t pcie_host; /* host pcie number */ >> + uint32_t mac_phy_port; /* mac port */ >> + uint32_t funcid_to_logic_port_off; /* port func id offset */ >> + uint16_t lag_id; >> + uint16_t raw_qp_id_base; >> + uint16_t raw_rss_qp_id_base; >> + uint16_t pf0_vf_funcid_base; >> + uint16_t pf0_vf_funcid_top; >> + uint16_t pf1_vf_funcid_base; >> + uint16_t pf1_vf_funcid_top; >> + uint16_t pcie0_pf_funcid_base; >> + uint16_t pcie0_pf_funcid_top; >> + uint16_t pcie1_pf_funcid_base; >> + uint16_t pcie1_pf_funcid_top; >> + uint16_t lag_port_start; >> + uint16_t raw_tpe_qp_num; >> + int send_seg_num; >> + int recv_seg_num; >> + uint8_t on_chip_tbl_vld; >> + uint8_t dma_rw_tbl_vld; >> + uint8_t pct_compress_vld; >> + uint32_t chip_version; >> + uint32_t hca_core_clock; >> + uint8_t mac_bit; >> + uint8_t esw_mode; >> +}; > Can you rearrange elements in this structure so there are less holes? > Or is it shared with the hardware. OK, I will try to rearrange the elemments in the next version. It 's not shared with hardware, it is just used to store hardward infos. > > Unless you need negative value as a sentinel, avoid use of int where unsigned could be used for > seg_num. Got it, will fix it in the next version. unsigned -- Thanks, WanRenyong