From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0069.outbound.protection.outlook.com [104.47.42.69]) by dpdk.org (Postfix) with ESMTP id 9BD601BB76 for ; Fri, 8 Jun 2018 19:25:14 +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=JWpAsz3HPqePWDRr2dbPJUwM2YS0wrWPK1hMklGxznc=; b=AQoykJtLPVuVxb2tX5i1zKyZFKcsUGOSLQ3lDqT43TWF+aOQ9Hf38Q2ReXh6iagqkbiPosVl6r7DrrFc+dvkKvTV9chTRFsvXnx3zEycGv+4OSYjQ09ZKpPzFc0PPohTyrfbylgfwvFlOf5iZu7CxAQU/Neq15gAlOMEm0Glwew= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Fri, 8 Jun 2018 17:25:10 +0000 From: Anoob Joseph To: Bruce Richardson , Jerin Jacob , Pablo de Lara Cc: Anoob Joseph , Hemant Agrawal , Narayana Prasad , Nikhil Rao , Pavan Nikhilesh , Sunil Kumar Kori , dev@dpdk.org Date: Fri, 8 Jun 2018 22:54:03 +0530 Message-Id: <1528478659-15859-5-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BM1PR0101CA0050.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::12) To DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4906; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 3:pHgISTgCm+sjw1GpX4ZpmLoMR4Htgp1YbYVaN5qSMnv4nS29ZZ/+w4rHWcOGDLr1h/STQNH66+6D0s5HfNHHeiEZZ59yFqPcuzUwKS28y3ONZQTGAGqE6QTTcWHrP/a3qMbF4o9r2/nV8cCkVPTnHjMPn3cu2S7+BJ+v4x4mRwDWj8yc0kt+BaNjjEbRKvhBfRHm6jTUjgBWbt9Etf9PBenuLgHpuNf3SMkQjOPZJSkpOLCFo535vGepwgBWltjD; 25:nZUeQ+aeaAZaVFpB8ZQ9e1eXL19vkpxjS5PNP1ceLg9HNtR1uB+OHrIobaV3ztMzPd8Tq8FtZkuRP9v+5+eqQxNe/08V8AHhsDouYzjqh3rqnCSK4pUW8gBTzUu4HcFI8TBv6Z7Tng5+Wp7RJ2I9n6PmOMOQjTPfETdEINR5AXlXDYdpCCwexCf5GjdtsygDS2dF1FUv6cNw5iBO779H/MH+Wt/RwKcXYK88PzAfocmkHOYpAO3x9oPteSWQNgVplvLoqaHWddFr1FlPG2VvJApBD3H6HH1x3PuHuq9CFjN0r2mL5NbOOZqW3t9fW6by+MRXFZxgHKjkzA74myU+yw==; 31:m1UfOv823xFM57p5ZsiEFRr+Tew6mfDav01NshYGkBN6VWXJX1briIBxovbbowS1eWxZ9RQvM2/znF4WDmSb02fxVLxBj/ogDxFOs6iOMPoxLzJ2cyKXeb7BAMgzNTFda3Yc2tcnO9TLQz6asjU/6bJ4R+DdjG6xHysQ82AC9PbzJIYIQ1Rijo69zJFjHN9acja8s/0tcNPj9z1HrGG69VbJyeHp1wUNG0tE/Rkl7FQ= X-MS-TrafficTypeDiagnostic: DM6PR07MB4906: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 20:bIX3zV++8hyzXem0VspjLBdLS+uktFg5TsIgQ8h5AeHuz5KtLMslhjO6MYu5AGrTAnO4I2CObLZN8AmTLHKVnDDslgUvdaYbNn+57A2sNjppc4q4eMQL4SG7HqKtuvj66UHiwSlZq6hrRYsI4aqz8x6na5eosdM4ywxP6J2xmNQgaJzuT18Ld52z+j0unPxZHItnWRxUoqbASeTCGsTxEnxHVO+ve5o/qwlAzlzo4jk4SHta3WfwllKz1lcJy8IPrGSluQTvRhvHkj1rppM09dIA2BWLmQG+dldvIFlblxny3Sw8ktnSLd4epCuLCrNrOINhnK49qHbHX5f6TmVvZKmdtwO+gr0Sf65u1ZRp2XInqLQIWRdDD551guRpfIK3zzfZ9Gz2AyFtRipJdF6UdOTs+pKmrr5tPvQ7EtmfTp37rdnBqbvdNvJ2lacrqdC1s8WHYdY0Zx8/0yyoTzlN1ItBv17MseLZxG7SpvlvdUhXQhUPyzWT8JFMNaPahg4CmSC9mHxOvMaTeGPrcR0bLuk7JOz6Tl/rdqCGxKn7p1j3wrE6C94vY7b1Jdf/b7Rn2UKVRTlHvwnuRr9yaqjx/e54V2g+ydqpHj9Lq2LXW+M=; 4:8CwounibWqE6/jGpvGvT0SAI7aS7h1gCxcWbVVnwiSsWyr6TpN/du8vAP16H8ISA5+gA64Y3ivfsBh00AlTNMrH9WbH7CKwXVj9Vg3Fx3M41sxl1En9bWv5Mwa8VADZNqJ1Z9c5hpkeeAVqBPRdhYtXac5uu1/RcQftILC55GFIxDteW1/cN3GILbVGs0KREjXUZYr0KxEobcpkyrrVwcERdaQws/7lVkdi/aaeIc1ii55ZkiVQlPGHPkNdKcRkLbRnWzvN4k/mHYtFK19Antg== 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)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4906; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4906; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(189003)(199004)(186003)(16526019)(5660300001)(26005)(42882007)(55236004)(66066001)(47776003)(68736007)(6666003)(305945005)(2906002)(8676002)(7736002)(8936002)(36756003)(52116002)(2616005)(956004)(476003)(446003)(50226002)(575784001)(81166006)(11346002)(44832011)(6506007)(386003)(486006)(76176011)(51416003)(48376002)(50466002)(97736004)(316002)(6512007)(25786009)(53936002)(6486002)(81156014)(4326008)(3846002)(6116002)(16586007)(54906003)(110136005)(105586002)(106356001)(72206003)(478600001)(8656006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4906; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4906; 23:ruYp955hv2/K6bGBQL8eMzqkMK5Yb8E6Mtrf9ltUE?= =?us-ascii?Q?MX7MieEcb8mMlaaHp0GJ1nvrzMHeqTbU2+ZD9VbU28z3lyemjCMJs5OOwjcC?= =?us-ascii?Q?3QsN9qHPRt85MBC2Dz66hb3+iDG8eKX1ji3F//l1OHparyn8nx/WqS+9w0n1?= =?us-ascii?Q?lA6Xm2mL17lsYEF57OMRPkdM3K+5xHW3GOo+YNAN5YQHU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UiWjRusiBlwNoW6IVLQ3rMNry5nz3F8B1zDtVBDBi2cTenGa9H9X3evI9OSSi+3/ceONJzZtPLPpoqPXBY4VFhJDTqljbRujxVljIZZFkRBeENGzaXxHDjY9S4GgANENL9E=; 24:cHFy+uLqAU8wKnfK8LMWaNoVPkGxrDrAfRWLGBxqFJUNkhXV2nWHFqEx52nF1IRtJn9Qq72HfYtXXc8IlW4muqSaqYeik05sA+/FmnSk5J4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 7:UFJE6Ca1fxkjsfu27CeVRUNaoQG/eoXy1i7hEuBonPFvmRmzqGnnsBwznEs1UlcOUsZTdAql2TVOmGDHgUqNrU+QTClknJPeech1qElWBS+GZzX0VEzn88U+MmGuifpKat3bajQSSRAw4eQ6VjTTQ2xMT5Ki4HAtoiG3K+2mPVBnGxKW7vOkqSLiPgoZri3Rv3LKHpI+257+aDRUec9Rl0oxJT97MCaXq9pK0eTZTRI3RCq1iwR7ANYWgAP6+sNr X-MS-Office365-Filtering-Correlation-Id: 3a45b923-17b0-4adc-e247-08d5cd64cb64 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:25:10.7634 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a45b923-17b0-4adc-e247-08d5cd64cb64 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4906 Subject: [dpdk-dev] [PATCH 04/20] eventdev: allow application to set ethernet portmask 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: Fri, 08 Jun 2018 17:25:15 -0000 Application would be required to restrict helper functions to use only certain ports. The field eth_portmask field in the conf could be used for this. Signed-off-by: Anoob Joseph --- lib/librte_eventdev/rte_eventmode_helper.c | 3 +++ lib/librte_eventdev/rte_eventmode_helper.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c index 14ea493..9282682 100644 --- a/lib/librte_eventdev/rte_eventmode_helper.c +++ b/lib/librte_eventdev/rte_eventmode_helper.c @@ -87,6 +87,9 @@ em_initialize_helper_conf(struct rte_eventmode_helper_conf *conf) /* Packet transfer mode: poll */ conf->mode = RTE_EVENTMODE_HELPER_PKT_TRANSFER_MODE_POLL; + + /* Keep all ethernet ports enabled by default */ + conf->eth_portmask = -1; } struct rte_eventmode_helper_conf * diff --git a/lib/librte_eventdev/rte_eventmode_helper.h b/lib/librte_eventdev/rte_eventmode_helper.h index bfe4fa9..7500f0c 100644 --- a/lib/librte_eventdev/rte_eventmode_helper.h +++ b/lib/librte_eventdev/rte_eventmode_helper.h @@ -4,6 +4,8 @@ #ifndef _RTE_EVENTMODE_HELPER_H_ #define _RTE_EVENTMODE_HELPER_H_ +#include + /* Packet transfer mode of the application */ enum rte_eventmode_helper_pkt_transfer_mode { RTE_EVENTMODE_HELPER_PKT_TRANSFER_MODE_POLL = 0, @@ -13,6 +15,11 @@ enum rte_eventmode_helper_pkt_transfer_mode { struct rte_eventmode_helper_conf { enum rte_eventmode_helper_pkt_transfer_mode mode; /**< Packet transfer mode of the application */ + uint32_t eth_portmask; + /**< + * Mask of the eth ports to be used. This portmask would be + * checked while initializing devices using helper routines. + */ void *mode_params; /**< Mode specific parameters */ }; -- 2.7.4