From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0082.outbound.protection.outlook.com [104.47.36.82]) by dpdk.org (Postfix) with ESMTP id 5DD3C1B21E for ; Sun, 8 Oct 2017 14:45:55 +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=0wPlLLD3pqM3VTEv0Glvmr2DWQjLTToHB7D0cqy55Xo=; b=U+d77HJyEkZNBmzHW08YMDA7BWcZTW/7ld/mKm4joYwqzpwbNmRtS7yucWj7JMw/i9eZhIwqLGVmVxMjcEgZT1lRUF82SS1F1axiA1dGjxpAPn1who0bHSoCU7OEjzE9fcQ8P8R/P+8luRN+V4mckVMbl2GSVkQej2TSGypGRg4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sun, 8 Oct 2017 12:45:52 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jerin.jacob@caviumnetworks.com, Santosh Shukla Date: Sun, 8 Oct 2017 18:14:17 +0530 Message-Id: <20171008124430.1866-14-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0113.INDPRD01.PROD.OUTLOOK.COM (10.174.56.157) To BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 268d529b-b7f1-4c5f-62d5-08d50e4a83b8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3089; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 3:cZTXla12CyVEEMNT2mQ6dLXSccY/nUWzV6AGWoIvDIYd6EqO/nltctPpUm9aRiyUfwz3Rx2el6n7jiSq2Nj4QmPJTmgUjqZRex1vHwNEPhhkmcenXD7XB7qcFyax2WWxNaUgsvNSokj4YNK/sQPLAgDCY+AUmkXCNb7Kdi3RLTIQQR3T40aIZYo137BVRjOZkiJNjGz4jMnbbMYvM7JVhUtgxJR4Zb/o6wUkpz6OvapzyIuVdgUc+5gIsa46fkqo; 25:YgclnSlhDGJIo3EbEXWsVn/AjFi3xTIFx3kzmLIAoS+UbnSL6ceCVg/7CDU+/fMDYEaRtpxzugbICNPhn/2NG/hPyzSpmYtGofcFJVKGAHcALxpwik6IK9QfqJz0247uweVr8E0Dn7zmsVTt8jKCJZlDlGcafHQWRmnqX/6h1QgmLvcc10pOahyNKTtvVhw2lYh/FIupbYDjB5HnvikdUK8nfxkpXKGaFnp/jBIExuGphxMJqsYEkCA15deoIXoR+ZR2jzxMz7jvtjqN+Snqjtl4Jrs9RCAxkuPBfIn+odGbdB9U7BggaCYR/63rtbD4wlnJV/vPpdNqx5DAH8hpWg==; 31:tzHj/ihNsEO/xiH7gZ+KRugffjMlnPmpPwpHHJ6SPr3CV0JIAic0UBVS9EQz7IgSVVq53pcRgbEm8GId30JBolNbc0xlGk/OP1O3Dq4GWKAaefcVpxyNnQ0kc99ERiXXhwD4s9u57mm8Fb4LrDJBRcfVj6U1KP02oN/rL5vxpsuRBLrN5oyQr7JcqZqlBl0CwT7ImpdEB1b8oGN4Le55r/O43ZaVJA1tyLF3Eid1H+Q= X-MS-TrafficTypeDiagnostic: BN6PR07MB3089: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 20:9Fj1MbAbk5TJdjCTdXhwY3aDBYh5W4sx5hW/pAxOC5K5NcFl+WQggkKCqNv/s+rLrjeTGqpQ5lbH34VRv5CE7CcQ59QgC2G2zUQE42h4WwCK3546iR6NgyGoi3XSmv9UYOXaue/z4PTrEx6QtxLavN5lQ9xCah4A8uGFLcXt6Qrevbe/IQpXHYJmohwzLAb8j5a5cHGgjl+Qn4g/vniDBMlUD5V0M3UcBJjAuos5g5pUfQKZWfSMAlRTcFEq+D76wkTfPIZhe8XOJtKxk1IiEZI9zM3mTQuY1KTdl0opuCWlqMQeTrq3e04JvGRLKiKH20pn54vuRzhteHD3jtHB/3/SbahUde7y3s+doTxM45T7/FuhBsPuJq16RohweiVw82YASIY4HAUmNh2DOILMYy8ERjzpcFpl5jAjtpLjlJOPqE9wyFbHjeUl4ulGJAfJ9Qrm+2SUMd6WotxP6tXs6d++AfsMLJXTB7n6K0AkkzrrLBnBqzYyjmsj5gVTLY3HVwm5ccgMTUmbacRZII2edIMDBHmJyc4OKLTP8ywFb3+jAgsA/AA/6TeRVZeYfC1WkeUnI+GIEUoY2jfeCW5HENM8xm75YOR5kCTh6H5aatM=; 4:c21uRQmSKemTtErZtokSMZPDCLPwj0ogigEdtFnNbgpWQIHeJviV6gdnrhs24HmbQYhNIR+9Rzl7PrOsDldopsw90rw0QbITVdpEDauDBxJJD8aauOuH4dFsiVu+92ReDLkNWRjqpcQ62QCQLhRkuidmqm2U+m3EF2vhBS84ZSJzG8jkUFiKK3jFyQMiXUMvChDwnyGw0OyGwMyQ8sOAVMNnwNflWfLlv4O7BdikmjUbUgoNluR/c7yeF92BcMr8 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)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6041248)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3089; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3089; X-Forefront-PRVS: 0454444834 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(199003)(189002)(6916009)(42882006)(81166006)(575784001)(2950100002)(81156014)(8936002)(50226002)(6486002)(16526018)(6666003)(189998001)(16586007)(316002)(6116002)(1076002)(6506006)(3846002)(7736002)(305945005)(8676002)(106356001)(105586002)(5009440100003)(53936002)(4326008)(66066001)(107886003)(47776003)(2906002)(5660300001)(6512007)(76176999)(5003940100001)(50986999)(97736004)(25786009)(101416001)(68736007)(48376002)(50466002)(478600001)(72206003)(2351001)(2361001)(33646002)(36756003)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3089; H:localhost.localdomain; 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; BN6PR07MB3089; 23:/Sn38RopReqGbMpxzSWIOEv12eYc24EBNM3Z1gjt6?= =?us-ascii?Q?q/8BbZjGQGicnzNkSu04/G5UzaM3kx+AgBtcxNIPDVHOE22u3kGkA7ZIJ3GB?= =?us-ascii?Q?VAw9tnD0wXhr8c7+uzb1chAelz+GBtVB2JbTFJ0enl9anx6TtAmMK7x6zwpx?= =?us-ascii?Q?tjyfCSKKjXZcznc6LT/GktLU9LFMUKHUSR3mlxMIJ76VPJU8s5NBRJewixup?= =?us-ascii?Q?fLFHcQ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75U8EKwvlxbf39nMHo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2017 12:45:52.3879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3089 Subject: [dpdk-dev] [PATCH v2 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: Sun, 08 Oct 2017 12:45:56 -0000 From: Jerin Jacob mark Jumbo frame, CRC offload support in features. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla Signed-off-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