Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7363/?format=api
https://patches.dpdk.org/api/patches/7363/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/bc0b8868645588be593abc48eb5c2138d75c0e0b.1443704150.git.rahul.lakkireddy@chelsio.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<bc0b8868645588be593abc48eb5c2138d75c0e0b.1443704150.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": "https://inbox.dpdk.org/dev/bc0b8868645588be593abc48eb5c2138d75c0e0b.1443704150.git.rahul.lakkireddy@chelsio.com", "date": "2015-10-02T11:16:52", "name": "[dpdk-dev,3/6] cxgbe: Update tx path to transmit jumbo frames", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d200c562a644f0aa0660dc4c5b936d8d173e0b1f", "submitter": { "id": 241, "url": "https://patches.dpdk.org/api/people/241/?format=api", "name": "Rahul Lakkireddy", "email": "rahul.lakkireddy@chelsio.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/bc0b8868645588be593abc48eb5c2138d75c0e0b.1443704150.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7363/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7363/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C23358E7F;\n\tFri, 2 Oct 2015 13:17:38 +0200 (CEST)", "from stargate3.asicdesigners.com (stargate.chelsio.com\n\t[67.207.112.58]) by dpdk.org (Postfix) with ESMTP id E0AC48E7D\n\tfor <dev@dpdk.org>; Fri, 2 Oct 2015 13:17:36 +0200 (CEST)", "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id\n\tt92BHYu0005247; Fri, 2 Oct 2015 04:17:34 -0700" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "dev@dpdk.org", "Date": "Fri, 2 Oct 2015 16:46:52 +0530", "Message-Id": "<bc0b8868645588be593abc48eb5c2138d75c0e0b.1443704150.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>", "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>", "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>" ], "Cc": "Kumar Sanghvi <kumaras@chelsio.com>, Felix Marti <felix@chelsio.com>,\n\tNirranjan Kirubaharan <nirranjan@chelsio.com>", "Subject": "[dpdk-dev] [PATCH 3/6] cxgbe: Update tx path to transmit jumbo\n\tframes", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add a non-coalesce path. Skip coalescing for Jumbo Frames, and send the\npacket through non-coalesced path if there are enough credits. Also,\nfree these non-coalesced packets while reclaiming credits.\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\n---\n drivers/net/cxgbe/sge.c | 96 ++++++++++++++++++++++++++++++++-----------------\n 1 file changed, 64 insertions(+), 32 deletions(-)", "diff": "diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c\nindex e540881..921173a 100644\n--- a/drivers/net/cxgbe/sge.c\n+++ b/drivers/net/cxgbe/sge.c\n@@ -199,11 +199,20 @@ static void free_tx_desc(struct sge_txq *q, unsigned int n)\n \n static void reclaim_tx_desc(struct sge_txq *q, unsigned int n)\n {\n+\tstruct tx_sw_desc *d;\n \tunsigned int cidx = q->cidx;\n \n+\td = &q->sdesc[cidx];\n \twhile (n--) {\n-\t\tif (++cidx == q->size)\n+\t\tif (d->mbuf) { /* an SGL is present */\n+\t\t\trte_pktmbuf_free(d->mbuf);\n+\t\t\td->mbuf = NULL;\n+\t\t}\n+\t\t++d;\n+\t\tif (++cidx == q->size) {\n \t\t\tcidx = 0;\n+\t\t\td = q->sdesc;\n+\t\t}\n \t}\n \tq->cidx = cidx;\n }\n@@ -1045,6 +1054,7 @@ int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf)\n \tu32 wr_mid;\n \tu64 cntrl, *end;\n \tbool v6;\n+\tu32 max_pkt_len = txq->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;\n \n \t/* Reject xmit if queue is stopped */\n \tif (unlikely(txq->flags & EQ_STOPPED))\n@@ -1060,6 +1070,10 @@ out_free:\n \t\treturn 0;\n \t}\n \n+\tif ((!(m->ol_flags & PKT_TX_TCP_SEG)) &&\n+\t (unlikely(m->pkt_len > max_pkt_len)))\n+\t\tgoto out_free;\n+\n \tpi = (struct port_info *)txq->eth_dev->data->dev_private;\n \tadap = pi->adapter;\n \n@@ -1067,7 +1081,7 @@ out_free:\n \t/* align the end of coalesce WR to a 512 byte boundary */\n \ttxq->q.coalesce.max = (8 - (txq->q.pidx & 7)) * 8;\n \n-\tif (!(m->ol_flags & PKT_TX_TCP_SEG)) {\n+\tif (!((m->ol_flags & PKT_TX_TCP_SEG) || (m->pkt_len > ETHER_MAX_LEN))) {\n \t\tif (should_tx_packet_coalesce(txq, mbuf, &cflits, adap)) {\n \t\t\tif (unlikely(map_mbuf(mbuf, addr) < 0)) {\n \t\t\t\tdev_warn(adap, \"%s: mapping err for coalesce\\n\",\n@@ -1114,33 +1128,46 @@ out_free:\n \n \tlen = 0;\n \tlen += sizeof(*cpl);\n-\tlso = (void *)(wr + 1);\n-\tv6 = (m->ol_flags & PKT_TX_IPV6) != 0;\n-\tl3hdr_len = m->l3_len;\n-\tl4hdr_len = m->l4_len;\n-\teth_xtra_len = m->l2_len - ETHER_HDR_LEN;\n-\tlen += sizeof(*lso);\n-\twr->op_immdlen = htonl(V_FW_WR_OP(FW_ETH_TX_PKT_WR) |\n-\t\t\t V_FW_WR_IMMDLEN(len));\n-\tlso->lso_ctrl = htonl(V_LSO_OPCODE(CPL_TX_PKT_LSO) |\n-\t\t\t F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE |\n-\t\t\t V_LSO_IPV6(v6) |\n-\t\t\t V_LSO_ETHHDR_LEN(eth_xtra_len / 4) |\n-\t\t\t V_LSO_IPHDR_LEN(l3hdr_len / 4) |\n-\t\t\t V_LSO_TCPHDR_LEN(l4hdr_len / 4));\n-\tlso->ipid_ofst = htons(0);\n-\tlso->mss = htons(m->tso_segsz);\n-\tlso->seqno_offset = htonl(0);\n-\tif (is_t4(adap->params.chip))\n-\t\tlso->len = htonl(m->pkt_len);\n-\telse\n-\t\tlso->len = htonl(V_LSO_T5_XFER_SIZE(m->pkt_len));\n-\tcpl = (void *)(lso + 1);\n-\tcntrl = V_TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) |\n-\t\t\t\t V_TXPKT_IPHDR_LEN(l3hdr_len) |\n-\t\t\t\t V_TXPKT_ETHHDR_LEN(eth_xtra_len);\n-\ttxq->stats.tso++;\n-\ttxq->stats.tx_cso += m->tso_segsz;\n+\n+\t/* Coalescing skipped and we send through normal path */\n+\tif (!(m->ol_flags & PKT_TX_TCP_SEG)) {\n+\t\twr->op_immdlen = htonl(V_FW_WR_OP(FW_ETH_TX_PKT_WR) |\n+\t\t\t\t V_FW_WR_IMMDLEN(len));\n+\t\tcpl = (void *)(wr + 1);\n+\t\tif (m->ol_flags & PKT_TX_IP_CKSUM) {\n+\t\t\tcntrl = hwcsum(adap->params.chip, m) |\n+\t\t\t\tF_TXPKT_IPCSUM_DIS;\n+\t\t\ttxq->stats.tx_cso++;\n+\t\t}\n+\t} else {\n+\t\tlso = (void *)(wr + 1);\n+\t\tv6 = (m->ol_flags & PKT_TX_IPV6) != 0;\n+\t\tl3hdr_len = m->l3_len;\n+\t\tl4hdr_len = m->l4_len;\n+\t\teth_xtra_len = m->l2_len - ETHER_HDR_LEN;\n+\t\tlen += sizeof(*lso);\n+\t\twr->op_immdlen = htonl(V_FW_WR_OP(FW_ETH_TX_PKT_WR) |\n+\t\t\t\t V_FW_WR_IMMDLEN(len));\n+\t\tlso->lso_ctrl = htonl(V_LSO_OPCODE(CPL_TX_PKT_LSO) |\n+\t\t\t\t F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE |\n+\t\t\t\t V_LSO_IPV6(v6) |\n+\t\t\t\t V_LSO_ETHHDR_LEN(eth_xtra_len / 4) |\n+\t\t\t\t V_LSO_IPHDR_LEN(l3hdr_len / 4) |\n+\t\t\t\t V_LSO_TCPHDR_LEN(l4hdr_len / 4));\n+\t\tlso->ipid_ofst = htons(0);\n+\t\tlso->mss = htons(m->tso_segsz);\n+\t\tlso->seqno_offset = htonl(0);\n+\t\tif (is_t4(adap->params.chip))\n+\t\t\tlso->len = htonl(m->pkt_len);\n+\t\telse\n+\t\t\tlso->len = htonl(V_LSO_T5_XFER_SIZE(m->pkt_len));\n+\t\tcpl = (void *)(lso + 1);\n+\t\tcntrl = V_TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) |\n+\t\t\tV_TXPKT_IPHDR_LEN(l3hdr_len) |\n+\t\t\tV_TXPKT_ETHHDR_LEN(eth_xtra_len);\n+\t\ttxq->stats.tso++;\n+\t\ttxq->stats.tx_cso += m->tso_segsz;\n+\t}\n \n \tif (m->ol_flags & PKT_TX_VLAN_PKT) {\n \t\ttxq->stats.vlan_ins++;\n@@ -1161,9 +1188,14 @@ out_free:\n \t\tlast_desc -= txq->q.size;\n \n \td = &txq->q.sdesc[last_desc];\n-\tif (d->mbuf) {\n-\t\trte_pktmbuf_free(d->mbuf);\n-\t\td->mbuf = NULL;\n+\tif (d->coalesce.idx) {\n+\t\tint i;\n+\n+\t\tfor (i = 0; i < d->coalesce.idx; i++) {\n+\t\t\trte_pktmbuf_free(d->coalesce.mbuf[i]);\n+\t\t\td->coalesce.mbuf[i] = NULL;\n+\t\t}\n+\t\td->coalesce.idx = 0;\n \t}\n \twrite_sgl(m, &txq->q, (struct ulptx_sgl *)(cpl + 1), end, 0,\n \t\t addr);\n", "prefixes": [ "dpdk-dev", "3/6" ] }{ "id": 7363, "url": "