Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/40740/?format=api
https://patches.dpdk.org/api/patches/40740/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180607093938.62579-1-yanglong.wu@intel.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": "<20180607093938.62579-1-yanglong.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180607093938.62579-1-yanglong.wu@intel.com", "date": "2018-06-07T09:39:38", "name": "[dpdk-dev] net/i40e: illagel pactket checking", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d3cd5796c81643541ef148e814cf0d68094978cc", "submitter": { "id": 879, "url": "https://patches.dpdk.org/api/people/879/?format=api", "name": "Yanglong Wu", "email": "yanglong.wu@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180607093938.62579-1-yanglong.wu@intel.com/mbox/", "series": [ { "id": 27, "url": "https://patches.dpdk.org/api/series/27/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=27", "date": "2018-06-07T09:39:38", "name": "[dpdk-dev] net/i40e: illagel pactket checking", "version": 1, "mbox": "https://patches.dpdk.org/series/27/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/40740/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/40740/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3B0ED1B1A6;\n\tThu, 7 Jun 2018 11:47:25 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 385B81B167\n\tfor <dev@dpdk.org>; Thu, 7 Jun 2018 11:47:23 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jun 2018 02:47:22 -0700", "from wuyanglong.sh.intel.com ([10.67.111.123])\n\tby fmsmga008.fm.intel.com with ESMTP; 07 Jun 2018 02:47:20 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,486,1520924400\"; d=\"scan'208\";a=\"45964552\"", "From": "Yanglong Wu <yanglong.wu@intel.com>", "To": "dev@dpdk.org", "Cc": "qi.z.zhang@intel.com, konstantin.ananyev@intel.com,\n\tYanglong Wu <yanglong.wu@intel.com>", "Date": "Thu, 7 Jun 2018 17:39:38 +0800", "Message-Id": "<20180607093938.62579-1-yanglong.wu@intel.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[dpdk-dev] [PATCH] net/i40e: illagel pactket checking", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://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": "<https://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": "Some illegal packets will lead to TX/RX hang and\ncan't recover automatically. This pacth check those\nillegal packets and protect TX/RX from hanging.\n\nSigned-off-by: Yanglong Wu <yanglong.wu@intel.com>\n---\n drivers/net/i40e/i40e_rxtx.c | 10 ++++++++++\n drivers/net/i40e/i40e_rxtx.h | 2 ++\n 2 files changed, 12 insertions(+)", "diff": "diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c\nindex 6032d5541..be00b898e 100644\n--- a/drivers/net/i40e/i40e_rxtx.c\n+++ b/drivers/net/i40e/i40e_rxtx.c\n@@ -1458,6 +1458,16 @@ i40e_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\treturn i;\n \t\t}\n \n+\t\t/*check the size of pkt len*/\n+\t\tif (m->pkt_len > ETHER_MAX_LEN || m->pkt_len < I40E_TX_MIN_PKT_LEN){\n+\t\t\trte_errno = -EINVAL;\n+\t\t\treturn i;}\n+\n+\t\t/*check the number of mbuf segments*/\n+\t\tif(m->nb_segs > I40E_TX_MAX_MTU_SEG){\n+\t\t\trte_errno = -EINVAL;\n+\t\t\treturn i;}\n+\n #ifdef RTE_LIBRTE_ETHDEV_DEBUG\n \t\tret = rte_validate_tx_offload(m);\n \t\tif (ret != 0) {\ndiff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h\nindex ea73a8a1b..3fc619af9 100644\n--- a/drivers/net/i40e/i40e_rxtx.h\n+++ b/drivers/net/i40e/i40e_rxtx.h\n@@ -30,6 +30,8 @@\n #define I40E_TX_MAX_SEG UINT8_MAX\n #define I40E_TX_MAX_MTU_SEG 8\n \n+#define I40E_TX_MIN_PKT_LEN 17\n+\n #undef container_of\n #define container_of(ptr, type, member) ({ \\\n \t\ttypeof(((type *)0)->member)(*__mptr) = (ptr); \\\n", "prefixes": [ "dpdk-dev" ] }{ "id": 40740, "url": "