From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-eopbgr800049.outbound.protection.outlook.com [40.107.80.49]) by dpdk.org (Postfix) with ESMTP id B3DE61B4D7 for ; Sat, 1 Dec 2018 15:22:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fn4lTh1SdD+DM4WfDT8n84qYP5z1GPqwR3uMwvyybq0=; b=AAWvJ4UMrTTwL+8yuX+NaM3uRdb+/WZx17q6L58FV41H9BFSiNGfnKLlLFdSfTMsRYML243yiUp+W8svdRKYMJ5mfYiRsCePhX0wCrWvJA1tmElE8uXv5DAV4B1XU2POFo69wdNTeqP0aCmBVa1Uc4WXohfjILUs3UDVRIjwMw0= Received: from BYAPR07MB4997.namprd07.prod.outlook.com (52.135.238.214) by BYAPR07MB5784.namprd07.prod.outlook.com (20.178.0.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Sat, 1 Dec 2018 14:22:48 +0000 Received: from BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::9d3a:7709:b7e5:8ccf]) by BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::9d3a:7709:b7e5:8ccf%2]) with mapi id 15.20.1382.020; Sat, 1 Dec 2018 14:22:48 +0000 From: Jerin Jacob To: Jasvinder Singh CC: "dev@dpdk.org" , "cristian.dumitrescu@intel.com" , Reshma Pattan , "nikhil.rao@intel.com" Thread-Topic: [dpdk-dev] [PATCH] mbuf: implement generic format for sched field Thread-Index: AQHUg002IjKeQ58QiE+gVfdj/2qrFaVp/AQA Date: Sat, 1 Dec 2018 14:22:48 +0000 Message-ID: <20181201142237.GB17147@jerin> References: <20181123165423.134922-1-jasvinder.singh@intel.com> In-Reply-To: <20181123165423.134922-1-jasvinder.singh@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.178.219.219] x-clientproxiedby: SG2PR06CA0194.apcprd06.prod.outlook.com (2603:1096:4:1::26) To BYAPR07MB4997.namprd07.prod.outlook.com (2603:10b6:a03:5b::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB5784; 6:ivzUyAs1ALYzzuC6l1/yYrX8Hw1e0rYUWHVeCL2QvAzlC6ZM7t06tNi5RHUHWZRl/e8pU6UkgTntLpocUoEn+76TtUuP5ZDYTdkTh+UxJURH5PE8GbWVekp/fLAQUQo5LNDDLa7dBBfwcAX59EyDHTsmIcIzxZEnBbVFh/pVIzFS+50YyTI+IoEqe3v2/PvVpJkPE0M9s8hNgLMqu4u8qli1DktbJzEA5y39AJe7QanPjeO/BFFtzzXueg0oXedLeA7knNdVggKxvHa/HmGI2xp7zQrXJwBcoADj4wUX3UjkmH3kji6TNXO5aQPfecKMryYz4hRGbN4ZqtrJqCGKz83ktOJNaIGyJJSIEF0csP3APk0gEfFDVlUlAQFt8Yn6V6Nfqv+IDccurpiRxapGp1RPekzAEGrrC5f3yPhXoF1mT114ZHMPaY3ubwBfHqj12Gaw+E+r0MnINQRC+dw2HQ==; 5:ZzbaPKp18f4ZDpVjUGYnEfjtNgH+VrwmElTV8KdNyb3sPo0aZGI8ZSEnF7Z7kV6b1uzqDCjkI9yPVwO/t6wKij5xLd35o6G0Z8LxMJ2uDfsxq8s/QtCG+fxvYRyNUMhOXqQA4TB2Kb4OxKnFOibTuerrSmfCU+45Xv2lUOVBI24=; 7:/oKuIJgHUIPSsk8PmWYM2HcpAgudumwpDeCtfdOxWCANGW0BaG1Qei5MjFzz8ZlrWSr4bhP1S9gi6hUU841wT7/KSoWzDTxG6JakYwgOpE/0vzm/+WaTDzo+9WFj7c/ZKYjeUBBWl+2zSuUe7DXWrw== x-ms-office365-filtering-correlation-id: 2da18b0f-35e4-46e7-ff96-08d6579877fb x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB5784; x-ms-traffictypediagnostic: BYAPR07MB5784: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(3231454)(999002)(944501477)(4982022)(52105112)(10201501046)(148016)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:BYAPR07MB5784; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB5784; x-forefront-prvs: 087396016C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(396003)(39860400002)(136003)(376002)(346002)(366004)(199004)(189003)(13464003)(76176011)(52116002)(99286004)(33656002)(478600001)(6246003)(256004)(486006)(446003)(106356001)(105586002)(5660300001)(966005)(72206003)(11346002)(476003)(6306002)(6512007)(54906003)(316002)(8936002)(42882007)(26005)(9686003)(6506007)(33896004)(386003)(186003)(102836004)(4326008)(68736007)(25786009)(14454004)(81156014)(81166006)(8676002)(53936002)(3846002)(6916009)(97736004)(71190400001)(71200400001)(6116002)(6436002)(6486002)(2906002)(229853002)(33716001)(7736002)(305945005)(66066001)(1076002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB5784; H:BYAPR07MB4997.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: txRDDJw9a5sR+0BOc+xjQ4WSAsF3cEHLy9GwNLYSGyDHqXd4lVDqy8dT+GZI9gG8l8MjovscXeSiElmbtznJHAE7T6XUjyOdRyjHPGbJgqpyKZCeb3XQ6XBM8dF3b3QBRGqqgLIvwx1ledZg3pZFC5Tf8ElVcA0ibntiEzgCzno9vPwe5yC8+u92EfBjeSYj4kVZVDrDYBNhy6LXlmbD0fAPooZ5B0R+z8bwBXnnU2nqeWP8rO4Sl8GTeV2thWHiW/fPWGK7KcQHJYGSzHlx32X3Yzduh97UcK20QPaxSZ5S12uwcpfb8BV4MmMGW6JwysQwZPgu6iHRB3VKzjefSlJtP+LsSbIjduBkLvDHStg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <0B92333B8C5173498346A89E486E28BF@namprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2da18b0f-35e4-46e7-ff96-08d6579877fb X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2018 14:22:48.2278 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5784 Subject: Re: [dpdk-dev] [PATCH] mbuf: implement generic format for sched field 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: Sat, 01 Dec 2018 14:22:52 -0000 -----Original Message----- > Date: Fri, 23 Nov 2018 16:54:23 +0000 > From: Jasvinder Singh > To: dev@dpdk.org > CC: cristian.dumitrescu@intel.com, Reshma Pattan > Subject: [dpdk-dev] [PATCH] mbuf: implement generic format for sched fiel= d > X-Mailer: git-send-email 2.17.1 >=20 > This patch implements the changes proposed in the deprecation > notes [1][2]. >=20 > The opaque mbuf->hash.sched field is updated to support generic > definition in line with the ethdev TM and MTR APIs. The new generic > format contains: queue ID, traffic class, color. >=20 > In addtion, following API functions of the sched library have > been modified with an additional parameter of type struct > rte_sched_port to accomodate the changes made to mbuf sched field. > (i) rte_sched_port_pkt_write() > (ii) rte_sched_port_pkt_read() >=20 > The other libraries, sample applications and tests which use mbuf > sched field have been updated as well. >=20 > [1] http://mails.dpdk.org/archives/dev/2018-February/090651.html > [2] https://mails.dpdk.org/archives/dev/2018-November/119051.html >=20 > Signed-off-by: Jasvinder Singh > Signed-off-by: Reshma Pattan > --- > @@ -575,12 +575,10 @@ struct rte_mbuf { > */ > } fdir; /**< Filter identifier if FDIR enabled */ > struct { > - uint32_t lo; > - uint32_t hi; > - /**< The event eth Tx adapter uses this f= ield > - * to store Tx queue id. > - * @see rte_event_eth_tx_adapter_txq_set(= ) > - */ > + uint32_t queue_id; /**< Queue ID. */ > + uint8_t traffic_class; /**< Traffic cla= ss ID. */ > + uint8_t color; /**< Color. */ > + uint16_t reserved; /**< Reserved. */ > } sched; /**< Hierarchical scheduler */ +Nikhil. Currently rte_event_eth_tx_adapter_txq_set() and rte_event_eth_tx_adapter_txq_get() implemented using hash.sched.queue_id. How about moving out from "sched" to "txadapter"? Something like below, $ git diff diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 3dbc6695e..b73bbef93 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -575,13 +575,20 @@ struct rte_mbuf { */ } fdir; /**< Filter identifier if FDIR enabled */ struct { - uint32_t lo; - uint32_t hi; + uint32_t queue_id; /**< Queue ID. */ + uint8_t traffic_class; /**< Traffic class= ID. */ + uint8_t color; /**< Color. */ + uint16_t reserved; /**< Reserved. */ + } sched; /**< Hierarchical scheduler */ + struct { + uint32_t reserved1; + uint16_t reserved2; + uint16_t txq; /**< The event eth Tx adapter uses this fie= ld * to store Tx queue id. * @see rte_event_eth_tx_adapter_txq_set() */ - } sched; /**< Hierarchical scheduler */ + } txadapter; /**< Eventdev ethdev Tx adapter */ /**< User defined tags. See rte_distributor_process= () */ uint32_t usr; } hash; /**< hash information */ > rte_event_eth_tx_adapter_txq_set(struct rte_mbuf *pkt, uint16_t queue) > { > - uint16_t *p =3D (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p =3D (uint16_t *)&pkt->hash.sched.queue_id; > p[1] =3D queue; > } >=20 > @@ -320,7 +320,7 @@ rte_event_eth_tx_adapter_txq_set(struct rte_mbuf *pkt= , uint16_t queue) > static __rte_always_inline uint16_t __rte_experimental > rte_event_eth_tx_adapter_txq_get(struct rte_mbuf *pkt) > { > - uint16_t *p =3D (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p =3D (uint16_t *)&pkt->hash.sched.queue_id; > return p[1]; > } >=20