From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0052.outbound.protection.outlook.com [104.47.32.52]) by dpdk.org (Postfix) with ESMTP id AA555F976 for ; Tue, 21 Feb 2017 10:29:36 +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=QSbeXPZWRhoOz9ak6lT8ZTn0/UVvFj+Yp0sPTgpcln0=; b=J8ZUO3dQuFARvqf3JOQa4Dl8DplZvIOiYVtTu/NG3cXiAn6rw0iq/uNqWt4WPdTgDvaxyuQvrfZNHHoLCrJZpC/59u5XCM3CBCN2lK+AtGYAPs1qzmkVbAIyonL+xNwk9awPIiTDHW+J28+gOdAVip8rod+jEAynB58dsRteqys= 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:29:32 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Jerin Jacob , Derek Chickles , Venkat Koppula , Mallesham Jatharakonda Date: Tue, 21 Feb 2017 14:56:43 +0530 Message-Id: <1487669225-30091-29-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: 95bd6e7b-28a0-4e1b-50e6-08d45a3c25f5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:qbsLJELmfS/xLJmlTT45HykLzqNk8S/0nmovxA4Q4TAy3NufW29O6VcaqyUnNfx6U5Mex72TtH1Fgff/i9kTpvRFDuuOLDWRgyaKVtObTbKbcTCBpUfYUA8reJEA7h/SIoYPDH9kiXH96fH0o8nN1tESHgZIwTnqGJOm4G+UG7Wv8o0EQUDI8qvjL659IK9dO1UN88Ns/+DY9+UKAnR9hl+uuwnDJncIGcqXvHvg/62oLtacINCFH9IXgrclRrZQG4vK/J8RPbH2ed8T/CqI9Q==; 25:c1bN60ieekcXb1sPhK5MoS2bpqmQRz6liA1DL8ir4sUXaCMkfn8d0evbTzppFJroR4SmHyECzqi3beS4nYUIQWoSPKjVKKH4LcB25tDirMnTdiH79MDy4zDXGIjAGmCR4MlcrrW6LwLX/g2d1yzbE3MfAtLlzv0CnmvjVniuhc/LB0UjqcPBhXSyZg1D7TLqEK4ZLnTbr+DwYF/x7xNeLI8I/MkfPn0HELFcwKd7MG+hbwMuShnFwE/TCom4Z4Rajwd5GfldRimeHp1xGP6wz9SE+Q7yWJZBiVK64vzPSis/Vstv24dhNa7pVo7Cb3EwjxgG9nJn1qv2A8+yF86iLM1aRmpUmTSjHsOlXWtthdJv8KfL5rw3WymNUWJSjOvz+4k67wDfWcFvpIPGsva0sAMCEPE6pO2W4ZKst7qHvYpja1g73h+iODmR12FNv8FihQTz/nL0BZYlEdZ3bWJ1kw== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:zh6AccQzyhoYRksU3JT249xDRl3nnBJDsyzH7gLrMObZwOyyN2+SU8q6rr+EyO6HLyLVlqC6+sLfTTmpRUBuetmIuZmX/f5KG9wEFDCMjbg04N/FdTs7ZhpTIUUWh0v6tZoC31VklQf1CDCGIJBeFJ/fb7uAmeY+7hIOJkUIUIMuYG5fYJWK/rBj6+4meQQEiNi5gV+udC2G/kMErq1QiB3m3LwwHCZdHDogAKHMfow=; 20:/2TbQ0UfvGYCG/Szdl8RKoCo1mvY632+z+pR6zanCkN25zzwKcDd1g76LAtkOntfbCVT2x8GZDhBLnpJLNOxFTzmuaYYhUnt5A7YlAERFdTWB+lccNZgWcyCnR7x4Nc+5BwkQteE/Aw7MAFVcWMSqHREr6q2N/9xbkZVHcmKSD9tCa5yJ8WmdHHcRk+BNzP2nmqnxSSvA5MjTr7qXo46eLHvv04rVYM9oOnYfrWZ9JTuXMeh82T4p/yE32qY5TDCQvFKbZz72WXPWqTtD3MKALsgfSOb2SjvTkHe9AlihgiRw3NPLs008rIP/L2tbUUuD/MP+TbW+z8OI2FOoTJ0RiMhHtqXeO++hH09gJdq+LFfHVUgQcms/nlbxwffT0r7dPjrwk0oIS54kelqEFsgkhtNAemVZjY8hWTmrZwwP1AYooaVG1X6qZXVn5dBNdkAVVS3qcKieBZ0BVEOEZSg8qfgbETCvslA79GVNmULs7RAV5zPsNCVERf17273H/oMDttKI6ucA8RBxBnzhV0b1/OZx/h0L3XOaZcWVS2vO6sfPNCct9FoAfZVnQgXNCd8S8vrAJohiSo5zeP6MpPyQ1yTqogoO9yR9WTcCzzTRL8= 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:/uOpbbNri05FH/zcAno3nfAdxXvDvbhja7RmesiHIzxJeNvvPVUdVPDnlap3Q+p9fXcCYp3LALg1sslgOZEw6EAvIdopIa/wIyRxQt7II3gOatOxMvKbQohzOQqnR5WJfdbXTQbEGsd1UU1N3zwXe14Fr2ycaOIDpAIJEAjkIMPguZ+GF/3r71/hRlzrrh86+a0CJorNDT5gCrsY20I4vImsdTAYl3E3RbExjwX35tScP5CniY9bEkIdUWCDfe2ot53aeX8eQ9ZSN8UWDjpU/gXMtmqEMpm4+yASRB/o/qVmT9VADi/xsW2T8B8YM9EoQcKTudh3hPw3FA653BeU66KlMrw7jYBhvpeUMZm97SRaDCopyKXFnXDEMlnhvW+bS4zsDOl34hlWGIYaluREU36FaHTEDZNCk18QrU9Jg+2oepZGDlS4KSgZnhS1OgEvoCU0/oJP7N1zUpSmxynlb604YcUMGKueX2/J+kEygqxChsrDHWsuo8xd/7HNN4+LEMgSJLFqGWvpsJflzm41e8OP634E9VOibj/6uMNKw5PF0IEns+8rFvX86TnVG+BB0VGCUUgRyXBqLg7oAgNyN6bO2OE133Ym2W28wnlY4a0= 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)(31430400001)(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:+SF+BTUfDjk12WX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5Ri2hCuXpsXT4hbQ7OQ1p4pfhJkuWa1W6nv/nWqyfrJ56ZkOG0KOFalXNS6iHOOzd572i6bU9OXN68lMD2yg==; 24:CTjrW3jIyTdXKBtVWIuiXjNocYRFQRx2MkckpKP97e/ykmx+3xg4Nl/vZF8covgSUq16+cBEJZ8cyqtaYPF80N45Xvdc3P2Z0Y5QUllz/+o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:vEmwtwB2YiksVWISG160Gc4+Hr+RRh6+gqtVQBPrcXCJX2m3mrLBVA+xMAYoJA1RkqzCssMSWPySoC4p493lk8skzsd7lrsRrbbCl1weDe+V++QUytBI5rLNMStJoC0246S1dQWpF5BRprURRC3oQbetR0EfQAtJiG7wgUgyVi9rlvQGbe1WjZJ/vrCaN0ATjGjFkNsTa7gXepMsRhz+kLSJsIOz6zZSyX111GDfHaavF6hkHEFQbZaZ9zD8QoHZi45kv9cHDUzaou17rnOtJlr1ep7U9LXXDK0SNrrN5o7I3DX7940F22CAzL2y8gcQCSjVvW8paGzPISR8cFAAmw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 09:29:32.8547 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 Subject: [dpdk-dev] [PATCH 28/50] net/liquidio: add APIs for sg list 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:29:37 -0000 SG list is used while sending packets with multiple segments. 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/lio_ethdev.c | 23 ++++++++ drivers/net/liquidio/lio_rxtx.c | 107 ++++++++++++++++++++++++++++++++++++++ drivers/net/liquidio/lio_rxtx.h | 7 +++ drivers/net/liquidio/lio_struct.h | 40 ++++++++++++++ 4 files changed, 177 insertions(+) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index d096edc..8488342 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -202,6 +202,15 @@ return retval; } + retval = lio_setup_sglists(lio_dev, q_no, fw_mapped_iq, + lio_dev->instr_queue[fw_mapped_iq]->max_count, + socket_id); + + if (retval) { + lio_delete_instruction_queue(lio_dev, fw_mapped_iq); + return retval; + } + eth_dev->data->tx_queues[q_no] = lio_dev->instr_queue[fw_mapped_iq]; return 0; @@ -334,6 +343,20 @@ static int lio_dev_configure(struct rte_eth_dev *eth_dev) /* Copy the permanent MAC address */ ether_addr_copy((struct ether_addr *)mac, ð_dev->data->mac_addrs[0]); + lio_dev->glist_lock = + rte_zmalloc(NULL, sizeof(*lio_dev->glist_lock) * num_iqueues, 0); + if (lio_dev->glist_lock == NULL) + return -ENOMEM; + + lio_dev->glist_head = + rte_zmalloc(NULL, sizeof(*lio_dev->glist_head) * num_iqueues, + 0); + if (lio_dev->glist_head == NULL) { + rte_free(lio_dev->glist_lock); + lio_dev->glist_lock = NULL; + return -ENOMEM; + } + lio_dev->port_configured = 1; lio_free_soft_command(sc); diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 11319b2..ec9e184 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -40,6 +40,8 @@ #include "lio_ethdev.h" #include "lio_rxtx.h" +#define LIO_MAX_SG 12 + static void lio_droq_compute_max_packet_bufs(struct lio_droq *droq) { @@ -1272,3 +1274,108 @@ struct lio_soft_command * return 0; } + +static inline struct lio_clist_node * +list_delete_head(struct lio_clist_head *head) +{ + struct lio_clist_node *node; + + if (CIRCLEQ_EMPTY(head)) + node = NULL; + else + node = CIRCLEQ_FIRST(head); + + if (node) + CIRCLEQ_REMOVE(head, node, entries); + + return node; +} + +static void +lio_delete_sglist(struct lio_instr_queue *txq) +{ + struct lio_device *lio_dev = txq->lio_dev; + int iq_no = txq->q_index; + struct lio_gather *g; + + if (lio_dev->glist_head == NULL) + return; + + do { + g = (struct lio_gather *)list_delete_head( + &lio_dev->glist_head[iq_no]); + if (g) { + if (g->sg) + rte_free( + (void *)((unsigned long)g->sg - g->adjust)); + rte_free(g); + } + } while (g); +} + +/** + * \brief Setup gather lists + * @param lio per-network private data + */ +int +lio_setup_sglists(struct lio_device *lio_dev, int iq_no, + int fw_mapped_iq, int num_descs, unsigned int socket_id) +{ + struct lio_gather *g; + int i; + + rte_spinlock_init(&lio_dev->glist_lock[iq_no]); + + CIRCLEQ_INIT(&lio_dev->glist_head[iq_no]); + + for (i = 0; i < num_descs; i++) { + g = rte_zmalloc_socket(NULL, sizeof(*g), RTE_CACHE_LINE_SIZE, + socket_id); + if (g == NULL) { + lio_dev_err(lio_dev, + "lio_gather memory allocation failed for qno %d\n", + iq_no); + break; + } + + g->sg_size = + ((ROUNDUP4(LIO_MAX_SG) >> 2) * LIO_SG_ENTRY_SIZE); + + g->sg = rte_zmalloc_socket(NULL, g->sg_size + 8, + RTE_CACHE_LINE_SIZE, socket_id); + if (g->sg == NULL) { + lio_dev_err(lio_dev, + "sg list memory allocation failed for qno %d\n", + iq_no); + rte_free(g); + break; + } + + /* The gather component should be aligned on 64-bit boundary */ + if (((unsigned long)g->sg) & 7) { + g->adjust = 8 - (((unsigned long)g->sg) & 7); + g->sg = + (struct lio_sg_entry *)((unsigned long)g->sg + + g->adjust); + } + + CIRCLEQ_INSERT_TAIL(&lio_dev->glist_head[iq_no], &g->list, + entries); + } + + if (i != num_descs) { + lio_delete_sglist(lio_dev->instr_queue[fw_mapped_iq]); + return -ENOMEM; + } + + return 0; +} + +void +lio_delete_instruction_queue(struct lio_device *lio_dev, int iq_no) +{ + lio_delete_instr_queue(lio_dev, iq_no); + rte_free(lio_dev->instr_queue[iq_no]); + lio_dev->instr_queue[iq_no] = NULL; + lio_dev->num_iqs--; +} diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h index 6f8ec75..3fe178a 100644 --- a/drivers/net/liquidio/lio_rxtx.h +++ b/drivers/net/liquidio/lio_rxtx.h @@ -42,6 +42,10 @@ #include "lio_struct.h" +#ifndef ROUNDUP4 +#define ROUNDUP4(val) (((val) + 3) & 0xfffffffc) +#endif + #define LIO_CLIST_FIRST_ENTRY(ptr, type, elem) \ (type *)((char *)((ptr)->cqh_first) - offsetof(type, elem)) @@ -548,9 +552,12 @@ uint16_t lio_dev_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); void lio_delete_droq_queue(struct lio_device *lio_dev, int oq_no); +int lio_setup_sglists(struct lio_device *lio_dev, int iq_no, + int fw_mapped_iq, int num_descs, unsigned int socket_id); int lio_setup_iq(struct lio_device *lio_dev, int q_index, union octeon_txpciq iq_no, uint32_t num_descs, void *app_ctx, unsigned int socket_id); +void lio_delete_instruction_queue(struct lio_device *lio_dev, int iq_no); /** Setup instruction queue zero for the device * @param lio_dev which lio device to setup * diff --git a/drivers/net/liquidio/lio_struct.h b/drivers/net/liquidio/lio_struct.h index bb4618f..1280785 100644 --- a/drivers/net/liquidio/lio_struct.h +++ b/drivers/net/liquidio/lio_struct.h @@ -298,6 +298,41 @@ struct lio_instr_queue { const struct rte_memzone *iq_mz; }; +/* The Scatter-Gather List Entry. The scatter or gather component used with + * input instruction has this format. + */ +struct lio_sg_entry { + /** The first 64 bit gives the size of data in each dptr. */ + union { + uint16_t size[4]; + uint64_t size64; + } u; + + /** The 4 dptr pointers for this entry. */ + uint64_t ptr[4]; +}; + +#define LIO_SG_ENTRY_SIZE (sizeof(struct lio_sg_entry)) + +/** Structure of a node in list of gather components maintained by + * driver for each network device. + */ +struct lio_gather { + /** List manipulation. Next and prev pointers. */ + struct lio_clist_node list; + + /** Size of the gather component at sg in bytes. */ + int sg_size; + + /** Number of bytes that sg was adjusted to make it 8B-aligned. */ + int adjust; + + /** Gather component that can accommodate max sized fragment list + * received from the IP layer. + */ + struct lio_sg_entry *sg; +}; + struct lio_io_enable { uint64_t iq; uint64_t oq; @@ -516,6 +551,11 @@ struct lio_device { uint32_t num_iqs; + /** Guards each glist */ + rte_spinlock_t *glist_lock; + /** Array of gather component linked lists */ + struct lio_clist_head *glist_head; + /* The pool containing pre allocated buffers used for soft commands */ struct rte_mempool *sc_buf_pool; -- 1.8.3.1