From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id D7037FABE for ; Thu, 2 Mar 2017 12:39:47 +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=IgUofF/gzxCwCoXIBxHpQ+kPjJCqDhEwWkdCnSWcVSM=; b=WuHdmI/7qM4GvC0taR1QLuP+slDc04XLUB3WGYIr5TNqVRQHACWSfPwbo6vGyMsMRgE/6vPRy+cg02sH85pDnmMBJx8i+sjJ7A3BgDk85lvApkhm0WxOWwFEnFUUqFFU7iWsW8EgCTBicXeOAEUVJfeM67RDJTkT/9p2WV0sk5E= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 2 Mar 2017 11:39:43 +0000 From: Shijith Thotton To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Thu, 2 Mar 2017 17:02:40 +0530 Message-Id: <1488454371-3342-36-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.163.198.156) To CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) X-MS-Office365-Filtering-Correlation-Id: aa4fcc36-7c03-4763-938d-08d46160d357 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:7J0ehq7oh/YcBezYMmSNHrVIipPXr2x4fjKzc1LeIEf9weT+q2NUoKEuEFKukD56ncm/Fw0V7c6N/4KEbJdS3JAoQMHbKqtK8kGCDLwz5nwIABUHWNGCgnqrsSU4uWcJUF1ASC8nA2fkUSSXwHZAhTOfU9I4P0JAejOX/1hXICNZwN4+3xutAocGjhXP8lqfLs6vLTZmXG5TTQQbmqziIeXUeYsqBHZGualo71l97X94c0dn4BLaUuO1wANVtJt5QC07InkDqUzkcHwJ8VhHuw==; 25:rC9plaTXcd6bdoIZtXlpGoSYk9AQmMTUtBgcnf0KGSUv81yGjUXhGtuXnM6MoIk15vvrgVvNK41ZdK46d4nt3C/PnmFWoZc65rSaqxtt6CfUc+v8XaWJLys2a10hwq9mlI9JRHZnZ0Mi59mUMbgoKfLlSbdCRgME7pKGdb1fxdratrM0TNkZ3iDaswJIJjSRMQbJHJOcARcXGHTpqmDbWQuPZ8aYXzaq+tXzmS2kCsUX0ePuGYkuVfJBLDEVRPwWcwbFqaGNo7YE94pWSDFv8Ef60NcAh5BPultJ+B0MQPrIkUOHTibHSFARG5SYrw6omzK/NpY3XyIRqj5xWtT9arHrwnuh7xNXTf83nYluDvT592xz1gRoefUalsRQxPzH3ng/i8bDLSjm5u8TJ1PrH+ek9LZzF6Ff83LNdRHr5OZRA5OzYSKSQJq+UV4yaF82O1MgAxfenHnxSYkAXzKv0Q== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:L5rlEMSJEMG8QBTKMLJIAiC2C5i3+qV+k7vcx5qqZ1AwhxNap85gJj6/HqpHemwV1cl22hnD/0JbeleFJtSOOfZTQ6YJdgK1Ga5FzgK/9ZrtZraHUxfAb8rywwxLiYn6grEC7kZFDOK6VGSEm49j/DL1kgTigfpUsgfT4TXeQ5CEUumS6Bzl2GGsgUs7NCWJhkopLXRSj6BDiaGq4FweyA/ABpudfDNCuCdXlo1QkSg=; 20:NVQ8wnLsnl6Ggdp7sR4yoNsrzq/YgAqE9TRInXDMxSkVFj8bIsx/6nF7i5onxDdiCEZThV4MZZid+l4bFx7QTf06RxePf2aBQLL5GwsC6GMEasXBPRaXB7zR8buIKkkQWf8KZTcC72NNLOyIeEPk6UWdUmcdbHGVJ+guFDttk+8gBZrIix/xOtK6xyeTR0tHaKQwv7HOJhSaVzpWxP6mge+g5dF56bemdli9sF/EgNislZdLEDgkBx0ATJVzRLZRYu3uYtQAIV2pbeVCQypRstYJLZsiIDQR8Ue7VAexXNhe0m1Yodao1etGLn3rQjXm0LfJdv99WXM6p+222q6d+umTcdG/w6LpUTkm+Ni9yPJWzTOfWTcRkUoI+bMNt0MpuPhNLRIN46LpRiMUu/JIjfRNk9hA7DiSa4Oj9TZprna8OTdmgtFZ0OzGXuJo9udgoHRRkRKL9uRd6QZ+WtssNYhk9KOe6JlK252wQHxGhJEZVdvEX3pRY5q8nAFMA8IckhewDEgs8BewalrcTKCGLAXLx9P8fPusoIWonyeJFCSyqDt6mOLNwj9H12h5E7joBqpLyub0E20yG+YwB6uGX6LEuBxFTPXuWTPEnIjk0/A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR07MB2277; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 4:gSX4+ThbXCOdhOfSwmkFfsXGy+5UTZlBWkQ5l9TfbroNs5znExbCm9iIZXt+/6X64di2mkRBelVlmfI3km0V0Pp356JMRmoBBMtUDXRpnmREE/XFKa2o9NjBvT4fn85Lw0KGZFLnsK1vnBcMVdL32VQbGApxvxLCYum8CweHkvLuHC7lvXoQhDPpMkVvOE5hBlHBXsok30ZMQGSW05m02sLN2ZaGXcXcAtq4hVOBQu0La3FHZD1K3Wnc+J627oG+qVpd2HO2bFKlZEBQO70CBX1C4IUqSWBcvIOErRitj5zu06Ok9HczLwZPWSUXlUm0GZ3OQK8+7Tkb+WxfCxyQhiu8i7itt8QthxGdlpQ1rpuh47agJyYKlM31OdYQKbxAnNHkVMTEK74mIe5Rv6VM+UamcdsY5rcfknUSeu+5dT84+1SLN9Cqjby702u5julGX2eGY7Qhtu0pO3CaJPsd+Nrqz9ZC6BvIFN3XWF4R0ouNHRXIOo6PNP1+qRvhPm9dg3geRUwvWQGKxZzS3Po+DHwhv1dSjCoDZuB0fepKsxu7fDg7Bo+GyLpOsohhrrqqbQcaPzKr1SzMspyo3+XKFq2jyrqGc6KhqyGQhQpxnZI= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(2950100002)(6916009)(42882006)(575784001)(5660300001)(92566002)(4720700003)(33646002)(48376002)(50226002)(2906002)(5003940100001)(36756003)(8676002)(50466002)(81166006)(110136004)(38730400002)(4326008)(305945005)(2361001)(53936002)(2351001)(25786008)(6512007)(189998001)(54906002)(47776003)(6506006)(6486002)(66066001)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(7736002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2277; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2277; 23:ZTFOgeNGH+VeMOLkt+Zbrv5YcRr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FI2FM3fj9SomjGx1gAIPoH2N3FMPuAoWrrraCyNUCYKgMU?= =?us-ascii?Q?DhXXVh5xYP9mw9AYjeJyrtzYoKbnF350Yg2oi1hdNqj7imNyppCWm2w/eZtP?= =?us-ascii?Q?RMWmFqtLlqbXD5YnhQinXVnrIZ9h0J9Ff+A7b6YpfsXQcYQ0IZ41MQ5h5aRV?= =?us-ascii?Q?OfeS/9K+upeQ1GCq/ApSn4IpN+bLC83Xtv5VLeLQQZyzABU6A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 6:oliFeVSACzjOLtWiepJK4T4XIE6tHbB8XCFzsVbBSSRrjWusGh0Mcha/QD+DvaUWe2NjjDMReN0F+yDFD9b+t7sjYCxiDdlSgEWD2xgKReH2Gdc4mJb0bmuxzflB7Mq1wahQHM1eRFvtg5s9EquEksDft+ao1sVNKC5bJtCYjWImXE4ySGtFJ2M4HcJSiqM/ScuDhm4ZKexXPcK3l7dyi4zTPI1trysESiNJKwdjKzNl1cLtWQTZWnB8+YxnYikUogVm/cPIi0IGpGXoWOreG9I/uFcvr0JDbXnhzQu7vv5zq1rZLk22X7vWKEmC3/NDr25LF+KHkxVjS1sYoAM6pXWMJZLUfuE0erp6tEHzKmiycCt7K6bdY0nKQHuLeaxU34wMkHRLMSYcCKgVUp+Z1w==; 5:UWgODx7MitbXGQaxoI4DUP8HpWp8VDIc0JSWy33xr6znxboSblTSgIAKyv92ZrWFb8z1Wgb5HEJFD/NeOHqKxgd5GdmJQzFhvqgR8uk5oOh7A6dxu4FL8aCnLDksvtkjfs9Kb2qO8urtowVpkGzhrA==; 24:3Japs1ab5yg/TMaOEgVtzxseiXOwRyoJS4onPOFUhHvIqo5iiA1XO7cdX7vBM2tyfb96P0cubssRjvoJDej0M0e4hl0nqWJ26y2IjMIIBzE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 7:eTkwmjhrv4REDPFHyEUCC1/TOd4AWTG+NCjD/hpS+seZ+VjmA83ct48Crxsu6jA3QcV09/uv44YIeYEYcLK0+iN3zIbhBkYSVVfgwSVbIhj1KgovXeAPGc/CxXZiJoFvV8g5X7gH5bPFXRxGFn8obvhq3WWWJAN9CFFUIj+LpqpffXB4ZipS6ngK6IO47XyEexUR3g8yOA3XKsQjQf+I3Fb7vE3eugqhQC+1e+OQ557DU6I7DadaulG2GtiOyN+IDFdhH2o8KKLjcJt8+ghseY8YcanuXnEHpHJU2ElPQlPmq65EVJLlfreYPJIIFtIf7vUvGlHI+cAkRl5caQQ0uA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:39:43.2662 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 35/46] net/liquidio: add API to get device info 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, 02 Mar 2017 11:39:48 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Srisivasubramanian S Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/base/lio_hw_defs.h | 1 + drivers/net/liquidio/lio_ethdev.c | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/drivers/net/liquidio/base/lio_hw_defs.h b/drivers/net/liquidio/base/lio_hw_defs.h index 8272162..3ea2e0f 100644 --- a/drivers/net/liquidio/base/lio_hw_defs.h +++ b/drivers/net/liquidio/base/lio_hw_defs.h @@ -126,6 +126,7 @@ enum octeon_tag_type { #define LIO_OPCODE_INFO 0x04 #define LIO_OPCODE_IF_CFG 0x09 +#define LIO_MIN_RX_BUF_SIZE 64 #define LIO_MAX_RX_PKTLEN (64 * 1024) /* NIC Command types */ diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 58a932e..e2040b9 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -50,6 +50,18 @@ 0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA, }; +static const struct rte_eth_desc_lim lio_rx_desc_lim = { + .nb_max = CN23XX_MAX_OQ_DESCRIPTORS, + .nb_min = CN23XX_MIN_OQ_DESCRIPTORS, + .nb_align = 1, +}; + +static const struct rte_eth_desc_lim lio_tx_desc_lim = { + .nb_max = CN23XX_MAX_IQ_DESCRIPTORS, + .nb_min = CN23XX_MIN_IQ_DESCRIPTORS, + .nb_align = 1, +}; + /* Wait for control command to reach nic. */ static uint16_t lio_wait_for_ctrl_cmd(struct lio_device *lio_dev, @@ -105,6 +117,40 @@ return 0; } +static void +lio_dev_info_get(struct rte_eth_dev *eth_dev, + struct rte_eth_dev_info *devinfo) +{ + struct lio_device *lio_dev = LIO_DEV(eth_dev); + + devinfo->max_rx_queues = lio_dev->max_rx_queues; + devinfo->max_tx_queues = lio_dev->max_tx_queues; + + devinfo->min_rx_bufsize = LIO_MIN_RX_BUF_SIZE; + devinfo->max_rx_pktlen = LIO_MAX_RX_PKTLEN; + + devinfo->max_mac_addrs = 1; + + devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM); + devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_UDP_CKSUM | + DEV_TX_OFFLOAD_TCP_CKSUM); + + devinfo->rx_desc_lim = lio_rx_desc_lim; + devinfo->tx_desc_lim = lio_tx_desc_lim; + + devinfo->reta_size = LIO_RSS_MAX_TABLE_SZ; + devinfo->hash_key_size = LIO_RSS_MAX_KEY_SZ; + devinfo->flow_type_rss_offloads = (ETH_RSS_IPV4 | + ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_IPV6 | + ETH_RSS_NONFRAG_IPV6_TCP | + ETH_RSS_IPV6_EX | + ETH_RSS_IPV6_TCP_EX); +} + static int lio_dev_rss_reta_update(struct rte_eth_dev *eth_dev, struct rte_eth_rss_reta_entry64 *reta_conf, @@ -987,6 +1033,7 @@ static int lio_dev_configure(struct rte_eth_dev *eth_dev) .dev_configure = lio_dev_configure, .dev_start = lio_dev_start, .link_update = lio_dev_link_update, + .dev_infos_get = lio_dev_info_get, .rx_queue_setup = lio_dev_rx_queue_setup, .rx_queue_release = lio_dev_rx_queue_release, .tx_queue_setup = lio_dev_tx_queue_setup, -- 1.8.3.1