From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7A3FFA0096 for ; Mon, 3 Jun 2019 19:36:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E1B31B9A4; Mon, 3 Jun 2019 19:35:15 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 47E5F1B95C for ; Mon, 3 Jun 2019 19:35:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x53HKMDI027514; Mon, 3 Jun 2019 10:35:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=E3ev3AvElfboEiqrvDBdi+qfor18/eygGMsaudqEsr0=; b=bTcj2k6KAzMtnU7hg/+nz65mndHrKKmnEIWjMuTeTV5DBKMnknFqowTu2WOAdgNWQyFy AeOc7YqwCHvu47gPdZDurDGJRogey9pYCcsLSdLbiY56s7IdlSaFyOEwFY2zE1k1XRRb U0FXCanVGr8z5/rvQze6mP2ekqLSV2lnBMAyZD+G00bZwFjjSeiLdY1XahW6uKFrf4SR 5klQKesqmPQRrsDxUW65K3YVpCXN8B8/B9co+k5Lk/Zb1MUOy1IsLEpW35c5WQ6ATxtm G0b3RLhMZ9+eHv20Zb0rVB0zfM1PKtlFaIIAvjKzwmS8l7oorCdFW5WHr6Tqpu8IQYyx 0g== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2sw79pr6vg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2019 10:35:13 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 3 Jun 2019 10:35:01 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 3 Jun 2019 10:35:01 -0700 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56]) by maili.marvell.com (Postfix) with ESMTP id 42F333F703F; Mon, 3 Jun 2019 10:34:57 -0700 (PDT) From: Anoob Joseph To: Jerin Jacob , Nikhil Rao , "Erik Gabriel Carrillo" , Abhinandan Gujjar , Bruce Richardson , Pablo de Lara CC: Anoob Joseph , Narayana Prasad , , Lukasz Bartosik , Pavan Nikhilesh , Hemant Agrawal , "Nipun Gupta" , Harry van Haaren , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Liang Ma Date: Mon, 3 Jun 2019 23:02:17 +0530 Message-ID: <1559583160-13944-18-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559583160-13944-1-git-send-email-anoobj@marvell.com> References: <1559583160-13944-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-03_13:, , signatures=0 Subject: [dpdk-dev] [PATCH 17/39] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Lukasz Bartosik --- lib/librte_eventdev/rte_eventmode_helper.c | 3 +++ lib/librte_eventdev/rte_eventmode_helper.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c index 8119306..dc2c934 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 2a0cb30..77e69d0 100644 --- a/lib/librte_eventdev/rte_eventmode_helper.h +++ b/lib/librte_eventdev/rte_eventmode_helper.h @@ -8,6 +8,7 @@ extern "C" { #endif +#include #include /* Packet transfer mode of the application */ @@ -19,6 +20,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