Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44328/?format=api
https://patches.dpdk.org/api/patches/44328/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1536249776-41490-1-git-send-email-alejandro.lucero@netronome.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": "<1536249776-41490-1-git-send-email-alejandro.lucero@netronome.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1536249776-41490-1-git-send-email-alejandro.lucero@netronome.com", "date": "2018-09-06T16:02:56", "name": "net/nfp: fix mbuf flags with cksum good", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "15b1723941aea1a02b1051638f1c60f561010f1a", "submitter": { "id": 270, "url": "https://patches.dpdk.org/api/people/270/?format=api", "name": "Alejandro Lucero", "email": "alejandro.lucero@netronome.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1536249776-41490-1-git-send-email-alejandro.lucero@netronome.com/mbox/", "series": [ { "id": 1208, "url": "https://patches.dpdk.org/api/series/1208/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1208", "date": "2018-09-06T16:02:56", "name": "net/nfp: fix mbuf flags with cksum good", "version": 1, "mbox": "https://patches.dpdk.org/series/1208/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44328/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44328/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 F2C10326D;\n\tThu, 6 Sep 2018 18:03:55 +0200 (CEST)", "from netronome.com (host-79-78-33-110.static.as9105.net\n\t[79.78.33.110]) by dpdk.org (Postfix) with ESMTP id AD872326C;\n\tThu, 6 Sep 2018 18:03:54 +0200 (CEST)", "from netronome.com (localhost [127.0.0.1])\n\tby netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id\n\tw86G2u3j041528; Thu, 6 Sep 2018 17:02:56 +0100", "(from alucero@localhost)\n\tby netronome.com (8.14.4/8.14.4/Submit) id w86G2uIU041527;\n\tThu, 6 Sep 2018 17:02:56 +0100" ], "From": "Alejandro Lucero <alejandro.lucero@netronome.com>", "To": "dev@dpdk.org", "Cc": "stable@dpdk.org", "Date": "Thu, 6 Sep 2018 17:02:56 +0100", "Message-Id": "<1536249776-41490-1-git-send-email-alejandro.lucero@netronome.com>", "X-Mailer": "git-send-email 1.9.1", "Subject": "[dpdk-dev] [PATCH] net/nfp: fix mbuf flags with cksum good", "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://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "If checksum offload enabled and hardware reports checksum as good,\nupdate mbuf ol_flags with proper *_CKSUM_GOOD bits.\n\nFixes: b812daadad0d (\"nfp: add Rx and Tx\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>\n---\n drivers/net/nfp/nfp_net.c | 15 +++++++--------\n drivers/net/nfp/nfp_net_pmd.h | 2 ++\n 2 files changed, 9 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c\nindex 6e5e305..760a66a 100644\n--- a/drivers/net/nfp/nfp_net.c\n+++ b/drivers/net/nfp/nfp_net.c\n@@ -1786,21 +1786,20 @@ enum nfp_qcp_ptr {\n \t\treturn;\n \n \t/* If IPv4 and IP checksum error, fail */\n-\tif ((rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM) &&\n-\t !(rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM_OK))\n+\tif (unlikely((rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM) &&\n+\t !(rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM_OK)))\n \t\tmb->ol_flags |= PKT_RX_IP_CKSUM_BAD;\n+\telse\n+\t\tmb->ol_flags |= PKT_RX_IP_CKSUM_GOOD;\n \n \t/* If neither UDP nor TCP return */\n \tif (!(rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM) &&\n \t !(rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM))\n \t\treturn;\n \n-\tif ((rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM) &&\n-\t !(rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM_OK))\n-\t\tmb->ol_flags |= PKT_RX_L4_CKSUM_BAD;\n-\n-\tif ((rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM) &&\n-\t !(rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM_OK))\n+\tif (likely(rxd->rxd.flags & PCIE_DESC_RX_L4_CSUM_OK))\n+\t\tmb->ol_flags |= PKT_RX_L4_CKSUM_GOOD;\n+\telse\n \t\tmb->ol_flags |= PKT_RX_L4_CKSUM_BAD;\n }\n \ndiff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h\nindex c1b044e..b01036d 100644\n--- a/drivers/net/nfp/nfp_net_pmd.h\n+++ b/drivers/net/nfp/nfp_net_pmd.h\n@@ -293,6 +293,8 @@ struct nfp_net_txq {\n #define PCIE_DESC_RX_UDP_CSUM_OK (1 << 1)\n #define PCIE_DESC_RX_VLAN (1 << 0)\n \n+#define PCIE_DESC_RX_L4_CSUM_OK (PCIE_DESC_RX_TCP_CSUM_OK | \\\n+\t\t\t\t\t PCIE_DESC_RX_UDP_CSUM_OK)\n struct nfp_net_rx_desc {\n \tunion {\n \t\t/* Freelist descriptor */\n", "prefixes": [] }{ "id": 44328, "url": "