From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0072.outbound.protection.outlook.com [104.47.36.72]) by dpdk.org (Postfix) with ESMTP id 9055AD267 for ; Sat, 25 Mar 2017 07:28:43 +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=QX7ix8pBYEaWbttgF2q/5aBjRpfmD7Z7JD41toOoJWEE78RMMx/wriPHlqqX5TYR8LvNzGcYu/pfCq8ZsN3G6QjX7Tg6bX/QbdmmvBwUEd8Gtm5ISxLaMNO/qr7aCbJ602QP7ABaDD8gjnYqEB1H4Zt//6ESKlRplXdwl04B4fQ= 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 CY1PR07MB2280.namprd07.prod.outlook.com (10.164.112.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Sat, 25 Mar 2017 06:28:39 +0000 From: Shijith Thotton To: Ferruh Yigit Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Sat, 25 Mar 2017 11:54:46 +0530 Message-Id: <1490423097-6797-36-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1490423097-6797-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> <1490423097-6797-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: BM1PR01CA0117.INDPRD01.PROD.OUTLOOK.COM (10.174.208.33) To CY1PR07MB2280.namprd07.prod.outlook.com (10.164.112.158) X-MS-Office365-Filtering-Correlation-Id: 76157681-22ca-45d0-709d-08d473482e54 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2280; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 3:l3l9HJ9sSnBaXKD7R3tJkRIT+h///pQQeC/vI3N6UeWR+2U8wm3t/DTq5eauKB1Uv1PcWzoYN2LHieRONsNEzHQKNZVQYVzQkR7i5N7IXqAEhqiIfOgLUuUUUjQqug8E8nmvWxm4VR60Dx8TdBmxvabgXV77Qtx0bDvR2X+EJ8dVbnhmDEu1XxsEQ/XGpvEbIlcqY0daJiHfFpMgfKbLolv3xz1n5/2u8bYJu6ZFfGIJ2yCRLiy0sTtUII+xFBijL/uVa5lNHjJ4FBT220QCEQ==; 25:WVcpW5Yti6adJvpre61Olh4l7q6RiuthWoMe1ljAXHH5CGMLKbUqF/NkCgtNUHABSefi1oicOKeyfGZtQlFgm+pfYzksR6yAivwE2Zwm77HaOb+sDTsTF8MgPLtk5DIlJ22Fo/MrM2aLKet+WrKEYTIoH6yhoM3oCrI8a4sXEnF9/a9j5Ly5RhqIz4Feru0fcmxZ+hc4ohdKCbqVbephiH90DQeARBY0XLzB3Au7Is/G1TlGQdbTOUiJwpLvLmK9j0ZZiT8d7kpambKpbY6gKKtpZdoqNIMAQi7RV77557bqB0LrTmNT2bLoNCXfFqOHqxEtUctnF0qGmPVpwjong99+aFfXunuQJ3BRXYFqgyj5FMWJOLu7v5xl1KCfA3BkNtmsO5RZRJuCIT4mDv1OYdu0MZ3WaypJyi4FLE94qsF+y+wJKHRsWo3fzC3Bq+XCxJyMyvJTUYjNwhQkT12h3A== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 31:MlyqycXmITU4x7tM1JOQT19f+NZEQoIM5rqEkRGiDhh2tnJQfO1Y1wlyCGf3YIrROAQaAWADEOuAFUYuMDbi5NFizjjQvktvcPP7lpzadlu8Gy0LUXU+PcUxDaHN4NzhJWQ9OtgGLJs0+dguNwl4jwkhSvLXYhYMBJ/ku0l1tMhFzesz2rf+8aR4iQFKv+uWwmRyNHBE2lhP+6dI4FQNnZhtIDFR+/d6nolz3VbdbWM=; 20:ZrSXooS/fyAb4wfdLlcVw172QCPhpvRlmZSaiF36K0W710HlzeBW9ZdLPmonweZsrxyCx8+DeDYVGqgs+DCuItIjbnE4UMK5Fk8pidJe939v3JzWmic/1gAXleTAwnvn8/l0WBZWJnhDZbFvA0Q91PzdA4DWC139O9bm/WS9JhlPMqkPmeYYD6VF0+6wjnFN0eLXwBzlzg/CjKYrYhdIJP4+xIibP4+Rgh3eWUigot/tR5BCKlV5WacYbXdriMPBPfDg52zfUTzLUOB6IvGjYOtxcJ6Q8VS+s2DhYBBRD4ojqFZH7Wh08kfgN3fcREiTvP5C7j8zJUFmenXK2UFKbpzCe5iBJgZRLd/zojp9q9mbcp/KxZ+cB+HMyS32crrl3QHJ789kfyUaZJotYyNHtVdocNDS05kP0Wi+A8lbBP61xjDRYQRgZww7Si/83XYzKqtEseMqiU15t0cq+4WSEyO6dAzU1kSgIHPi2x8qH71Am4EngYMA/uFcyD3gvzDeqATUAXPq88hTPWb8NJEkmpVNM0BHJxQspUlwzrK7hqGXjbcY/VG1ucyPSGhg0dIT0IFZrc3Xkh6T1zD8Cj6xlYVIVtXC4FEjZGjfF2/WSO8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123558025)(20161123555025)(6072148); SRVR:CY1PR07MB2280; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2280; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 4:ZBAWry9MCVjgQ0PC1wN32bpNz9ke3WXdhXUSph5Phtgva8UkD5FaR+kL+whly/kj6XK1adpEFgysLST+BIdLxVk7B8X3FCOVx6zyvbivPosFmlw0b8ievjE2oncXPdzVKiUdwMrFRHzQ9Dr3/wXizGKF75nD9T+Q9ANmYfCRbgnhtqCMgzMnD5+Zd9NAVro7bsF/XNGIS5R4uye8vQYNeYzY1PWjzD0Ys7UnF7xcqk+aExHX6HB/VwfRVZ35b1eNRgsKYEC9ZD11YelCzsWkdB6FPmvrFOG1SzuS4VPEHpaTnghW1Aue73OGaxb//e4sq8M/zSVhcjxkB7Fp/TZoWtFTejMTJebai4Z6VtUbahaFVWCCQ+W4VR9YA9ZeNNs1PYHSJtFuCxIymyndBXqCCj/26E2Dvdgf7tJIQ0EPSR2W8OCErMusrXifiJdMp6s0E+3ppJ5R9cy1LW2SuW7C75pGJyX3ulkUSVIs7KQJvXDjnirWXScL6TCW66uPUN6RAY96yR44tRvzCu7SZwUuxrMCpPqG48Hq+qsZ87SUfyyRBqeUkMkDnBBWVUHQMfu7cSwlU6jSl8P4IDQZntksNlNefY6S/NJREV72n384wDY= X-Forefront-PRVS: 025796F161 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39410400002)(39830400002)(2906002)(2950100002)(5003940100001)(66066001)(575784001)(42882006)(6916009)(50466002)(48376002)(47776003)(42186005)(53936002)(6512007)(68736007)(5009440100003)(54906002)(50226002)(38730400002)(6486002)(6666003)(25786009)(305945005)(81166006)(7736002)(6116002)(3846002)(4326008)(8676002)(6506006)(189998001)(36756003)(50986999)(76176999)(33646002)(4720700003)(5660300001)(110136004)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2280; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2280; 23:qLWnajXt7f/Wke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+4EbbLNKIvJm0UddRT8oBiFjm2c6PoCitWVG1X9sxPlG+kIqrKvD?= =?us-ascii?Q?NTLIFhdKI6vZ+0JzOWzwp36Tc35hmPlqLICauIfZomyxOxLtJkFvDHt9ZVzp?= =?us-ascii?Q?HEYpjKYtZjetpoHAKrVcbI5DzmPFKeHDeijKZyob/MRQBtgRdWxM8Cu1fTkL?= =?us-ascii?Q?i2WOcuc0NinCAZcPEeNtOnrkhWJ4D5WQTbbbLphMK65w/HvdA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 6:/tZPfEyHzZESxFM/Wnh6L6cIGDiBehcY4HlKFgTkE1mEysWYKmbfggfr09RlaQ9Ur6PuEdifpRb6PBvZCgEKMRG6FRd0gc1THVD2txfERHv2ydp93hsy+3gEFkz+czvViIsL/jfknMpNK7qSyVfSQ+g74VsnE4WnrTzZ5WaU+Ikr5+t6Oen7n1UQ1lt9cKAqY5RSlm87RbPxeMcJkYbCO/unVokL5h6QkCPWFeKW834xyTagMEVkKgCf2TUJDehWWByplo4H1iv5MeUmArJkNry6MkXRmmvLgJtoUohrgYJtCMvdnYa+JJRP2lK4QOx6cuyy6Pgxi8pifpq8lfxhEIPoHv+nI+RiHI/VY6IUGC2EwbF1Z/E25j4SEFy2IpMB/l7apKTyuthQ99fXoIPxVw==; 5:ZiHY0YbI92JINmtX0olLGn7hYeAYO4z3JzOKUYaugDshTnPKPtTJOPx1zZDGm4c4nxDyum1lcuYKEXbzeLid8Twns8kMhaXaCvnOulO+rKyg9nGd7z4isV8p7ttfvYyhhG6bM/T+JwIw6ljt/jAhAw==; 24:tnNmhT/3HEixBBJ2+C/PKkv/eDsv6WjlA8vjMu+999/LbYx2r4jV9zNbxgqcsFutatmaIvd/gy4/UTraeHPgIwTvzPEwFDJ5Cc+52l/Unn0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 7:LAGlMyqhat+SvC2b5lqx/z7XvayS9nuBJOr3TodNxtaCPOQ39cYlEyPhtjMg0sQDeagd1Zg7V5X7CArcJLsDmH8SLQHL+AscEjjL6FN+DII7Fdbkdc5UJin8W1CiwwlhAqYs1a0/u/BqW0VOJBQM4xbYhtVvqob0D3iS449oLN/i2q3SMshwx7Jyb7O6BuZqPQyHm31rHen2ag6WlswtkqbMzECorKVBt6bUkmN4BBZJGM+gg/ikHCEZwsabHqQWf/xGamExlM77r/fse8FW8K5C9rpjW8UesYQamh0vx/Q38mhO87HaKm4tnN9/Jy38IbXj97YwyHg3nl7kSB5n4w== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2017 06:28:39.4478 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2280 Subject: [dpdk-dev] [PATCH v3 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: Sat, 25 Mar 2017 06:28:44 -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