From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0060.outbound.protection.outlook.com [157.56.111.60]) by dpdk.org (Postfix) with ESMTP id 46F3BCF43 for ; Fri, 17 Jun 2016 15:31:33 +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; bh=+gxKxdngSDwdHflDku05teluYk2JmhIfDMc6zJlY8co=; b=fqUaJF6I67iIoxpr+h4s6XZOL+C771lUVCMi+9in9o5nzTRev8yYzfxKFR/Ol07D+KSWo9jZSjO8fqBjxyKltfTIPuSZTDF/re2GBcTIsfWQ/mAucGeEPLuK2Q0vBqIdIs1Ve5+jxMZ71pC/vqfUCjZWWHYoie8LmTkSY3Pf6GU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (171.48.17.70) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (TLS) id 15.1.517.8; Fri, 17 Jun 2016 13:31:28 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Date: Fri, 17 Jun 2016 18:59:38 +0530 Message-ID: <1466170194-28393-12-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1465931200-23912-1-git-send-email-jerin.jacob@caviumnetworks.com> <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.48.17.70] X-ClientProxiedBy: BM1PR01CA0028.INDPRD01.PROD.OUTLOOK.COM (10.163.198.163) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: 6e667883-0c4b-45d7-b0f4-08d396b3b22c X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:KGMiMBFf9FFpb3EZU9YsHoqvhidCrZVt2VjjZw7/loTfv5oBLB1mejaM3kIHsA+6ab2wq5YNLWkxaSOSrQHTiI14TrOhaWVdYosNtddoaXw5Pb/DDRrmXMMK7xGrdmWBv+D6FdfTX1OBl9ZhsCIqhAbtu8RPM4To0wDwj6h5Ok05hK+4D9eMXdOOwr8kt8iZ; 3:xLuqStfsRDIOXcgliWsaT/p/lj/havvM8cu79of6FqFuqs3CgepvqEGuvlYCr/rYWSzdqipR2dI+lyIIBB1nUNJRm1yha/9A3uN6aEZi6guL7kekr+tGAoxo6rUHyWOZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 25:kqZYEhUd1gIzrO6v/MhAOCfGJlNI1kBzv+Ybxyhokjgks4CpUVvyMa5npupAOmkgeeQKTMs7MxcVLSpqQGD5d19hAy7YXhWZEb+ZiiH9Q6aU12EZHSDL/qx7tMYHKNN9u+whZElsLW9kNGW15QQbCvEQB34btLdUHqfUU1IUtLsqHvHXp0/uw+6ErfTjzd7ky++v2tJUB9RBjMBsAqqDtXMZWrYyFqDUR6I+jR26DfSjFcXoghNQRW5oWWK6UcYK/hLXicaCgJGMuemtcKDzwU0HJ4J42pYi3StTMG9EmknI5poF8PfEtu1IN6g9zjhin0WdxQYAIiKHh/LYJB8gEG1ILPP3Cm69AkFw2+iiHl5vgGkOy3sDwKyYAiglJHFqkwfpKduRYdNRWcO3dZjpWlTF+i6WJXmD/jqU/r685UaxcwaTOBEuLXboWq4vmEH+OVfXtjrtvw7K/jCBLGS0EUMM44nttf+6I3mgJOqoBEwLZdofMLhjSZK4nF9zFduc4bPwr2wrKi50S+SkGOo4Tzv0BhNmKQhPtRZ0eyJLx4FXI72jsRSpST1Il09nwLZIkbMOMUKX76UDWqSy2Qr6z9KVUfcp/FT8nfFIz7GWhl+jekW8PzKGbX7LYhypNJ+l6MGa354yxqSv+DKIqYzSEbrZJgm7yYmDZbWTzyyJJKeDPdO+sOLxhgXazJxhcsykhzBdlhVlwGIHjmNc5lbLH/QBrduU9X61fO7kt36SsTXXLEvfCMMjwp0uMJ0JlQQL X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 20:vZFY3m3WE0fgh99ho9beEXW4av+iHKaAQ8TV9a41RTPwsz8Ks12ag4DVUbfwVV3LVPy/LsjeL1FwP1egu5s8UHLWEYRoBRopuRn2c8N6Mi1lE3lVWqpwq63gDITv5Mp/3Jbo9G+HF9i3j3GAOQv/M7YhfRFgJTOS3JhoLz4a1x2VBx+kq5/miFhTtUFKRgZQQnw3lnw+M083O76LunfJPHBoPWMVtYvkVPKLU+vI7AYsJb8jbjZCiFziB5gMZf/c7PTOuVu0AGyDnNGEaNU4zyyUsL31nfd8XfQzquXLzWafMpv6tv8GuNyPih6Tjgh1ePqvpttgqjCo5rdhJldnNEOUofaffIyUcPAlqbK/ZqgFUqhD7P1ui70KcPcgeQyporyRXYzbnQMiFeKbZSBNkncWcKYwAuh0hHoU/uHHm07Ol1KOu/fHmusaXHsFux/D5cI3xf2GO60hUCtlg48VFGUWnV3q57z7rl0mJEmzkqZGyio89oEZUmgLd4jjPC39ezHw87WgZuIpPXJadB0mhuhK6cuqew3N50YKIgDmHYNjwvTS6UhqReLS4OahvnYPJK5YqpywZzY3Mx0u3LL2jbSobTFmCgLr5hhCqmt+zos= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 4:lqofWhJkacJaN46hmxGlTc/6x9BvCTD9TnQ7uBKRv3ATvRupg4y5KGJFH32FO9a3gxsPh73dS7RF0ZKSL2mytlAFm793moyel3l1aHJVS+AenNSvUvW8OUH3GW4xD9Gar3mjSHyWMSClfdMXm5/I83O2pW7xWlOqPtZ6GHgk78S7wfuVAXuAlFW7QZf85aZTYh4rLfeSeTKj6bvQABCzl7Qrce0FEH5qHfr6rjed2JWFvoODwxoBIjQqm0vdJ8hLju0MceTLTKiB6mND/9IJ5yG7n/U7oXuRk2gIE8aNFVIFpVk6QW7lXHQmbX9F7bWZLW1ihS56qjmtsmzR9BubMXpEWR0KYYXbLlwTIQDKK2cCpyWZE3TlMCkcS+QeDxdM+mW+ojEHshINymzwwYbAN995d99xXNDCC74WSq7WLsU= X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(48376002)(19580395003)(68736007)(2351001)(47776003)(229853001)(97736004)(19580405001)(586003)(50986999)(110136002)(36756003)(3846002)(66066001)(92566002)(105586002)(189998001)(76176999)(33646002)(42186005)(81156014)(5004730100002)(101416001)(50466002)(2950100001)(5003940100001)(4326007)(5008740100001)(50226002)(2906002)(6116002)(77096005)(81166006)(8676002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:ePudIOxVk+K8ChwnO/ZLrBo42BjNFQ8XpCOrUcy?= =?us-ascii?Q?d3F68wON+7GCxjEaoehXtnXNA+Zlzf/E5dRufiDRC2G3DE0BLQt0sgHhnpEP?= =?us-ascii?Q?FaRgE8zTXWpxmj6N31yxlupyjtRMUviLoYE7KINcHLKtuNJI5Atu4bKZCt7F?= =?us-ascii?Q?oEalU8ok6ZdrwXou5OZL/fW5G0TBC9MOBJXNXdMLEQbqzDj67VEjv0fUUH7X?= =?us-ascii?Q?8ueGFjizJh/CCP/5vKh7nw647rRM5VRyW9ArBU7xFIwqrpSUOYiT183pdWhx?= =?us-ascii?Q?cmqc0Jxxl248rmwDroK4wSN/FWuWZ2kbi1TUnABjTFA7iS/X/Gt47KxmclEo?= =?us-ascii?Q?cUf/G22EReXTQhHCG2CQVWuaAgulItZhYxxAeSg0Z/X7w8hFxbah2kcSxZsz?= =?us-ascii?Q?HvBpoXKWUljytC6DRxzwZnlwEdlesx0O/rBZup72aOREYVphjFa0wtfNG4cZ?= =?us-ascii?Q?QuO+etcRzhyr00XS46y+6hJGgOMZUtqr+WTJacJPCMyimV09TyT/dfCeo+qq?= =?us-ascii?Q?sRbEhqR5W80o11p4i1vvxerp/K011QeyYGFfIu7JYCLYB7P6+e03rCLT3DOJ?= =?us-ascii?Q?bpNAjpISuSYHCEZHUSP6/xQQU7Dp97lMnQ6SGTaYUyd+Htm7BSDKmk5X+DVt?= =?us-ascii?Q?vpfIuGNt952x0+1D44doE2ipD3/7wxnevICijrTc4HVUH4F72QDPzJJpDz7x?= =?us-ascii?Q?+h/Xf2NEqORygJ691D5b1yZDV/CY6MCCQN5kCZphALWs9Uz7MRHbsSiPJXmb?= =?us-ascii?Q?Ofux1zkCe4lT8ETRc1+UyBM1c+supBcFgm4Dbmai+ay+UxV2dosnWMI8qO+Z?= =?us-ascii?Q?3knnKfNJGpJnZTqYfHOOno5IqJz08842123ZrDfiT4C9E8yIO733SZvtVDek?= =?us-ascii?Q?0r/gDPmyNnCY/w1dB84+tUDXwec/XlztKQLyrljzrV7WbO66sQB+iSC7Rrwu?= =?us-ascii?Q?7wvWPfDmAHeh+FsdRQoNSgIE54/Av85UaLBxiSzqpC6IiW5wRujV/eu1okuT?= =?us-ascii?Q?An1BWTtGt4cVqo3W6fXd4VPbsgH4U8Yb2VpiPlUs9vhTb7yrBrlrAKgmKpGR?= =?us-ascii?Q?f9cFWtfdPYUWV01qFu0d6IaB+RRV1?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 6:XErnrPvG3x7P76cYl5rJWyS3w2d/3U66FE0wEUS1EE3159ugL1X6mBWE1FAVUR1z9F0ru34VRDxhOv7tZ6yNrkfh+Cib19M1qw15xiIzpFjK/9Kz8297PQ5xGMmyZvcUOMuEf02ZC/DZRwr5Igs/JNSOzr6/Bi6z9ai+aUtvSTDLEMA0QMthLNBmfUb+zErAlkuNkcclNiFicINyX0z3QqDXIlnect3/eYcGoDEEDqMKizvYA9hVHuVa7g8lQ+472yPCVo8Tt2sc36jRUex/wmt0MOSQtemt62GRV60+i8w=; 5:T1+UKPpPOBgE1dLzixmWEgYn4hrffkMxmqT7tKYxhuq1D21N3I8GF2sM6njSkQFCSgFO072lL3Mt8Nqz77tEQOX6RxfXY/4EtHM+iaosE75lg5ORNgE82lAS47cosAbhEyVGfYAsBBAgZZa72dT5Eg==; 24:KvvtXbjMrzNukl7zr+4tN/XTJesSN24yyKminCaG/hoMlqdhV3e0PTMShhY6QbtadKhr45j2tHYWPkaolh6ozP++y8r3NcRhL0I540tGOpA=; 7:ocVf4G6Dtw8g4aGAIw/z/wBGD6pnTv8kAWikEtf12GEYeuEW0TJDi6bWQZn8jopMWlqGPUl+vsfTK013YI1/bw6fm2wQaVBgMBSwXhWiL8zPwXTMnmwJc8WBqKNHTN5kYwDreiZfBbOyB0wL5gO4SuF5L06UY5YKtLI5XsaL5uwvPqfwPHpYL909d7aHEyYXOv3iThSxoRPyCr860PAuCg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 13:31:28.2737 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: [dpdk-dev] [PATCH v6 11/27] net/thunderx: add ethdev configure support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 13:31:33 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Maciej Czekaj Signed-off-by: Kamil Rytarowski Signed-off-by: Zyta Szpak Signed-off-by: Slawomir Rosek Signed-off-by: Radoslaw Biernacki Reviewed-by: Ferruh Yigit --- drivers/net/thunderx/nicvf_ethdev.c | 78 +++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 6811718..33344fd 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -168,8 +168,86 @@ nicvf_dev_get_regs(struct rte_eth_dev *dev, struct rte_dev_reg_info *regs) return -ENOTSUP; } +static int +nicvf_dev_configure(struct rte_eth_dev *dev) +{ + struct rte_eth_conf *conf = &dev->data->dev_conf; + struct rte_eth_rxmode *rxmode = &conf->rxmode; + struct rte_eth_txmode *txmode = &conf->txmode; + struct nicvf *nic = nicvf_pmd_priv(dev); + + PMD_INIT_FUNC_TRACE(); + + if (!rte_eal_has_hugepages()) { + PMD_INIT_LOG(INFO, "Huge page is not configured"); + return -EINVAL; + } + + if (txmode->mq_mode) { + PMD_INIT_LOG(INFO, "Tx mq_mode DCB or VMDq not supported"); + return -EINVAL; + } + + if (rxmode->mq_mode != ETH_MQ_RX_NONE && + rxmode->mq_mode != ETH_MQ_RX_RSS) { + PMD_INIT_LOG(INFO, "Unsupported rx qmode %d", rxmode->mq_mode); + return -EINVAL; + } + + if (!rxmode->hw_strip_crc) { + PMD_INIT_LOG(NOTICE, "Can't disable hw crc strip"); + rxmode->hw_strip_crc = 1; + } + + if (rxmode->hw_ip_checksum) { + PMD_INIT_LOG(NOTICE, "Rxcksum not supported"); + rxmode->hw_ip_checksum = 0; + } + + if (rxmode->split_hdr_size) { + PMD_INIT_LOG(INFO, "Rxmode does not support split header"); + return -EINVAL; + } + + if (rxmode->hw_vlan_filter) { + PMD_INIT_LOG(INFO, "VLAN filter not supported"); + return -EINVAL; + } + + if (rxmode->hw_vlan_extend) { + PMD_INIT_LOG(INFO, "VLAN extended not supported"); + return -EINVAL; + } + + if (rxmode->enable_lro) { + PMD_INIT_LOG(INFO, "LRO not supported"); + return -EINVAL; + } + + if (conf->link_speeds & ETH_LINK_SPEED_FIXED) { + PMD_INIT_LOG(INFO, "Setting link speed/duplex not supported"); + return -EINVAL; + } + + if (conf->dcb_capability_en) { + PMD_INIT_LOG(INFO, "DCB enable not supported"); + return -EINVAL; + } + + if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) { + PMD_INIT_LOG(INFO, "Flow director not supported"); + return -EINVAL; + } + + PMD_INIT_LOG(DEBUG, "Configured ethdev port%d hwcap=0x%" PRIx64, + dev->data->port_id, nicvf_hw_cap(nic)); + + return 0; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops nicvf_eth_dev_ops = { + .dev_configure = nicvf_dev_configure, .link_update = nicvf_dev_link_update, .get_reg_length = nicvf_dev_get_reg_length, .get_reg = nicvf_dev_get_regs, -- 2.5.5