From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0063.outbound.protection.outlook.com [104.47.37.63]) by dpdk.org (Postfix) with ESMTP id 94A132BD3 for ; Wed, 19 Sep 2018 12:42:34 +0200 (CEST) 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=h8Gzrz4phBGWQ5c/vd+R18/DIDztGJQIAR5ywplVM/k=; b=D9gOfuVHJ44TVd7oiIxkuk4i65Jn7LTWb8ZWBnX0pkl8vjoOK9BsPKVG15h9tGFawuNN5UCM62jCrw6UXjWNAqmtvdQiWm5+UGItNoLdIIoGSrVXt41z76yysZL2RZKX1MxdmhSTbrOUDxLj4D7qZBLwP5U7Cht5ThCAlzcCTHk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn (111.93.218.67) by SN6PR07MB4975.namprd07.prod.outlook.com (2603:10b6:805:ac::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.14; Wed, 19 Sep 2018 10:42:30 +0000 Date: Wed, 19 Sep 2018 16:12:10 +0530 From: Pavan Nikhilesh To: "Rao, Nikhil" , jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org Message-ID: <20180919104116.GA17244@ltp-pvn> References: <20180905134554.25243-1-pbhagavatula@caviumnetworks.com> <2913f7a3-b531-ce60-d6fd-3585e8c85288@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2913f7a3-b531-ce60-d6fd-3585e8c85288@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::24) To SN6PR07MB4975.namprd07.prod.outlook.com (2603:10b6:805:ac::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8447b8be-43ae-416a-ce84-08d61e1c9b04 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4975; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4975; 3:TYq4ojdv/kmlq9T8co6XEkDECmc3y+Im16wWa5Zo3n8h4hXKJO18Lzf1Wye3d49Etz4DAtTCPG+/YirFIocDdZ6V67RDeDk59R5uD9sG8TqeTQJekLpJlqk7Hh5YFqCBn6ZCWjX+ea6fyX9jUkKWgHWsXjziDCCnSzhaN1b5/Lj0bcBEDA+LI5CqRn5zbaRH8lNVJ65y8PR/DOnwvS65CaSPWfwaHD+a9TEUYoVCz4DS/CT36E4G0c8h0hca6lxK; 25:sRuPfs6B6/Uw0XEOBPzMAjKvNPnyv94KOrz7Ujn4Kkr1mbiQA54BdRkx0E4OvTWmlVzRGrqiukvyxM0RoF1hjWsvnIGVoPFqAEMAe4vdscpujrEz/Kai1gbzxWLUejEk+gvd6mSDVisvGe9o/sTULYO1azBGCo87TeSiPqFeeZPJsA/gk6rwHJbxuYGMGAJ+7qnehxSklwQAoi/HxQ5VQBi/jbAGp00ZmgyROQvbkZIL9GALDFE6VF1VYvy39o6BgwEo/Fai5Obx/3BDfwZvnsiVo7WI1ncQI3guh+fSpM7vGCuY2hkiNRVrUd2z4MwtI0LX4whK6KlHDKCefoySJA==; 31:ndbJHtKuUVLEnvmuH7rQEBe6VJXUxDNJg3UpISlXmUHYc8GiGizzW2CLGEC6wWkK+6bq0oj4MeQ5mj3xFGFev0SKxoYzIvAWmMEd0SOWKMOrVyw7GblYevxJRmXWl3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IupDRpJEdSq6+qhRTi0K2YMw2nY67wVL5J4wCLatVBR67Pg6s4bh8zf8xmBF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(3231355)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050); SRVR:SN6PR07MB4975; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4975; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(376002)(346002)(136003)(199004)(189003)(956004)(11346002)(23726003)(966005)(72206003)(33896004)(486006)(2906002)(5660300001)(478600001)(33656002)(3846002)(76176011)(6116002)(33716001)(25786009)(476003)(6636002)(16526019)(52116002)(97736004)(42882007)(446003)(5009440100003)(386003)(8936002)(6666003)(81156014)(55016002)(9686003)(6246003)(8676002)(81166006)(68736007)(6306002)(1076002)(26005)(4326008)(50466002)(305945005)(16586007)(58126008)(105586002)(229853002)(66066001)(106356001)(53936002)(7736002)(6496006)(47776003)(186003)(53546011)(316002)(14444005)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4975; H:ltp-pvn; 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-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB4975; 23:x+pgJmSFnrMT0l+FWW7ECS7HKtgQ3M5ssr80E2kOT?= =?us-ascii?Q?3liHKIjAWDryDeFAUIMmOLXjMb/Ib+9mgAfQjfefy5Xg9LhzgDHm9RDMIvDq?= =?us-ascii?Q?E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qdw+rlbuvGLuQHafBIvnNnViyUStSvKNaNLFbFl8lh5zEOFHZDTgxfJFw9ltQZKgqapNqCgZI+vUavzq+hQ0vyV8dj3P+u3SI15sW/2StLlfk7QN2+zexO+6kmdJCtpfBb7lFj1UoZC+H34McJG/NezvlMvGbu5I+nBsk3jWx8bgGOVYCzF8iTpEPIz7bJ8bd14uo05553zI/5lTqwj7if1wycIiPWp6cBhv71Zr8tc5DpAV76PrHTJSue28riXdhoighnJuAu/VH6Qr2fHduk0sSt3NeRmxsygbSYQZ6utdjLEus/rZcb3oEv/CRVukdYL6rj4NkyEQ6mjTFkP+w9ofNdptgQ+2lROBEHSAV7YCfJDjTnlAxKn2+bwG5bs1fAPbKV4N81yttM0A==; 5:OjMuBtDp5c/LjcRDBuC579hwwFfKeW/mYVPlwGqXrhyu8eoHIP0a94+cy+M6/N1b6/4TJUyu7tGpT58fqxu8zqavNPsW5ij6coob3a8puC9+0cHbcK/EtK5qINSl/U2yKUzhe+rE5OArDyA3UnC+Rm+hyHkk7R4j8i//kyHGDNk=; 7:D8kZtoRSTCyRtK/MFV4rzO3fQc9RjrQQ98bQj5qtdYIikfpBsF/nqTQ7mZeDaaVPYXqmIMv5f8lvTK1wpsKaw6W06LKHXsviPwCHamnOiYXjFNDxqpG1mwUqF5fesTUpyhltAxiKNlq6+hPdylrNjIN04wZm6x9utd/tB8BPpwMEECWWncXeSRu1bwN1adhstzeLsKj0MrWZORMd7DRlo4xoVJtfhee39YhkCMmNFsojSGzmcVMjNAy1+b1lSa6B SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 10:42:30.9767 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8447b8be-43ae-416a-ce84-08d61e1c9b04 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4975 Subject: Re: [dpdk-dev] [PATCH] examples/eventdev_pipeline: add Tx adapter support 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, 19 Sep 2018 10:42:35 -0000 On Wed, Sep 19, 2018 at 08:24:01AM +0530, Rao, Nikhil wrote: > On 9/5/2018 7:15 PM, Pavan Nikhilesh wrote: > > Signed-off-by: Pavan Nikhilesh > > --- > > This patch depends on the following series: > > http://patches.dpdk.org/project/dpdk/list/?series=1121 > > > > examples/eventdev_pipeline/main.c | 62 ++-- > > examples/eventdev_pipeline/pipeline_common.h | 31 +- > > .../pipeline_worker_generic.c | 273 +++++------------- > > .../eventdev_pipeline/pipeline_worker_tx.c | 130 +++++---- > > 4 files changed, 186 insertions(+), 310 deletions(-) > > > > diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c > > index 700bc696f..95531150b 100644 > > --- a/examples/eventdev_pipeline/main.c > > +++ b/examples/eventdev_pipeline/main.c > > > > > > > > static void > > do_capability_setup(uint8_t eventdev_id) > > { > > + int ret; > > uint16_t i; > > - uint8_t mt_unsafe = 0; > > + uint8_t generic_pipeline = 0; > > uint8_t burst = 0; > > > > RTE_ETH_FOREACH_DEV(i) { > > - struct rte_eth_dev_info dev_info; > > - memset(&dev_info, 0, sizeof(struct rte_eth_dev_info)); > > - > > - rte_eth_dev_info_get(i, &dev_info); > > - /* Check if it is safe ask worker to tx. */ > > - mt_unsafe |= !(dev_info.tx_offload_capa & > > - DEV_TX_OFFLOAD_MT_LOCKFREE); > > + uint32_t caps = 0; > > + > > + ret = rte_event_eth_tx_adapter_caps_get(eventdev_id, i, &caps); > > + if (ret) > > + rte_exit(EXIT_FAILURE, > > + "Invalid capability for Tx adptr port %d\n", i); > > + generic_pipeline |= !(caps & > > + RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT); > > } > > > > struct rte_event_dev_info eventdev_info; > > @@ -406,10 +386,10 @@ do_capability_setup(uint8_t eventdev_id) > > burst = eventdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE ? 1 : > > 0; > > > > - if (mt_unsafe) > > + if (generic_pipeline) > > set_worker_generic_setup_data(&fdata->cap, burst); > > else > > - set_worker_tx_setup_data(&fdata->cap, burst); > > + set_worker_tx_enq_setup_data(&fdata->cap, burst); > > } > > The generic_pipeline flag is set here and therefore, aren't the > subsequent checks in generic_opt_check() and worker_tx_enq_opt_check() > redundant ? The checks inside generic_opt_check, worker_tx_enq_opt_check are still required as different eventdevs opdl, DSW, dpaa, sw, octeontx might have different capabilities. The generic_pipeline flag is just used to decide the pipeline to use based on the ethdev connected to eventdev. The original idea was to have support to add different pipelines based on combination of capability between eventdev and ethdev. > > Thanks, > Nikhil Regards, Pavan.