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 93B07A3295 for ; Wed, 23 Oct 2019 12:09:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8ED81BFEF; Wed, 23 Oct 2019 12:09:48 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140057.outbound.protection.outlook.com [40.107.14.57]) by dpdk.org (Postfix) with ESMTP id 1BADD1BFE7 for ; Wed, 23 Oct 2019 12:09:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3zdV0YO/lWd4pjtCpyydkL+zrQObLiIpiEAx16sSjnmXB7Ov9teTd+sRWqhmtLZX0AC1PyY05Q6QsibVcJds8/UnDaKkibompCK2CSdiVtMz8qYdSHvziMiC2e8asg/BELObxkDQklduxM62xuKq0AaZWRrww5sIfqZ8AOuQC8gaEcAFR4B83UWpIE7j3AOKoeJk6WRmMrbV3cw/Yf3f1HOJCSiN2SNSFSUSGOzALpCvThEpXZ0GyIfxrB/XMXKik715DpaQjNDIRkaiGAVce2mmb6i2s87Wi4U8PtGYhMyRe8I/lnZgUnCHGs0Lndve4QljXxVHecoWcWc6qiB/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UZGbjkW3oR8og9mT/roMHSDVYQ2ljsmPB4Aomvfq3fg=; b=ek+ZleNQdQwSk8OINdKpwKuZfdBB0t8DbjGQ+VunJ1MR4afDYPx5XOrXwheJYDo+clJWCxB6lEZbNoJ/nQDOjGCgK9PbNc75ac3EU4nlId80OYAMFQgb+wyJNzDEFYyl+UwCEsk23BI2LnXSdQ9U6UvFSn8hQbuSvCE3rKrmco7a9Ktj37qwQ586gjHySFf8IPHrYhIoDPXvACWBMsdXpjKP7INNmlHsoONYHkaeA/7fPVWq5an/zcF9ld1A7KC3bRgwyqUczc0uuoDjht2NlUTxSxkqDgvQ++VIXMInchp+27AQ5GA+e0rOQbune/BvPkxEHrT6aXjmp5oOmgyGmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UZGbjkW3oR8og9mT/roMHSDVYQ2ljsmPB4Aomvfq3fg=; b=ssaN3A7dReY70G537D0kk7xwNpkyR4PTqg/FTCTzTENBj+jJJSLvEHfqk96Gxp6wLq2I+wV7jJe/jhQOktEl1erHR91p+4fs3B4zNDAXU1R4aL0cUS6Stk0CctbqWOgyNU5haqKgRcbQOs3b+VgkTorLR6B6TrqefSJxJ2afjLs= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3507.eurprd05.prod.outlook.com (10.171.190.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.20; Wed, 23 Oct 2019 10:09:46 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178%7]) with mapi id 15.20.2367.025; Wed, 23 Oct 2019 10:09:46 +0000 From: Ori Kam To: Thomas Monjalon CC: "dev@dpdk.org" , Ferruh Yigit , Andrew Rybchenko , "jingjing.wu@intel.com" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [PATCH v4 02/15] ethdev: add support for hairpin queue Thread-Index: AQHVhQAgFv2i5Ft140GXJtacKsVcmadn1l2AgAALiTA= Date: Wed, 23 Oct 2019 10:09:45 +0000 Message-ID: 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> <1578943.idabHBMeuZ@xps> In-Reply-To: <1578943.idabHBMeuZ@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: cc7dbe6b-4e67-4b89-1fca-08d757a1219b x-ms-traffictypediagnostic: AM4PR05MB3507: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 019919A9E4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(13464003)(189003)(199004)(446003)(7696005)(54906003)(11346002)(76176011)(25786009)(3846002)(81166006)(71200400001)(6116002)(81156014)(8676002)(8936002)(74316002)(5660300002)(186003)(99286004)(26005)(486006)(6506007)(102836004)(53546011)(7736002)(305945005)(476003)(52536014)(66476007)(229853002)(33656002)(66946007)(6246003)(2906002)(316002)(478600001)(6436002)(256004)(64756008)(4326008)(71190400001)(6916009)(66446008)(76116006)(14454004)(55016002)(66556008)(9686003)(86362001)(66066001)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3507; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CfFMiMKOJ1pXp0Rjw9dK3otrSiW3VeXfDuAASmgM5oc6pCozlYd670i8eOhW8GWt7AnEhkLcmeJOnt0LGkL3zDHI9ITFPsSL7XOPEUwPe6UwSaoRpfLjBQIF7ilWGJUSjK20ajqCvhzwbu/ZlCdLdTjxxZOFBHjxro6epqw7SimonhriMmPafr4WRH14elAZj6tzVF3m4SGAZ4wLXsgP+uQQ/sy9/5Jgona+ARakdh5M5Ab1vNBn5UGYJhx6TW1xzlUbcLkouj3N49a83cXFRJQoU0UOG1MeFQ7VSW62h1wkPADV8BqtbktxxrW0Mdp4D2TJJlRI9izd6+wXqB+kzLYazqsvLtHGDA7qtOeSnZUlIdT+yAyGYImIsVWx2inaah112JqZUgdK3EJXYcZwLBNodm9F3BNWlKCEuysDQ8OzEimwCfAgCSjiQTEYXwXj x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc7dbe6b-4e67-4b89-1fca-08d757a1219b X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2019 10:09:46.0160 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nOwYUz3kjpCaFZEmSBABPz5ikfoKcKHuOj1Mv+w9A7qw7DhSS86MEXWucXn5LDuJBOHls7lly9hg4VSfqDQmuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3507 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" Hi Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, October 23, 2019 10:05 AM > To: Ori Kam > Cc: dev@dpdk.org; Ferruh Yigit ; Andrew Rybchenko > ; jingjing.wu@intel.com; > stephen@networkplumber.org > Subject: Re: [dpdk-dev] [PATCH v4 02/15] ethdev: add support for hairpin = queue >=20 > 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 suppor= ted. > > + */ > > +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. */ > > +}; >=20 > I think you can switch to "comment-first style" for this struct. >=20 O.K I will change. >=20 > > +#define RTE_ETH_MAX_HAIRPIN_PEERS 32 >=20 > Usually I think such define is in the build config. > Any other opinion? >=20 I need to check. But if you don't mind let's keep it this way, and modify i= t=20 later after we see how other manufactures will add hairpin. >=20 > > +/** > > + * @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. */ > > +}; >=20 > It may be the right place to give more words about what is a peer, > can we have multiple peers, etc. >=20 I'm not sure what I can say to make it clearer but I will try. >=20 > > +/** > > + * @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. */ >=20 > In general, I don't like one-letter abbreviations. > Is peer_count better? >=20 O.K. I will change to count. > > + struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS]; > > +}; >=20 >=20