From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CEC19A328D for ; Wed, 23 Oct 2019 09:05:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 437211BF89; Wed, 23 Oct 2019 09:05:04 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id E805D1BF87 for ; Wed, 23 Oct 2019 09:05:02 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 46FAC200CF; Wed, 23 Oct 2019 03:05:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 23 Oct 2019 03:05:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=qFd4ErhsxCgz2pUfYY86e9YHdkHBed6YB6Q2C0k2SNk=; b=PIFG0xAn4GYp LErteu6QxeiOG7GkcmK1tsWZ2uEFagTqJeTa/SIs4DYEV9RyU/5LREsQUE3bNOwT frfHt8rsq/TiRc/Q41+KWoYB88FNdR8alQ//altwuzXvEPsVIEeowSKsdsJcnyHg yCvqDtqpI7P6BL+NqDiaPWT3E3DfMLM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=qFd4ErhsxCgz2pUfYY86e9YHdkHBed6YB6Q2C0k2S Nk=; b=vcaEf4bzS7B223NEz0/fJObYmEnGSq28XLHIbpXNbSVcnRqau+zvWdLBl KZUCstdspWac70ZQl5RVqtdw7wLP7W+K9Hck/rhJHL5FuL1xAdPmCxB9cvn8GtHY Ja7CsQAVtKU5IL0r7JAStSYQpOiBOHofgiF+rRXSqe7G1Wn1bbqMtPHi/gDP92EM BSwwVKTSr67IhY0NrAxB9KmpayR9ITQfu/tBTH9vRQtoIIqi6ej76dNp8xoNI2Jt s8U0R240fwO2o2K2Sj1zSIDfbE29Rc2Wdcym1iClYpJfEYvSAEI3PKFqWU3c2SrK eniB6I+KyU+j7LlvnFOP8fur7z5UQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrkeekgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F30F7D60062; Wed, 23 Oct 2019 03:05:00 -0400 (EDT) From: Thomas Monjalon To: Ori Kam Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , jingjing.wu@intel.com, stephen@networkplumber.org Date: Wed, 23 Oct 2019 09:04:59 +0200 Message-ID: <1578943.idabHBMeuZ@xps> In-Reply-To: <1571326337-42692-3-git-send-email-orika@mellanox.com> References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <1571326337-42692-1-git-send-email-orika@mellanox.com> <1571326337-42692-3-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 02/15] ethdev: add support for hairpin queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 17/10/2019 17:32, Ori Kam: > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > /** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * A structure used to return the hairpin capabilities that are supported. > + */ > +struct rte_eth_hairpin_cap { > + uint16_t max_n_queues; > + /**< The max number of hairpin queues (different bindings). */ > + uint16_t max_rx_2_tx; > + /**< Max number of Rx queues to be connected to one Tx queue. */ > + uint16_t max_tx_2_rx; > + /**< Max number of Tx queues to be connected to one Rx queue. */ > + uint16_t max_nb_desc; /**< The max num of descriptors. */ > +}; I think you can switch to "comment-first style" for this struct. > +#define RTE_ETH_MAX_HAIRPIN_PEERS 32 Usually I think such define is in the build config. Any other opinion? > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * A structure used to hold hairpin peer data. > + */ > +struct rte_eth_hairpin_peer { > + uint16_t port; /**< Peer port. */ > + uint16_t queue; /**< Peer queue. */ > +}; It may be the right place to give more words about what is a peer, can we have multiple peers, etc. > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * A structure used to configure hairpin binding. > + */ > +struct rte_eth_hairpin_conf { > + uint16_t peer_n; /**< The number of peers. */ In general, I don't like one-letter abbreviations. Is peer_count better? > + struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS]; > +};