get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1171157/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1171157,
    "url": "http://patchwork.ozlabs.org/api/patches/1171157/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191003104305.42463-1-sasha.neftin@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20191003104305.42463-1-sasha.neftin@intel.com>",
    "list_archive_url": null,
    "date": "2019-10-03T10:43:05",
    "name": "[v1] igc: Add rx checksum support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d72ad5bf4623f6aa6204318764e7b61c3cab6073",
    "submitter": {
        "id": 69860,
        "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api",
        "name": "Sasha Neftin",
        "email": "sasha.neftin@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191003104305.42463-1-sasha.neftin@intel.com/mbox/",
    "series": [
        {
            "id": 133949,
            "url": "http://patchwork.ozlabs.org/api/series/133949/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=133949",
            "date": "2019-10-03T10:43:05",
            "name": "[v1] igc: Add rx checksum support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/133949/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1171157/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1171157/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 46kV380tCtz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  3 Oct 2019 20:43:13 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DDDDC84CEC;\n\tThu,  3 Oct 2019 10:43:10 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id X5O6gt0194tt; Thu,  3 Oct 2019 10:43:10 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 31DB185734;\n\tThu,  3 Oct 2019 10:43:10 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 657BC1BF4E6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 Oct 2019 10:43:09 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 61EBD84CEC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 Oct 2019 10:43:09 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 36j2uBgz3lXk for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 Oct 2019 10:43:08 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 4598C85194\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 Oct 2019 10:43:08 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Oct 2019 03:43:07 -0700",
            "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby fmsmga001.fm.intel.com with ESMTP; 03 Oct 2019 03:43:06 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,251,1566889200\"; d=\"scan'208\";a=\"205589895\"",
        "From": "Sasha Neftin <sasha.neftin@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  3 Oct 2019 13:43:05 +0300",
        "Message-Id": "<20191003104305.42463-1-sasha.neftin@intel.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[Intel-wired-lan] [PATCH v1] igc: Add rx checksum support",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Extend the socket buffer field process and add rx checksum functionality\nMinor: fix indentation with tab instead of spaces.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_defines.h |  5 +++-\n drivers/net/ethernet/intel/igc/igc_main.c    | 43 ++++++++++++++++++++++++++++\n 2 files changed, 47 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h\nindex 03f1aca3f57f..f3788f0b95b4 100644\n--- a/drivers/net/ethernet/intel/igc/igc_defines.h\n+++ b/drivers/net/ethernet/intel/igc/igc_defines.h\n@@ -282,7 +282,10 @@\n #define IGC_RCTL_BAM\t\t0x00008000 /* broadcast enable */\n \n /* Receive Descriptor bit definitions */\n-#define IGC_RXD_STAT_EOP\t0x02    /* End of Packet */\n+#define IGC_RXD_STAT_EOP\t0x02\t/* End of Packet */\n+#define IGC_RXD_STAT_IXSM\t0x04\t/* Ignore checksum */\n+#define IGC_RXD_STAT_UDPCS\t0x10\t/* UDP xsum calculated */\n+#define IGC_RXD_STAT_TCPCS\t0x20\t/* TCP xsum calculated */\n \n #define IGC_RXDEXT_STATERR_CE\t\t0x01000000\n #define IGC_RXDEXT_STATERR_SE\t\t0x02000000\ndiff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex a861fc038721..52521a0bbf48 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -1201,6 +1201,46 @@ static netdev_tx_t igc_xmit_frame(struct sk_buff *skb,\n \treturn igc_xmit_frame_ring(skb, igc_tx_queue_mapping(adapter, skb));\n }\n \n+static inline void igc_rx_checksum(struct igc_ring *ring,\n+\t\t\t\t   union igc_adv_rx_desc *rx_desc,\n+\t\t\t\t   struct sk_buff *skb)\n+{\n+\tskb_checksum_none_assert(skb);\n+\n+\t/* Ignore Checksum bit is set */\n+\tif (igc_test_staterr(rx_desc, IGC_RXD_STAT_IXSM))\n+\t\treturn;\n+\n+\t/* Rx checksum disabled via ethtool */\n+\tif (!(ring->netdev->features & NETIF_F_RXCSUM))\n+\t\treturn;\n+\n+\t/* TCP/UDP checksum error bit is set */\n+\tif (igc_test_staterr(rx_desc,\n+\t\t\t     IGC_RXDEXT_STATERR_TCPE |\n+\t\t\t     IGC_RXDEXT_STATERR_IPE)) {\n+\t\t/* work around errata with sctp packets where the TCPE aka\n+\t\t * L4E bit is set incorrectly on 64 byte (60 byte w/o crc)\n+\t\t * packets, (aka let the stack check the crc32c)\n+\t\t */\n+\t\tif (!(skb->len == 60 &&\n+\t\t      test_bit(IGC_RING_FLAG_RX_SCTP_CSUM, &ring->flags))) {\n+\t\t\tu64_stats_update_begin(&ring->rx_syncp);\n+\t\t\tring->rx_stats.csum_err++;\n+\t\t\tu64_stats_update_end(&ring->rx_syncp);\n+\t\t}\n+\t\t/* let the stack verify checksum errors */\n+\t\treturn;\n+\t}\n+\t/* It must be a TCP or UDP packet with a valid checksum */\n+\tif (igc_test_staterr(rx_desc, IGC_RXD_STAT_TCPCS |\n+\t\t\t\t      IGC_RXD_STAT_UDPCS))\n+\t\tskb->ip_summed = CHECKSUM_UNNECESSARY;\n+\n+\tdev_dbg(ring->dev, \"cksum success: bits %08X\\n\",\n+\t\tle32_to_cpu(rx_desc->wb.upper.status_error));\n+}\n+\n static inline void igc_rx_hash(struct igc_ring *ring,\n \t\t\t       union igc_adv_rx_desc *rx_desc,\n \t\t\t       struct sk_buff *skb)\n@@ -1227,6 +1267,8 @@ static void igc_process_skb_fields(struct igc_ring *rx_ring,\n {\n \tigc_rx_hash(rx_ring, rx_desc, skb);\n \n+\tigc_rx_checksum(rx_ring, rx_desc, skb);\n+\n \tskb_record_rx_queue(skb, rx_ring->queue_index);\n \n \tskb->protocol = eth_type_trans(skb, rx_ring->netdev);\n@@ -4392,6 +4434,7 @@ static int igc_probe(struct pci_dev *pdev,\n \t\tgoto err_sw_init;\n \n \t/* Add supported features to the features list*/\n+\tnetdev->features |= NETIF_F_RXCSUM;\n \tnetdev->features |= NETIF_F_HW_CSUM;\n \tnetdev->features |= NETIF_F_SCTP_CRC;\n \n",
    "prefixes": [
        "v1"
    ]
}