From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0044.outbound.protection.outlook.com [104.47.32.44]) by dpdk.org (Postfix) with ESMTP id CD56E379B for ; Tue, 21 Feb 2017 10:30:12 +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=0Ht2PQoHW+QK4Y0/8/45gO0DqVEv4tL6zbS5tjsm2J8=; b=RQJ+WnQvyH+UrcNbLMcTQl5ZDMsB+Pm6GPSLcNublf/DVWOZWK9A8fRvjWkaLjT1Y6smDWPDg+wBMYSg1sjeqdJLHEO0x3AB/HUvQun3EakSOoeMGOAIJY1zVC3TN/tOhL5eeU5s9hYX9LUpfWRcQBVfFSqtU24SAOk6akp+yPM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shijith.Thotton@cavium.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Tue, 21 Feb 2017 09:30:05 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Jerin Jacob , Derek Chickles , Venkat Koppula , Mallesham Jatharakonda Date: Tue, 21 Feb 2017 14:56:54 +0530 Message-Id: <1487669225-30091-40-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-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: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (10.174.56.29) To SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) X-MS-Office365-Filtering-Correlation-Id: 54ad2589-fae0-4874-2944-08d45a3c39af X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:Ea/G1L6W6nRP42MBRJspwMSu+ECsbRhG7LBarP8V7gSk9/ofx+GjqPAZrcmfv6Wb97wj8Fjx6HTRmQof42TumoB85Kll9rg3X13Nv2/ij25utxXDaLLvrrkpGGdnNRpoq9yAUpCupAKOoWDcBlF8nabzf7FhZ2Iqa6dld3/XHQ40llIyCvdFgE/6MGGtyZsOTqlMJAt5GapdYujf4XMDnvBUz6zt0OaF8J3k3Ip+t4OwcNj23A2WiOZVxGxMWRNPnDjJk+nDV+BaSFUeMn5EJg==; 25:CCXeKg5+0ZoS3kmi6aVc2lTsIduiVyKS52hOAsR2K9o8y3qfUwwEhq2KlKFlP+hwfY7INfy08p8NVEd6dPgt3ZDCTTqroRolqMlwNH8naFrO6DOOp2v8+L47CR8oyu6u/Tx0PVSASLd0xdfmurj5KmRnjEbhdyAY6v5VeHoEHrkAto4z7UvXOO4fmRWAq6wAhWz5rs1okSnGEoNQGys/ZJ/Rnwdn9WvAwBr/prB+30D6Jm0n/rVizT1mt6b5M66OtM26mik6ISEtHTMax/iEN9CMklWWSLqRGYVsaIql4rBooe2awUmbioV9QQtEEB5bvEr5vIGGwjwJXC7jwuwklzwbt8IW78bUAWscdrqisU7a4kEaGx7WBymYMvwRQ1/hpder7N0sOXrchYNZng8whxtYfE1TK384M1HW2Vys6FxU47pvWGg6QBGgWuGa/jH7yHpMwPNZdApOul+N/nlmeQ== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:xaatn9VSEAR8s4fZVpIvk/9jHEaa5KvTrWeTBZVeHgro5xdy+FUjkkdC4Phs+0xSyWqjvPZA7YB6TueCh3Db1k7I3NYbGvqdd3ro42DwNM8p4GuiNuDz3TXTqn20gSpOESWYy6TUOFG4uxFHQKO9VrPHuS4+cVE8W2zRLcOu4OYWWkZ+QjxaOQXGTjpfP3KKFNM5RhYZMPorRMA4I9X2B05CTnjxSHERxz8foGBnH3s=; 20:duzMWHH7xDyKciV+PGGt6SxPJ8mawza9NLjECwNACn4hYFhv8QoFrA6W572kQVjzAvrVpky5HAoft0jyW+zhC4ng3j7+1UDTerGphyBJYEGekF1lMJH9Hwu2DHzCQQoPgZ9r1iPl1LruKWnCs+x+gXEHaBRSYtW5Eg11oNWiYqYks9SmlJV6jnld/iwLATj6FMSdNlKc1iHD/AYkdoX4AZRYHv0a1Rf9GkXcdlrIkAqFCEEK9gCVEVwbbbHu9MJt/1le/nOopjjBdfLlBLd3VVSjeLCNngQVZJrYWi2RHMNk4kxDxrNvw+kw+2yNN+pIg8wtkUaJ6N0vWHK0Mzxj7iwXtduHm/bHBZpA7qyWiuy1FfPSPHFmAqBdnnPRFmLuYOq5htcXk0uvvTAo7O5JuYe2aKEPXEpyEFZgy7/+R+V2AvUDOjhzYkez14/DY1S27VBUcb/rtHvg64PbTeofMjKc6FiDPB3XGUmtrBHdXzeGYkj3g+mp6VdlHihBohAlpTm7eIjr0d99v7oK62/JDr5xyipFsOMPETkpDIZoe33W6iyCzZETFRwrJsqq0+0S9EqX2l6hkm2JdShVuLG2x1budUWvpFZpr2uzEKhLm7k= 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)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:SN1PR07MB2285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 4:ePyNW6mAIYTsfHF2Qvdku99UAm1PD2PCjf+8Fa5T9jTglWeCjGaNx0MfTtljtTtahi60eBlXRDc7iNLljYiVKxMrPniZL3R8hy3DhBnnKd70Fww9Io9wrI+EIt64CRwuNqR45R098T/CZghnRN0SRsj6mKw0kNQKX/u0LgSAX2s+zuaPzObX6x/AxP5eCjK0RONR1/2IBdedrqNBOQL49ws1YpiSO2dAigP/je6A1gcuRP2bF5SBPDOQ8ZmMpEND2RoooFQqPA2nDbkFqYWXN04XlR0BMVfUa6JqngEX7tN1SqInFa1QWFI5RXpqLhgtZxXo71R1wu6/krlBQl4wU53gueIMoYqvT322OsTY55epz5LdHA7enwcr2qNYNPCDAXtLpygQSyJdO75K6iElVhdp2n1ABPdpjHZa9CnBrkkb/svkUcGFxKDZyfIPQMCsLuoKavShs+Sx2MVd/lEXpFMpo/u6f2IYdEh/UPWa6AKx1GALfIFbQ3Sj9kvZPESCjSh8PVQa5Wc5uCRFIrZ0gtMKxFusjZ2M0sQU+ydKEXJz1xv7p87wkcJxNTVRhSyXagqe4tmtUbkCh1lLfZAli5FV1c2cKumNvTgdWim9bY4= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39410400002)(39830400002)(189002)(199003)(50226002)(81166006)(42186005)(2361001)(101416001)(81156014)(305945005)(3846002)(6116002)(5009440100003)(8676002)(105586002)(7736002)(53936002)(36756003)(110136004)(106356001)(6506006)(25786008)(38730400002)(2351001)(92566002)(48376002)(6486002)(97736004)(50466002)(5003940100001)(189998001)(68736007)(2906002)(4326007)(33646002)(76176999)(54906002)(5660300001)(6666003)(6916009)(50986999)(2950100002)(6512007)(4720700003)(42882006)(66066001)(47776003)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2285; H:lio357.in.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SN1PR07MB2285; 23:AHvwunmq2sP2gvZHMtyYnAt1DdAAGNhyyv62A1hu5?= =?us-ascii?Q?H482BjOlQEUXWaIhA4jwGMBhd/v3L8uIS1jd6yJCIriZqERCcwV6EX+PWDOp?= =?us-ascii?Q?OStr2v1ZrRmhN4dtO3EfstyrergIk467NrM/UJikxt1hc4mP28iNAMpkPnat?= =?us-ascii?Q?VFzHxm6M4xqIqS5PwNBLfg9CWSAzkRqjBIYDk3iwwceY0ZRzYZXmDBgRUL6j?= =?us-ascii?Q?OjJ310xeP1Y87pE4nbr0iTK+OJOmERS2lEUk2nYWodk0ppt3k7bwqWP4esR4?= =?us-ascii?Q?EX0oek+0RUBixPvA9E4aR9ACwe6lVzBqeEmXqnxsFn5rn0esZhyTbfXmmgml?= =?us-ascii?Q?/j82cod8R8N2cQj5gVKvJ+ndlra8n9nS/hV/EkpPO2kMs3V4aErJCoaapOhw?= =?us-ascii?Q?NHka4ksBSwMrAICU0hOgxf4cNSXmcCxs7VkGlsdaU/jGvg38MSm9owfbihxX?= =?us-ascii?Q?6X67XtpvNknkx8cRDrtME8mC21l2PeOXmpHSqJC1+bE7Tubcvvdkr2T085ZE?= =?us-ascii?Q?VDOxrhYCVmRVFKOwlc8SWq9MChS9eXZDI44W6T9aScleGCtSmHvYisYiodto?= =?us-ascii?Q?ztQmr77Z43SQh0FR+Tf+Qe/t06I6R+7/ZcrTdyZjgjsAp3ruJqF3eTApZtM3?= =?us-ascii?Q?fJG3uJBNxJrTNuDlXXgp+nnMv8ruDjLuVokojQVaUlP/+suuJ7Y3W0a0sGV7?= =?us-ascii?Q?7H+8T7AY8nXM5keycdRz7HfxQ4i/3L3AlPmSWGn/kWzWJovKi6PlbsZBfo5H?= =?us-ascii?Q?jF7iEAv8baMVWbtseYfRJfIoF9QiBIRBVJtV0Un6lJ+HnbPnp5t4B35LTmEo?= =?us-ascii?Q?pAr585aWvCinFhZjNwWcnKloh94hS1hW12dYyAclz1gBQRgfFMslUVsByhwv?= =?us-ascii?Q?hPKvne9whOp1oZRstBZ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3fgPXx3lv72k2k9RUszyNrIdezfFiQ3TWG28AHdYIufli5GA==; 24:apUPADF4ge7NmoM+gllvjGYgvy6LU1eFBeTsiO2kG6Wp8d+q6D8rouEB2NCNZlFsPtXhudr5Zxvlo/pykxho14zRkmk9n1O9bNung0XBBw4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:oqMcCGm8obCRhzIV4nZW4Tj9LDcjeSVtPrdGvChYh0Zew3C6FMge0DMVjhvVEX6H93wgGVzzC+fzewL3iuSjBbopjAXDYC2QTwH9cN6gpq2gHxgOi1laEfFr1PA77uv5yhpq2rndDBd6l06A2ujPyP/psIC+J6tyayRbJto5DmD6x0Eab5ACyAbYf04P9yNf4CgjSqInFuPwPbFDKlYpRDeX2JF9yYL6j7muNyqzcElDLC5KgmQa8RR4G6Er5sOkTWFQ4tavUNrCy/BeEERBNHIF7i9tGtRrBcjXRBn9WwiRl19tfMlGAvVA6Ff/l+V8hFdt307NerJY5YYqMBlPUw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 09:30:05.9337 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 Subject: [dpdk-dev] [PATCH 39/50] 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: Tue, 21 Feb 2017 09:30:13 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula 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 d0210e5..d4be699 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 70b4c45..ad827f8 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