From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0063.outbound.protection.outlook.com [104.47.36.63]) by dpdk.org (Postfix) with ESMTP id 91D705592 for ; Mon, 26 Mar 2018 09: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=mKY21oduZexXaxcEqPKN1dlbOY8dNyNtyVwa52DB2aY=; b=U8u522wc7NlezJd+q1hq1I7gPa3k9xgSwkRUrcbOHOhXyTR+S4F6B9mR2iIzxlvBzfr5OE78R0FTgi1/LFycmbntvdXafP96xaLHa3Qidd5Y94cA+EYQ+IReMMp3UbbDVWfjl1rkfm7Y5etXflj5Qc9jdEPnl2dlvgmU/9XfGE8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn (111.93.218.67) by BN6PR07MB3460.namprd07.prod.outlook.com (2603:10b6:405:64::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Mon, 26 Mar 2018 07:31:28 +0000 Date: Mon, 26 Mar 2018 13:00:54 +0530 From: Pavan Nikhilesh To: Ferruh Yigit , Shahaf Shuler , jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org Message-ID: <20180326073053.GA1154@ltp-pvn> References: <20180308190716.31061-1-pbhagavatula@caviumnetworks.com> <09c1f0a1-46f8-4eb0-55a9-e5630001822f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09c1f0a1-46f8-4eb0-55a9-e5630001822f@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0191.apcprd06.prod.outlook.com (2603:1096:4:1::23) To BN6PR07MB3460.namprd07.prod.outlook.com (2603:10b6:405:64::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f39ca0a0-4a6d-417e-1ac8-08d592eb97f0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3460; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 3:hbvtATkjb9YVpVyTQLpD7GxHppM/x0HK9GnshgyO7+5oirakUg745Q2QNZO1G2gmphmF/RYRoMemCL8b+VYnca8qkSrhiTloy6HC+x26oMgndtuOtDOGITsX2GzsBln6JjzW9w5Qf4TusfTe/P2LMIDQXibnxHI1FD76DbNbI9G1sCaURCAU8oxt9UUmS1A2saf1UaNRxgpyGfEZpNDOWZu8avOJ1TkMgJ7qUtWFUbYmLaUHAwMnOGE3adDlH5U7; 25:VBsCXaA8FNvZb3noKA5ispCFAXDWlu9lb9gODDeQpbchGlTsl7cDsDnOhyNhyZtkwMqxKGujP/N76qZy5l/D/TrX5CU2LQIKsHrq4crU6Oe9EpDIGXyF/XKX+w7cSFTCSPQRNCIjYR8GjiDEDXyOocp1H4OadQ4mF7HyQjacEmay/ApejoPvMC+VJ4XAbQZsak4kUULeoiIeOr+vyFvW1lSmZe6IBSnrMJoitJJFUdM5W5nIY3EZjG4EFfOvpkX3xPXxRYPwNtNGB6oF9/2GgmH8UKr2YlNnfHiLVc1pwpte9sSfgnR2s/xyJDih+a3LI5SmMAeLUf2ziyYQ8RNvmA==; 31:DGzneVy4a1K6+5p2lu8AkUmucw3s0+bvKrg8mYG3wISK1+NvLWc3Y0vELGt/xou6SX96WctUWUxvD2idrUsCz0J3sTCwNXsDLF/yf7z75TEgOlInxQL4ebcsgs5SF/MTPOWzFjvFm0jQ+/HjliOb2NrPt9E6DIHOBcO/2/mpP++M2ad/bf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Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231221)(944501327)(52105095)(10201501046)(3002001)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR07MB3460; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3460; X-Forefront-PRVS: 06237E4555 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(39380400002)(39850400004)(396003)(199004)(189003)(51914003)(53936002)(6306002)(7736002)(5660300001)(105586002)(110136005)(1076002)(58126008)(16586007)(478600001)(6116002)(3846002)(23726003)(229853002)(33716001)(6666003)(6636002)(55016002)(66066001)(956004)(305945005)(9686003)(47776003)(42882007)(50466002)(6246003)(446003)(11346002)(2906002)(97736004)(966005)(8936002)(575784001)(4326008)(26005)(386003)(76176011)(59450400001)(33896004)(52116002)(25786009)(6496006)(53546011)(68736007)(8676002)(81156014)(81166006)(16526019)(186003)(316002)(5009440100003)(106356001)(33656002)(72206003)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3460; H:ltp-pvn; 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; BN6PR07MB3460; 23:1Zt6ojaZOwxSh0L5wkzy4I9C5sWRRiNA+2r6UI4on?= =?us-ascii?Q?y15Uef7F0BljJPigtsTqr2PfupQwsJ3hi9jo5u+GfStDnQVSwOtc+MRrNSQT?= =?us-ascii?Q?GIZSrp6eLC3J/b1Zm0IItGX6ulAyBPolylsyW3ySeZeKNJi0iSSdXX09iWEl?= =?us-ascii?Q?AE4UDvP5T9hG7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+FqSG57EW9hoiFUnKe2pkmqQV9PWUCb4CC7cDX/yM1rY50t7MIJXgDJjZ6J8HY8OyHW6cbx9Ng69Nl+hugJaTtFdMQwHuE+2Abac+aD70e4ggWvHbcP/Rcd/a69tBsTetBG2Y6XPG+T7B3sXCfsqN7qw9VfuZ4fU8aC4mW9mZGOzyxrsRClQ9qoVbTkb0cFKO+sAP1W1+yiT4+yQ==; 5:oypgBYFmhcgiVxmi8xfPCs/m4ewxecLXBgB4sn3B2+knMWpf0Ym0sWzF8IG0bkfEJMQu9AxszV7jFvr6Tk7HEr6S2m1zihwmxGslkyx9NjdlvxKxoNVvgV5vwhW012aBxqLdqK97tJcCcSV6sH4nvllkgYEkNJfDKfnWk3yBF0s=; 24:FecOU1fsHuhw9UfXaujYOFJiVGeydYmMRg687tAAvURJPW70pmU0PA0n561h64ggl8lvTJjSS8Av6wqtYtUAAnBvsefbZlh9FGKOpWs0Q44= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 7:bRDw7jRkJizzi5Fk+XR5D1yqiZya7szjXUujPf969bwGyps3lNy5rCxpSf9O6CWWH1pN3G0eDYtl/TV4sk3L68fuIp77Vq3T3+aoosTTS/p34qrLqgZhl0szeJIqwwGINxrTFh8ht9DIga91lOv+inUbSgFr/UE+SLbyLgezdg1zH/pmYZ+DM9a/nWmnO+6g/taW/nq50q/dsScCL7jheJQCOynuRQs3PK1HoTKu5mM+9ot4jGMCTwrVORxKrrT3 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 07:31:28.6545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f39ca0a0-4a6d-417e-1ac8-08d592eb97f0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3460 Subject: Re: [dpdk-dev] [PATCH] net/octeontx: use the new offload APIs 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: Mon, 26 Mar 2018 07:31:34 -0000 Hi Ferruh, On Wed, Mar 21, 2018 at 07:25:57PM +0000, Ferruh Yigit wrote: > On 3/8/2018 7:07 PM, Pavan Nikhilesh wrote: > > Use the new Rx/Tx offload APIs and remove the old style offloads. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > Checkpatch reports falsepositive for PRIx64 > > > > drivers/net/octeontx/octeontx_ethdev.c | 82 ++++++++++++++++++++++++++-------- > > drivers/net/octeontx/octeontx_ethdev.h | 3 ++ > > 2 files changed, 67 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > > index b739c0b39..0448e3557 100644 > > --- a/drivers/net/octeontx/octeontx_ethdev.c > > +++ b/drivers/net/octeontx/octeontx_ethdev.c > > @@ -262,6 +262,8 @@ octeontx_dev_configure(struct rte_eth_dev *dev) > > struct rte_eth_rxmode *rxmode = &conf->rxmode; > > struct rte_eth_txmode *txmode = &conf->txmode; > > struct octeontx_nic *nic = octeontx_pmd_priv(dev); > > + uint64_t configured_offloads; > > + uint64_t unsupported_offloads; > > int ret; > > > > PMD_INIT_FUNC_TRACE(); > > @@ -283,34 +285,43 @@ octeontx_dev_configure(struct rte_eth_dev *dev) > > return -EINVAL; > > } > > > > - if (!rxmode->hw_strip_crc) { > > + configured_offloads = rxmode->offloads; > > + > > + if (!(configured_offloads & DEV_RX_OFFLOAD_CRC_STRIP)) { > > PMD_INIT_LOG(NOTICE, "can't disable hw crc strip"); > > - rxmode->hw_strip_crc = 1; > > + configured_offloads |= DEV_RX_OFFLOAD_CRC_STRIP; > > } > > Just as a heads up this will be changed in this release [1], CRC_STRIP will be > the default behavior without requiring a flag. Thanks for the heads up, will remove the flag. > > [1] > https://dpdk.org/ml/archives/dev/2018-March/093255.html > > > > > - if (rxmode->hw_ip_checksum) { > > + if (configured_offloads & DEV_RX_OFFLOAD_CHECKSUM) { > > PMD_INIT_LOG(NOTICE, "rxcksum not supported"); > > - rxmode->hw_ip_checksum = 0; > > + configured_offloads &= ~DEV_RX_OFFLOAD_CHECKSUM; > > } > > No need to specific check for DEV_RX_OFFLOAD_CHECKSUM, if it is not announced as > supported below unsupported_offloads will cover it. > > > > > - if (rxmode->split_hdr_size) { > > - octeontx_log_err("rxmode does not support split header"); > > - return -EINVAL; > > - } > > + unsupported_offloads = configured_offloads & ~OCTEONTX_RX_OFFLOADS; > > > > - if (rxmode->hw_vlan_filter) { > > - octeontx_log_err("VLAN filter not supported"); > > - return -EINVAL; > > + if (unsupported_offloads) { > > + PMD_INIT_LOG(ERR, "Rx offloads 0x%" PRIx64 " are not supported. " > > + "Requested 0x%" PRIx64 " supported 0x%" PRIx64 "\n", > > + unsupported_offloads, configured_offloads, > > + (uint64_t)OCTEONTX_RX_OFFLOADS); > > + return -ENOTSUP; > > } > > > > - if (rxmode->hw_vlan_extend) { > > - octeontx_log_err("VLAN extended not supported"); > > - return -EINVAL; > > + configured_offloads = txmode->offloads; > > + > > + if (!(configured_offloads & DEV_TX_OFFLOAD_MT_LOCKFREE)) { > > + PMD_INIT_LOG(NOTICE, "cant disable lockfree tx"); > > + configured_offloads |= DEV_TX_OFFLOAD_MT_LOCKFREE; > > } > > > > - if (rxmode->enable_lro) { > > - octeontx_log_err("LRO not supported"); > > - return -EINVAL; > > + unsupported_offloads = configured_offloads & ~OCTEONTX_TX_OFFLOADS; > > + > > + if (unsupported_offloads) { > > + PMD_INIT_LOG(ERR, "Tx offloads 0x%" PRIx64 " are not supported." > > + "Requested 0x%" PRIx64 " supported 0x%" PRIx64 ".\n", > > + unsupported_offloads, configured_offloads, > > + (uint64_t)OCTEONTX_TX_OFFLOADS); > > + return -ENOTSUP; > > } > > > > if (conf->link_speeds & ETH_LINK_SPEED_FIXED) { > > @@ -750,10 +761,11 @@ octeontx_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, > > struct octeontx_txq *txq = NULL; > > uint16_t dq_num; > > int res = 0; > > + uint64_t configured_offloads; > > + uint64_t unsupported_offloads; > > > > RTE_SET_USED(nb_desc); > > RTE_SET_USED(socket_id); > > - RTE_SET_USED(tx_conf); > > > > dq_num = (nic->port_id * PKO_VF_NUM_DQ) + qidx; > > > > @@ -771,6 +783,17 @@ octeontx_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, > > dev->data->tx_queues[qidx] = NULL; > > } > > > > + configured_offloads = tx_conf->offloads; > > + > > + unsupported_offloads = configured_offloads & ~OCTEONTX_TX_OFFLOADS; > > + if (unsupported_offloads) { > > + PMD_INIT_LOG(ERR, "Tx offloads 0x%" PRIx64 " are not supported." > > + "Requested 0x%" PRIx64 " supported 0x%" PRIx64 ".\n", > > + unsupported_offloads, configured_offloads, > > + (uint64_t)OCTEONTX_TX_OFFLOADS); > > + return -ENOTSUP; > > + } > > There is a discussion about the requirement to have port offload in queue setup > or not, more details in [2], any comment is welcome. > > [2] > https://dpdk.org/ml/archives/dev/2018-March/092978.html > history: https://dpdk.org/ml/archives/dev/2018-March/092862.html > > > + > > /* Allocating tx queue data structure */ > > txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct octeontx_txq), > > RTE_CACHE_LINE_SIZE, nic->node); > > @@ -826,6 +849,8 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, > > uint8_t gaura; > > unsigned int ev_queues = (nic->ev_queues * nic->port_id) + qidx; > > unsigned int ev_ports = (nic->ev_ports * nic->port_id) + qidx; > > + uint64_t configured_offloads; > > + uint64_t unsupported_offloads; > > > > RTE_SET_USED(nb_desc); > > > > @@ -848,6 +873,27 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, > > > > port = nic->port_id; > > > > + configured_offloads = rx_conf->offloads; > > + > > + if (!(configured_offloads & DEV_RX_OFFLOAD_CRC_STRIP)) { > > + PMD_INIT_LOG(NOTICE, "can't disable hw crc strip"); > > + configured_offloads |= DEV_RX_OFFLOAD_CRC_STRIP; > > + } > > Same as above. > > > + > > + if (configured_offloads & DEV_RX_OFFLOAD_CHECKSUM) { > > + PMD_INIT_LOG(NOTICE, "rxcksum not supported"); > > + configured_offloads &= ~DEV_RX_OFFLOAD_CHECKSUM; > > + } > > Not sure about changing the application configuration, and since this offload is > not reported as supported application should not set it, if it does this should > return an error. Will fix it in v2. > > > + > > + unsupported_offloads = configured_offloads & ~OCTEONTX_RX_OFFLOADS; > > + > > + if (unsupported_offloads) { > > + PMD_INIT_LOG(ERR, "Rx offloads 0x%" PRIx64 " are not supported. " > > + "Requested 0x%" PRIx64 " supported 0x%" PRIx64 "\n", > > + unsupported_offloads, configured_offloads, > > + (uint64_t)OCTEONTX_RX_OFFLOADS); > > + return -ENOTSUP; > > + } > > /* Rx deferred start is not supported */ > > if (rx_conf->rx_deferred_start) { > > octeontx_log_err("rx deferred start not supported"); > > diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h > > index 10e42e142..9d6c22b0d 100644 > > --- a/drivers/net/octeontx/octeontx_ethdev.h > > +++ b/drivers/net/octeontx/octeontx_ethdev.h > > @@ -28,6 +28,9 @@ > > #define OCTEONTX_MAX_BGX_PORTS 4 > > #define OCTEONTX_MAX_LMAC_PER_BGX 4 > > > > +#define OCTEONTX_RX_OFFLOADS DEV_RX_OFFLOAD_CRC_STRIP > > +#define OCTEONTX_TX_OFFLOADS DEV_TX_OFFLOAD_MT_LOCKFREE > > These should be announced in dev_info as [rt]x_offload_capa, rx one seems missing. If CRC strip is removed (implicit) then I think RX offload can be removed. > > > + > > static inline struct octeontx_nic * > > octeontx_pmd_priv(struct rte_eth_dev *dev) > > { > > -- > > 2.16.2 > > > Thanks, Pavan.