From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0089.outbound.protection.outlook.com [104.47.36.89]) by dpdk.org (Postfix) with ESMTP id 96B17377E for ; Thu, 31 Aug 2017 16:55:51 +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=x3q0vRUtuGpmxDnttM42SXWFhP51hvkJyyCHUZczo6Y=; b=iXn9uc6up0KYH38GzQV1NblNoZXIzd2aAM+67IExGOTpTWybTf87S/iie9x8pcqR+SedmAAdcucf9gRaH2hbA3tEcx8L4UB0LjkuHG1NTPDWkq9+krskF1ZTygIcmsPcw+ujG080zskdLxypBgSVl0/nHxYvp0lZPgILGMyi6h0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.domain.name (171.76.126.71) by SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 14:55:48 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: ferruh.yigit@intel.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Thu, 31 Aug 2017 20:24:23 +0530 Message-Id: <20170831145436.5397-14-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.76.126.71] X-ClientProxiedBy: MA1PR01CA0109.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::25) To SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fb47ff1-894c-427b-6af9-08d4f0805ed8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR07MB2526; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 3:QWj3kkm5aqOaE/fKNVnSq40yGnneR1reRTX2PvAyIdYnja1O+Fc+U8l1FAh/5KgF4ZGXmeT6nPxtpAMGB5J1R2+Kx1nK8BA2dI0G3L4Rb4DJIE5Doc5sAeMCSmM4boGzFCnpI6hs1m5CeMdmIpfcGCl+9C9iC1c3DPy7k10thFm0W1lriOYH0zjJmGuMdSipPD/owToQmrgVAZpFZrFMnQ9VL8FgAadhFAKtdeb6eiieKeYqfd69clR4idc8ikhl; 25:oAh5TID+oE9BiNMEm3j0hJPpEZyUGao3BS9BFhUVo/Gy99MwRUgboxI1pdO4cE449z7buWtJKkdcLEw6CE5nB7o9WUhieWYRj0tVIN7CUZ6GTN6onbMgmvxI3jJ86B1p7yjzUtvxJjr+0UxW0fAqY9wj5u+MUFlmdR1nZBDeiAB1GRd5Aj8FaimiMc47e5qwsCR+vtraqwoql3pZXbfia0DhJoNDAEAEC17VIXv6n4xcV2w1sDRw9XVuHN8frDgVmD2vWbMqwAe2X21cEjowUsx30x3yIM/d8hJlr3fPbrFZYdiT36lxHZRHSGhrHXZZ0r6r8TF54iya2iqnM+yITg==; 31:LQ25zd/74dqclQepTozhHUEz8EDFL+zm/d874IDIPdEgUqj1kK5Qu6mN6h4BD8YB3puLK7D6hJbasOy2/vbrIm8IMatqevrCSiKNvkKkgo4+3UQPWaBYIVWR76N8U15USUb7fmP6MKBKMGoCsnBJe8/30wX6HGw6sqgs609knvjCcDCedF8+/vR9vOClTzCWFIWdnKobydLAEIiBI7OnB8Ov5UKdTdrK7MLdqMP3fDI= X-MS-TrafficTypeDiagnostic: SN2PR07MB2526: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 20:DPJmvZou5qBGBfat1d3NSbr3PWZLOY9OpsK2VA0MfdelJPi1m8EDJQp6st3qK6TSvyTFx9WGExl48W0UpB6asSF4PAvrytQav8ABrnv6XnTS09GwathTX2SxmdwbcL3KxmAT1QUoCA5L2p97Q0s52JhhNiKLrHoaUAo3ZG9TnPmIL1hObFKHBQvnoZzCsATfxdXaQkTbShMZSB48h4TSTmBQx6rDRytG/6EF3JwbHr+w7bnfVC+cKfd7ilDZzifM5JSmaX5OjI7HEzAkrWcmr/IrzzwK9qI1hy+TkBXSK3Dx9iVwR8ZNIvv5nuAX6gs8Fua/XlPIqX0F95Fwmypt7p6ZYrW5wlXISGL4fDYdsfPNqx13KKGgc62jPBJeXkODtJIPszMgzn4ET97SQAiWFjeUS2NCyiCP4lU+cM16nCUzweqx+gWPOkrYZe2+KLJCyiaUlenfkQjV6RD/dz71EWxbbfoJUPdtyJujPgVyXMSjv+5nkeWBc9yZEkLaNzz1963bWGdYYY6d48zb0e4DAgxqOTWj0cVOPunqswygp18oqE9QShMTaP7nyaxDta3GLqgbwAmYHEnZBoIRTMwiWlDd1pIJKlq8mQngjCmu+Is=; 4:GPetbzq4YVctoQX62kqRZ2N0Kq+u84COtmvqNOv27Ics2S5VVakjYOtPYdGnMrveUFYhtLPKWGMc3SmS3lGJkXT7rHTse1U9ZC6NxN1jizNtCeeAdQu/5PqV2rl5o4TC9FlGQnz4VeFethQKtigdjqgTGmoZL2XaE3cRIWtyMEyAvNdia6L7baBJonXjMieoIjzZvEBTtpGXb2RSuLPszLpDcjkpsvoRA2sOAKdLA3r1IVRDhI/F+A5wJCJwBVwj X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR07MB2526; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR07MB2526; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(25786009)(1076002)(53936002)(3846002)(6116002)(575784001)(478600001)(110136004)(72206003)(7736002)(6666003)(107886003)(6512007)(305945005)(6506006)(36756003)(6486002)(68736007)(5003940100001)(189998001)(50986999)(42882006)(106356001)(101416001)(76176999)(2950100002)(6916009)(5660300001)(2361001)(33646002)(2351001)(2906002)(4326008)(97736004)(105586002)(48376002)(50466002)(81166006)(66066001)(69596002)(8936002)(47776003)(53416004)(8676002)(50226002)(81156014)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2526; H:jerin.domain.name; 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; SN2PR07MB2526; 23:iM42fe07svSLKFS8RNsRSble3EjZzx+KS8pxEqy8+?= =?us-ascii?Q?R3Xr1keM0atBYiPmrMVgjqtfDgBVq0Jkg4Lw34kKg/WaiY+AlsTlIM9fz4r4?= =?us-ascii?Q?+/jZeqqroxfz5sRwQ+Iej8U9Yy/8puCrA7yH7GlWw1UJxy0QCIp5BlQhsBpQ?= =?us-ascii?Q?Xt4Z1GhOQDHiox4jrktK4SxKivZ3SCYC3llIhcT+wZQtz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09yP3xLHO0kxno8l8C6Ke8h5ulavvLSFvI/dohc?= =?us-ascii?Q?2YphWVKBzWx4WSl1yIA+t4UImfXtmAkAGCg/93xre+hva7BqhwPbh+6DCcVu?= =?us-ascii?Q?WwsIUNI6RFT5O4=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 6:ToHdnTpOExBniGvAH/wPrCVvhVanTj9Afp8JabyXW5axM089kFlFMOId6fVHVTpfo8Rv5c3H3qb6uhNHFwS3xs0grUrWPcie8rDvqJfQ8pFcR2BLRA7PNZZ8k5Pxqm4DziD7yKBHGI2ChNzl/KpXeFTnw0kTLD7VyLzM+VRv29hJOX/zNMW/B05yeNMb6Gsv3ICbKayKbwKGIZAtCiAnEo25IGhsYBUoPz58VWeDazaB1qs9sDG0K9/7C2g62EnTrf98rskA1/SWYm7/7paOOJMPdfVthx71R7xDhW0C72Gta0RiEb9g6dR98WXG4heSV+ddcj3mW9Ocrk9uHYQyZQ==; 5:MFik0QnCMDjeh17octaIFsZ3Z6Lt6pLFVMDaUA6JqLmFiFAIAHqSrblrv2ecmShBl7/GQSRQHMGuie6cMhkz8n4GVE5gdKybU5r8nUc4TdtWJy9vkNFDIhqsQC8M1zYa7shPMjS9oW3sMNuILgLEOw==; 24:6VnJWBCM1IOM9B7NY2hFNvh8VXov41ninOljOo/qXR1ixTQ6kXME1oktgIMDFix/7CHdY9pxS1BgLVoxqkLwiBhd7sIH5TNPcRjjmWnp35M=; 7:IZfSNw3VMsEtNSLwV6eNJLEmSn+FgdxepXPWss3MtT1SY8n1dUl8jV7WPZPDf5bbHLdFbRwyVEWUdDzklD9l4hr7i7tad4C75G/OYhGS3hMqjBvPHlbuifWJ5DfGQrXbRV4RGwQ9+GRtWCTaeRV32ioA7AreyOAgMEOHZKoCTRlBmAeE+zZSzIMSIAnSc7A1TJir3bezG8Xo64NevDMans210rpLjognJL21REIcRQw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 14:55:48.5679 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2526 Subject: [dpdk-dev] [PATCH 13/26] net/octeontx: add device configure 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: Thu, 31 Aug 2017 14:55:52 -0000 mark Jumbo frame, CRC offload support in features. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla --- doc/guides/nics/features/octeontx.ini | 2 + drivers/net/octeontx/octeontx_ethdev.c | 93 ++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/doc/guides/nics/features/octeontx.ini b/doc/guides/nics/features/octeontx.ini index a8468ea34..6e397c9b1 100644 --- a/doc/guides/nics/features/octeontx.ini +++ b/doc/guides/nics/features/octeontx.ini @@ -4,6 +4,8 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +Jumbo frame = Y +CRC offload = Y Linux VFIO = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 6a727a0f0..10796f3df 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -170,8 +170,101 @@ devconf_set_default_sane_values(struct rte_event_dev_config *dev_conf, info->max_num_events; } +static int +octeontx_dev_configure(struct rte_eth_dev *dev) +{ + struct rte_eth_dev_data *data = dev->data; + struct rte_eth_conf *conf = &data->dev_conf; + struct rte_eth_rxmode *rxmode = &conf->rxmode; + struct rte_eth_txmode *txmode = &conf->txmode; + struct octeontx_nic *nic = octeontx_pmd_priv(dev); + int ret; + + PMD_INIT_FUNC_TRACE(); + RTE_SET_USED(conf); + + if (!rte_eal_has_hugepages()) { + octeontx_log_err("huge page is not configured"); + return -EINVAL; + } + + if (txmode->mq_mode) { + octeontx_log_err("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) { + octeontx_log_err("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) { + octeontx_log_err("rxmode does not support split header"); + return -EINVAL; + } + + if (rxmode->hw_vlan_filter) { + octeontx_log_err("VLAN filter not supported"); + return -EINVAL; + } + + if (rxmode->hw_vlan_extend) { + octeontx_log_err("VLAN extended not supported"); + return -EINVAL; + } + + if (rxmode->enable_lro) { + octeontx_log_err("LRO not supported"); + return -EINVAL; + } + + if (conf->link_speeds & ETH_LINK_SPEED_FIXED) { + octeontx_log_err("setting link speed/duplex not supported"); + return -EINVAL; + } + + if (conf->dcb_capability_en) { + octeontx_log_err("DCB enable not supported"); + return -EINVAL; + } + + if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) { + octeontx_log_err("flow director not supported"); + return -EINVAL; + } + + nic->num_tx_queues = dev->data->nb_tx_queues; + + ret = octeontx_pko_channel_open(nic->port_id * PKO_VF_NUM_DQ, + nic->num_tx_queues, + nic->base_ochan); + if (ret) { + octeontx_log_err("failed to open channel %d no-of-txq %d", + nic->base_ochan, nic->num_tx_queues); + return -EFAULT; + } + + nic->pki.classifier_enable = false; + nic->pki.hash_enable = true; + nic->pki.initialized = false; + + return 0; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops octeontx_dev_ops = { + .dev_configure = octeontx_dev_configure, }; /* Create Ethdev interface per BGX LMAC ports */ -- 2.14.1