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 B0D6AA0C49; Tue, 15 Jun 2021 10:06:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E9794067A; Tue, 15 Jun 2021 10:06:20 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 21B6240140 for ; Tue, 15 Jun 2021 10:06:18 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 8C52D7F519; Tue, 15 Jun 2021 11:06:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 8C52D7F519 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1623744377; bh=G0cwWAEHMq1ZqZZdw2/G6UctGe7lxc6KQyulMcV6q1w=; h=Subject:To:References:From:Date:In-Reply-To; b=lzrIQytAf05385gz28jiX5qgNSBAMvfr0OORbULIK2nrO5GQ9x3VJOgEPzk1Kbh9m 3q/s44K76OSBLKHDnYLfyqSKmsp1gFx0Y+A1pt4w77qfhwQkKqtEaBVSkTxIbr5K7Q JA4FjQ/VfcpaKUtOW0GfOiXQpShcEYC4RnieRx3k= To: Jiawen Wu , dev@dpdk.org References: <20210602094108.1575640-1-jiawenwu@trustnetic.com> <20210602094108.1575640-16-jiawenwu@trustnetic.com> <009701d761bb$26284170$7278c450$@trustnetic.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <94343a09-826f-b763-b214-260cfae62e56@oktetlabs.ru> Date: Tue, 15 Jun 2021 11:06:17 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <009701d761bb$26284170$7278c450$@trustnetic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 15/24] net/ngbe: add Rx queue setup and release 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 Sender: "dev" On 6/15/21 10:50 AM, Jiawen Wu wrote: > On Tuesday, June 15, 2021 2:53 AM, Andrew Rybchenko wrote: >> On 6/2/21 12:40 PM, Jiawen Wu wrote: >>> Setup device Rx queue and release Rx queue. >>> >>> Signed-off-by: Jiawen Wu >>> --- >>> drivers/net/ngbe/ngbe_ethdev.c | 9 + >>> drivers/net/ngbe/ngbe_ethdev.h | 8 + >>> drivers/net/ngbe/ngbe_rxtx.c | 305 >> +++++++++++++++++++++++++++++++++ >>> drivers/net/ngbe/ngbe_rxtx.h | 90 ++++++++++ >>> 4 files changed, 412 insertions(+) >>> >>> diff --git a/drivers/net/ngbe/ngbe_rxtx.h >>> b/drivers/net/ngbe/ngbe_rxtx.h index 39011ee286..e1676a53b4 100644 >>> --- a/drivers/net/ngbe/ngbe_rxtx.h >>> +++ b/drivers/net/ngbe/ngbe_rxtx.h >>> @@ -6,7 +6,97 @@ >>> #ifndef _NGBE_RXTX_H_ >>> #define _NGBE_RXTX_H_ >>> >>> +/***************************************************************************** >>> + * Receive Descriptor >>> + *****************************************************************************/ >>> +struct ngbe_rx_desc { >>> + struct { >>> + union { >>> + __le32 dw0; >> >> rte_* types shuld be used > > I don't quite understand, should '__le32' be changed to 'rte_*' type? Yes, since it is native DPDK code, it should use native DPDK data types. In this particular case it is rte_le32. > >> >>> + struct { >>> + __le16 pkt; >>> + __le16 hdr; >>> + } lo; >>> + }; >>> + union { >>> + __le32 dw1; >>> + struct { >>> + __le16 ipid; >>> + __le16 csum; >>> + } hi; >>> + }; >>> + } qw0; /* also as r.pkt_addr */ >>> + struct { >>> + union { >>> + __le32 dw2; >>> + struct { >>> + __le32 status; >>> + } lo; >>> + }; >>> + union { >>> + __le32 dw3; >>> + struct { >>> + __le16 len; >>> + __le16 tag; >>> + } hi; >>> + }; >>> + } qw1; /* also as r.hdr_addr */ >>> +}; >>> + > > >