From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 124CF1B785 for ; Thu, 8 Feb 2018 15:03:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 099C5208C1; Thu, 8 Feb 2018 09:03:24 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 08 Feb 2018 09:03:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=edk/yxkwqZ6DEO+791yLPSEvd6qcQCESL30nNx3N7h4=; b=VXO8HI4b Z6gaToaF4BChMaiYv0Q1S+S4TdU7Ret6UKE3TBq759RytigHs7H56Mwwec9jnJ3b Y2v4xrU4WxoYt1ESUV4oFq0zuwbm5+N/ZdHdtLyFFvQjT51PyT6B+XMrRQX21tQ9 4TZr1qUq0zIVVGXaY+aDretAFyn+n3xyNIgyQxdbhMEGd5y9bIFivLKyT7Vi0Gi4 JRXR49pKn3/XShomaATDVZtonSdVCTkTDip9ubyezorWN9RC/P+jGeZZHVuo2dvC OvhYPLXZCZ8LqvrpG5Vdd8HIPeOV+sjjPi/Fn81b7ncJkJhKy8UaEWFzuP6goA9r 2AS28yPXkmeY0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=edk/yxkwqZ6DEO+791yLPSEvd6qcQ CESL30nNx3N7h4=; b=KLzH/sCDzbQczFjvYsxnXSYjaN/NaaoiztPMlIK2C1YZz I6mJ8j5l5T72IeHOqSqDqE/vgnZbPxtyWpeRNwbv9nILRGM+bnYtQ6LzuXP26J1b lK4zqwwcUVnhRIzvMMdTH+nbiiabyYp8J5cc6Qzs0pHj+90hKBZbqOaqzPexL+ML 02+gYdP8wqLCgZThLeDRkSgoonXoxPX2O6o3xHedeZvsYwE2UJvpEELDeXDsFA5A LrwzTk7IXPeQwKxKA4qEMI8oPAQjEeGF24sJp/SeODWF9LgozanLCSA8+TORzF1n vt3DOCSksaUASM/MQzy+I35YFvRlyvFGAabx2jxpw== X-ME-Sender: Received: from yliu-mob (unknown [182.84.161.100]) by mail.messagingengine.com (Postfix) with ESMTPA id 88A27248CC; Thu, 8 Feb 2018 09:03:22 -0500 (EST) Date: Thu, 8 Feb 2018 22:03:18 +0800 From: Yuanhan Liu To: Pavan Nikhilesh Cc: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, stable@dpdk.org Message-ID: <20180208140318.GH2108@yliu-mob> References: <20180208082603.2069-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180208082603.2069-1-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-stable] [PATCH 1/2] net/octeontx: add channel to port id mapping X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 14:03:27 -0000 On Thu, Feb 08, 2018 at 01:56:02PM +0530, Pavan Nikhilesh wrote: > The channel to port id map is used by event octeontx to map the received > wqe to the respective ethdev port. > > [ backported from upstream commit 989d492620f1 ] > > Signed-off-by: Pavan Nikhilesh > Acked-by: Santosh Shukla Both patches applied to dpdk-stable/17.11. Thanks! --yliu > --- > drivers/net/octeontx/octeontx_ethdev.c | 6 ++++++ > drivers/net/octeontx/octeontx_ethdev.h | 6 ++++++ > drivers/net/octeontx/rte_pmd_octeontx_version.map | 3 +++ > 3 files changed, 15 insertions(+) > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > index b52700e4c..eca3a39fd 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.c > +++ b/drivers/net/octeontx/octeontx_ethdev.c > @@ -54,6 +54,9 @@ struct octeontx_vdev_init_params { > uint8_t nr_port; > }; > > +uint16_t > +rte_octeontx_pchan_map[OCTEONTX_MAX_BGX_PORTS][OCTEONTX_MAX_LMAC_PER_BGX]; > + > enum octeontx_link_speed { > OCTEONTX_LINK_SPEED_SGMII, > OCTEONTX_LINK_SPEED_XAUI, > @@ -1133,6 +1136,9 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, > nic->num_tx_queues); > PMD_INIT_LOG(DEBUG, "speed %d mtu %d", nic->speed, nic->mtu); > > + rte_octeontx_pchan_map[(nic->base_ochan >> 8) & 0x7] > + [(nic->base_ochan >> 4) & 0xF] = data->port_id; > + > return data->port_id; > > err: > diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h > index c47d4c6d3..d37bb8a23 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.h > +++ b/drivers/net/octeontx/octeontx_ethdev.h > @@ -52,12 +52,18 @@ > #define OCTEONTX_VDEV_NR_PORT_ARG ("nr_port") > #define OCTEONTX_MAX_NAME_LEN 32 > > +#define OCTEONTX_MAX_BGX_PORTS 4 > +#define OCTEONTX_MAX_LMAC_PER_BGX 4 > + > static inline struct octeontx_nic * > octeontx_pmd_priv(struct rte_eth_dev *dev) > { > return dev->data->dev_private; > } > > +extern uint16_t > +rte_octeontx_pchan_map[OCTEONTX_MAX_BGX_PORTS][OCTEONTX_MAX_LMAC_PER_BGX]; > + > /* Octeontx ethdev nic */ > struct octeontx_nic { > struct rte_eth_dev *dev; > diff --git a/drivers/net/octeontx/rte_pmd_octeontx_version.map b/drivers/net/octeontx/rte_pmd_octeontx_version.map > index a70bd197b..40d68c79e 100644 > --- a/drivers/net/octeontx/rte_pmd_octeontx_version.map > +++ b/drivers/net/octeontx/rte_pmd_octeontx_version.map > @@ -1,4 +1,7 @@ > DPDK_17.11 { > + global: > + > + rte_octeontx_pchan_map; > > local: *; > }; > -- > 2.16.1