From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0056.outbound.protection.outlook.com [104.47.34.56]) by dpdk.org (Postfix) with ESMTP id 41FF329CF for ; Sun, 10 Dec 2017 13:09:57 +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; bh=YOB5x5bAqX3C/8usFwYYE3E4fqV/+IRVQ1BsPpAChzg=; b=FrUfZ6kMhJSbqggt3xwiYas7tSLsBwuq1AP9RzvVR7mA9YmZddfDl+OnNbQ2fvP5VA7bi00N6m+GHxYuzB0fm8Bc4XRKzwCaL3MYjrijuONLeXiOPs2xx8IbHhFA/VNuksYrZJlxHvf7bxmss7lAm3bUoQWuaQWsMOGWD2kzOQE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.104.209) by SN2PR07MB2527.namprd07.prod.outlook.com (2603:10b6:804:6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Sun, 10 Dec 2017 12:09:51 +0000 Date: Sun, 10 Dec 2017 17:39:32 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, dev@dpdk.org Message-ID: <20171210120931.GE11770@jerin> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508330348-30060-5-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1508330348-30060-5-git-send-email-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.104.209] X-ClientProxiedBy: PN1PR0101CA0013.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::23) To SN2PR07MB2527.namprd07.prod.outlook.com (2603:10b6:804:6::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02f04292-ebff-4d63-4aa5-08d53fc6ecef X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:SN2PR07MB2527; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 3:oa1/Nhs1vCSUr2eZ7Xy96BjwfKyasYpgrGQ45kXoDUuueilSiHur6F8U3f99KVD5vgDYUwPkL658h0+X2tUhAs+5DKRVEEGl+FclUsV/UdSGiegIxCm0Pdbu0N2XT8ySzHVTE1+RO2R8+Ur9L8XzcKVjKAGjD18+e49BrTE/aLPZtx5zE25zFKzeD8+lFN7TeAiGqYvASndLebV/SGJi9EFpKq3Pap5JsYqbak7FbZNViaNBKf/hJLzY4Nc6qFZ+; 25:wCrkQ3Legf+5i3PfrAPbd8VO0l7Wk5bCWuAvm1ZeQ6EVNGsCIyBup66DiYUZtnf999VyoI5KU8Jxvk94cnetehBZfdGqc7UfWvMdZfDjbPEJB0MhbUu5NU2DH7+0XjxGOhyMhObsGIvAUfhd+gSbnWXVBJBZJirV1gxf9Fda52Us0/r+W4CRv1Z38VD1Pn9D9oTOiMH15zLP6QArc7jw6b6y8yiWBC91WVJdR7RLJT6mxRzTiRxxn8StU7adyKdj8ig5hgQ7qrBcnsdpj94KT/DtdRVgTeFwfmanoxd9a3EuhlaQ2V9RPh1OzY470OtXuRWMN5QARwJoyLeswMYHZQ==; 31:GEykfClyN+xNDVkI4rWZ11+cdog4vexqgJsM2aJThV0NI2VBShOb0U834o18cvL9viSKxJRdAIdWAKUlCe1Us/rEfcCmG30I9zsW5gAWnHsPZKVwds7fXcUT3+Cu7n1cj3JtAMDtnFPDZ/Lee6opf4BY/EYDwx0G8fm4Q5UxOtjnsz4KIe66kHpjmWq8HZZwVvGylQeW/sRV/cekjeTdKHCcgMUZdR3sHiqC3ttaZS4= X-MS-TrafficTypeDiagnostic: SN2PR07MB2527: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 20:mDoh3a/932pWtS6HuXDnr+YdbxAczWJmH7j+4oqlqANFmGHquejrGM92CPMnjCQc/lLw5/ESpkbhHMStyfAIaZ12lkWJcG2k4s+FQy6npTHOKR2XS3tNFIQbnT7dQK8OTfN2XdY1GPWjvDYposTXr+1K4xemX976gt3Y1d3nJ84hn60aISVcyX+boBUNyLUhmEX2nlUKX6hplFdE9YJQyHbEHcgq6/lEJ6joJ8nSxr1Fk4nZTSKylhbmfcaRPwt6OgZ3RrtB/ewGU5B6X2Do/N6GfkezIrfjdbxRx0PHscYNbt2xf1rGNRh1yZk4Zx3UFHAT28ZjpPbuPfmBKZfbnlZ5au2IZAMKdK48wr3qpPhNZI8qGQ8nu5iwP/PieDlHeJdfMIEj6OsBocpZUI5lRgMXwY/F/zV1t+/TyveU4SodExsR4z0eJnprGpT1vWyi/5XJm2crDe5Eyi0ax9vAPCpHb6oC5J3Tv+XNKzojCo3e4CDxWBvKXU8c35DQKH1YWlhIEcK9MJukPaqC4zcyVh+70YO0NL46IqUt3UDE7DrKkizQUQ2CnOZTd7QOAhwXRSuKupEwn4MnqY86xm8MhmVHGe2lRCppdGJe6InDTiw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(93006095)(3002001)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011); SRVR:SN2PR07MB2527; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN2PR07MB2527; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 4:cTW1SkBX37cA4xqnhPOcKFkWQmb3Shk+XEMMok+LCxFdIkZYqnGpQCVNxBSBNdgTV/vCc32GYqsQpf9re5NYcrk4RNCzdMvNEETFoT3qnfrpIGkpFMetYRLddLlB7yzvFi+YcJyh7VUmuOOFPisCJT538MNXfxDx6K+YuiYomXLjYKKx3DWCSzxmfICJ5aLt5DPoPBKxXAkdkQuqWssjniQpwx7uF20ecxeZNm9FOz9ddm4Xohr4i+Gl9Ie02wbxbuJPo/9y69noIdDlc7fh8qQW0poZdxEIY8dVFJaEDiZCe9ROx5AVY2YVuzXjK+bA5gjKo2eFYL39vzB79ZZg2B7l5RkIUMM/CIs7/vVU39A= X-Forefront-PRVS: 05177D47DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(51234002)(13464003)(199004)(189003)(81156014)(6116002)(229853002)(6246003)(81166006)(6496006)(8676002)(16526018)(8656006)(83506002)(106356001)(105586002)(7736002)(6636002)(305945005)(9686003)(33716001)(2906002)(42882006)(33896004)(33656002)(5660300001)(55016002)(316002)(58126008)(4326008)(53936002)(6862004)(16586007)(6666003)(66066001)(2950100002)(8936002)(47776003)(1076002)(68736007)(52116002)(478600001)(50466002)(76176011)(3846002)(97736004)(23726003)(25786009)(72206003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2527; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2527; 23:ksMdHuq0GEIb0ChsT2iIzmdi5QJh9KFXv0RyhcBlT?= =?us-ascii?Q?sUd/1bR9fFkPOILq9JNPMNZ76Inb87+5eZg+auUh+VwBX0SEUz9euNMydg0p?= =?us-ascii?Q?/hFOvdaMjdAACzFn3A8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xeR5DddvSCwcBoyQRo5Hbo9F7BR4ysw8cox/0FdGqYzyc5W6NFDvOinMbers8jkPlik0Wg4PoKeMtMNiRxnUlsYXuFakdQiJITKazRZUeoV+n53i7vMxRErYKi2W3eyPdrPuEgc/XLA8I33b0tl8OAN2ZEi81jaOhKEqGQ/n+RlmvunlB+rnSytHOqqvS2CLdJyAvL0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2017 12:09:51.9753 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02f04292-ebff-4d63-4aa5-08d53fc6ecef X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2527 Subject: Re: [dpdk-dev] [PATCH 4/8] app/eventdev: add ethernet device setup helpers 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: Sun, 10 Dec 2017 12:09:57 -0000 -----Original Message----- > Date: Wed, 18 Oct 2017 18:09:04 +0530 > From: Pavan Nikhilesh > To: bruce.richardson@intel.com, harry.van.haaren@intel.com, > gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, > nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, > jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [PATCH 4/8] app/eventdev: add ethernet device setup helpers > X-Mailer: git-send-email 2.7.4 > > Add ethernet device setup functions to configure ethdev ports incase > prod_type_ethdev option is enabled. > > Signed-off-by: Pavan Nikhilesh > --- > > +#define NB_RX_DESC 128 > +#define NB_TX_DESC 512 > +int > +perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) > +{ > + uint16_t nb_rx_queues = 1; const ? > + int i; > + int j; > + struct test_perf *t = evt_test_priv(test); > + struct rte_eth_conf port_conf = { > + .rxmode = { > + .mq_mode = ETH_MQ_RX_RSS, > + .max_rx_pkt_len = ETHER_MAX_LEN, > + .split_hdr_size = 0, > + .header_split = 0, > + .hw_ip_checksum = 0, > + .hw_vlan_filter = 0, > + .hw_vlan_strip = 0, > + .hw_vlan_extend = 0, > + .jumbo_frame = 0, > + .hw_strip_crc = 1, > + }, > + .rx_adv_conf = { > + .rss_conf = { > + .rss_key = NULL, > + .rss_hf = ETH_RSS_IP, > + }, > + }, > + }; > + > + if (opt->prod_type == EVT_PROD_TYPE_SYNT) > + return 0; > + > + if (!rte_eth_dev_count()) { > + evt_err("No ethernet ports found.\n"); > + return -ENODEV; > + } > + > + for (i = 0; i < rte_eth_dev_count(); i++) { > + > + if (rte_eth_dev_configure(i, nb_rx_queues, nb_rx_queues, > + &port_conf) > + < 0) { > + evt_err("Failed to configure eth port [%d]\n", i); > + return -EINVAL; > + } > + > + for (j = 0; j < nb_rx_queues; j++) { > + if (rte_eth_rx_queue_setup(i, j, NB_RX_DESC, > + rte_socket_id(), NULL, t->pool) < 0) { > + evt_err("Failed to setup eth port [%d]" > + " rx_queue: %d." > + " Using synthetic producer\n", - The "\n" is not required as evt_err already has "\n" - Please change to "Using ethdev Rx adapter producer " instead of "Using synthetic producer" > + i, j); > + return -EINVAL; > + } > + if (rte_eth_tx_queue_setup(i, j, NB_TX_DESC, > + rte_socket_id(), NULL) < 0) { > + evt_err("Failed to setup eth port [%d]" > + " tx_queue: %d." > + " Using synthetic producer\n", > + i, j); > + return -EINVAL; > + } > + } > + > + rte_eth_promiscuous_enable(i); > + } > + > + return 0; > +} With above changes, Acked-by: Jerin Jacob