Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/6685/?format=api
http://patches.dpdk.org/api/patches/6685/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1438392394-19653-1-git-send-email-xnhp0320@icloud.com/", "project": { "id": 1, "url": "http://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": "<1438392394-19653-1-git-send-email-xnhp0320@icloud.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1438392394-19653-1-git-send-email-xnhp0320@icloud.com", "date": "2015-08-01T01:26:34", "name": "[dpdk-dev,new] ixgbe:set txep.mbuf to NULL when calling ixgbe_tx_free_bufs", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "fedde99dbbb828cc29430ba5005c3d194416186d", "submitter": { "id": 295, "url": "http://patches.dpdk.org/api/people/295/?format=api", "name": "hepeng", "email": "xnhp0320@icloud.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1438392394-19653-1-git-send-email-xnhp0320@icloud.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/6685/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/6685/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 04145C34A;\n\tSat, 1 Aug 2015 03:26:48 +0200 (CEST)", "from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com\n\t[17.110.69.252]) by dpdk.org (Postfix) with ESMTP id E0E495A5E\n\tfor <dev@dpdk.org>; Sat, 1 Aug 2015 03:26:46 +0200 (CEST)", "from localhost.localdomain (unknown [112.80.35.2])\n\tby mr11p00im-asmtp001.me.com\n\t(Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar\n\t31 2015))\n\twith ESMTPSA id <0NSD00I57QOFYE10@mr11p00im-asmtp001.me.com> for\n\tdev@dpdk.org; Sat, 01 Aug 2015 01:26:46 +0000 (GMT)" ], "X-Proofpoint-Virus-Version": "vendor=fsecure\n\tengine=2.50.10432:5.14.151,1.0.33,0.0.0000\n\tdefinitions=2015-08-01_01:2015-07-31, 2015-07-31,\n\t1970-01-01 signatures=0", "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 spamscore=0\n\tsuspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0\n\treason=mlx scancount=1 engine=7.0.1-1412110000\n\tdefinitions=main-1508010026", "From": "hepeng <xnhp0320@icloud.com>", "To": "dev@dpdk.org", "Date": "Sat, 01 Aug 2015 09:26:34 +0800", "Message-id": "<1438392394-19653-1-git-send-email-xnhp0320@icloud.com>", "X-Mailer": "git-send-email 1.9.1", "Subject": "[dpdk-dev] [PATCH] [new]ixgbe:set txep.mbuf to NULL when calling\n\tixgbe_tx_free_bufs", "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": "In *ixgbe_tx_free_bufs*, after recycling some tx entries, one should set their mbuf pointers to NULL.\n\nThe first path is not correct, the txep->mbuf should be set to NULL no matter if it is recycled into mempool\nSigned-off-by: hepeng <xnhp0320@icloud.com>\n---\n drivers/net/ixgbe/ixgbe_rxtx_vec.c | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c\nindex 1c16dec..e7ce740 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c\n+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c\n@@ -612,6 +612,7 @@ ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)\n \t */\n \ttxep = &txq->sw_ring_v[txq->tx_next_dd - (n - 1)];\n \tm = __rte_pktmbuf_prefree_seg(txep[0].mbuf);\n+ txep[0].mbuf = NULL;\n \tif (likely(m != NULL)) {\n \t\tfree[0] = m;\n \t\tnb_free = 1;\n@@ -632,11 +633,21 @@ ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)\n \t} else {\n \t\tfor (i = 1; i < n; i++) {\n \t\t\tm = __rte_pktmbuf_prefree_seg(txep[i].mbuf);\n-\t\t\tif (m != NULL)\n+\t\t\tif (m != NULL) {\n \t\t\t\trte_mempool_put(m->pool, m);\n+ }\n \t\t}\n \t}\n \n+ /*\n+ * No matter the mbufs have been put back to mempool or not,\n+ * we should set the txep[i].mbuf to NULL\n+ */\n+\n+ for( i = 1; i < n; i++) {\n+ txep[i].mbuf = NULL;\n+ }\n+\n \t/* buffers were freed, update counters */\n \ttxq->nb_tx_free = (uint16_t)(txq->nb_tx_free + txq->tx_rs_thresh);\n \ttxq->tx_next_dd = (uint16_t)(txq->tx_next_dd + txq->tx_rs_thresh);\n", "prefixes": [ "dpdk-dev", "new" ] }{ "id": 6685, "url": "