From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50062.outbound.protection.outlook.com [40.107.5.62]) by dpdk.org (Postfix) with ESMTP id 2D5F41B3D8 for ; Wed, 10 Oct 2018 09:03:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6CXx5l2fNKMZgFYSZrKwHLonNLI50BwXovmOYeNqvkA=; b=GGkTcP27avR3eZ2yrS9LXqu2Vs5NcnOS41sOFhkW69AC+TCp9EXezeVJYD3xLT28nP4Sj0J650Y0QfFBKsj3gg2iJ7meH9ohnJlO53UrGmxqMwkRs3Hi8Qu4dLdZ9QMlmCtANn0xWkyyR/iu/WbgBeEbC36fCJgoHhKEQBsd3Kk= Received: from DB5PR05MB1254.eurprd05.prod.outlook.com (10.162.157.140) by DB5PR05MB1894.eurprd05.prod.outlook.com (10.166.173.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.28; Wed, 10 Oct 2018 07:03:21 +0000 Received: from DB5PR05MB1254.eurprd05.prod.outlook.com ([fe80::3516:b329:5c35:51a5]) by DB5PR05MB1254.eurprd05.prod.outlook.com ([fe80::3516:b329:5c35:51a5%2]) with mapi id 15.20.1207.029; Wed, 10 Oct 2018 07:03:21 +0000 From: Raslan Darawsheh To: "keith.wiles@intel.com" CC: Thomas Monjalon , "dev@dpdk.org" , Shahaf Shuler , Raslan Darawsheh , Ori Kam , "ferruh.yigit@intel.com" Thread-Topic: [PATCH v5 1/3] net/tap: add queue and port ids in Rx/Tx queues structures Thread-Index: AQHUYGdUWBGuC/wah0mdbLiKhXyFaw== Date: Wed, 10 Oct 2018 07:03:21 +0000 Message-ID: <1539154988-20652-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: AM5PR0701CA0017.eurprd07.prod.outlook.com (2603:10a6:203:51::27) To DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR05MB1894; 6:7dTFLn5/ithRWrYRbPWHu2dByCbgwU+EvE/2jKbFP575IkZ6H0BiTz+DYOHVsZwn0BwuFSeQrH4MBFyQWRg7GdgPlE6Pj/jmXTXuh211t/TUGLGh6r0XnXUTy92wMzudCCm37Xp1NQmNC91fp2erdMdIOTbc1OOZl9rUstLwm5kKvMXBXdiEDOQu3qfzJXtS/2KJ+rtHDpoaj0Rder56LY628DWnZ0mMy13Pa/jNivyv5sdBN5G2dDwcmK3qiuEfMqJXIxv0GHBiH9w4nABJHopI18/toQAAhz9xvLhZXdzE3Uo9mYyN8fkd2zaZvDe0G2gkgkvE5gL0aHP2ilGG1SGFjHj1NyU8mHOnTI2Xf4ARXQS4R8Eetm/6+eBXW7uPnUCe8vSdeYEq3FOjDsLBSJP+qnKE+8/ZX1Cy2ioBxRKsrzaYpukw/ukydf8OPhCcUG2/j3b5wFScw+TpeFWwWQ==; 5:MfokO7MrK/MvmzqGxP2XlO4nmYZJmnqTcPkmTF+gK6c9H5DshXQb3GLq5MANK5eaifXDyF8D3Hnqx4gGIFq3qX+U/AQtv+8nZvLFXcYJy9trxeeiIKg0xs8bHAPjB7UCgzvn0YZdxAXANXG3yxf2X0WSPfFnqCqcndu3fm9mU3Y=; 7:uKvCn8YMBBtQZIwr/7LnlCrLqdWjEKQ5mSSdrVMZT7n4Wc7gMXOn46ljik4g9w1VKhl8sKv6AZEmRXiX80k1UB1u5dTv2v2Wo5QRmJjQwqqDsXawuUQeGcK45/xOrHmO0CRRPHq4/roeY8MnAPu1fv6On4WzpxP6iK7K03ubWbwKuhfEhKvStUvucR+19ur/W4trWENCKHoY9LRfeaylQyP1JGxOIH/EyDRAQWxpzxVMMARn+WfI2n8xqHsDmGJ9 x-ms-office365-filtering-correlation-id: e9866a15-dad0-48d0-35c4-08d62e7e7671 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB5PR05MB1894; x-ms-traffictypediagnostic: DB5PR05MB1894: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(201708071742011)(7699051); SRVR:DB5PR05MB1894; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1894; x-forefront-prvs: 08213D42D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(366004)(136003)(346002)(189003)(199004)(66066001)(305945005)(478600001)(8936002)(71200400001)(71190400001)(52116002)(5660300001)(316002)(4326008)(7736002)(2900100001)(2616005)(26005)(97736004)(476003)(186003)(386003)(6486002)(99286004)(6436002)(6116002)(3846002)(6512007)(2351001)(2906002)(53936002)(6506007)(81166006)(105586002)(25786009)(81156014)(106356001)(5640700003)(14454004)(68736007)(6916009)(36756003)(2501003)(102836004)(5250100002)(8676002)(86362001)(50226002)(486006)(256004)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1894; H:DB5PR05MB1254.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-microsoft-antispam-message-info: wwIr1E9uqU1gx7JZfSkq9y9Qj7AmDKrpAwEWSPB0ihNH8UFdo5PZQUD+ExoolDjxCLl47UiP3crJqUn0hkadqD2fadVINYlXHBJshirVVO4oBfwWnT782Ri1qI0vwtQKqTa88LBkCZc3Ab6KY+414akFps0YFlMXskhgStUQCz+Wb8Dfm/OO4ATqazj4mhiCz+5xSmwPGYAo+r3sOivXx2AOm070GR2QcCwzcG7+otu7XT4zKwzXrXQuLu65Dm3EaxXbMIcysrYQlkPWawiBrTEF3jN+6rSSFPWKbsPF6ZdXm5cUMK4yPjGYQEw2Y0CkwAHWj0weT1hKfG+NEOlnNxBrz6YDf1m62ZK38O9dkqM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9866a15-dad0-48d0-35c4-08d62e7e7671 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2018 07:03:21.1835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1894 Subject: [dpdk-dev] [PATCH v5 1/3] net/tap: add queue and port ids in Rx/Tx queues structures 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: , X-List-Received-Date: Wed, 10 Oct 2018 07:03:24 -0000 Signed-off-by: Raslan Darawsheh --- drivers/net/tap/rte_eth_tap.c | 3 +++ drivers/net/tap/rte_eth_tap.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index ad5ae98..edfb7da 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1293,6 +1293,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, rxq->mp =3D mp; rxq->trigger_seen =3D 1; /* force initial burst */ rxq->in_port =3D dev->data->port_id; + rxq->queue_id =3D rx_queue_id; rxq->nb_rx_desc =3D nb_desc; iovecs =3D rte_zmalloc_socket(dev->device->name, sizeof(*iovecs), 0, socket_id); @@ -1359,6 +1360,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev, return -1; dev->data->tx_queues[tx_queue_id] =3D &internals->txq[tx_queue_id]; txq =3D dev->data->tx_queues[tx_queue_id]; + txq->out_port =3D dev->data->port_id; + txq->queue_id =3D tx_queue_id; =20 offloads =3D tx_conf->offloads | dev->data->dev_conf.txmode.offloads; txq->csum =3D !!(offloads & diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h index 44e2773..4502e24 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -46,6 +46,7 @@ struct rx_queue { struct rte_mempool *mp; /* Mempool for RX packets */ uint32_t trigger_seen; /* Last seen Rx trigger value */ uint16_t in_port; /* Port ID */ + uint16_t queue_id; /* queue ID*/ int fd; struct pkt_stats stats; /* Stats for this RX queue */ uint16_t nb_rx_desc; /* max number of mbufs available */ @@ -62,6 +63,8 @@ struct tx_queue { uint16_t csum:1; /* Enable checksum offloading */ struct pkt_stats stats; /* Stats for this TX queue */ struct rte_gso_ctx gso_ctx; /* GSO context */ + uint16_t out_port; /* Port ID */ + uint16_t queue_id; /* queue ID*/ }; =20 struct pmd_internals { --=20 2.7.4