Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1143790/?format=api
{ "id": 1143790, "url": "http://patchwork.ozlabs.org/api/patches/1143790/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190808040312.21719-1-firo.yang@suse.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": "<20190808040312.21719-1-firo.yang@suse.com>", "list_archive_url": null, "date": "2019-08-08T04:03:49", "name": "[v3,1/1] ixgbe: sync the first fragment unconditionally", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "895e6c185215ce597cb7e23e9df011553c070255", "submitter": { "id": 77069, "url": "http://patchwork.ozlabs.org/api/people/77069/?format=api", "name": "Firo Yang", "email": "firo.yang@suse.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/20190808040312.21719-1-firo.yang@suse.com/mbox/", "series": [ { "id": 123909, "url": "http://patchwork.ozlabs.org/api/series/123909/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=123909", "date": "2019-08-08T04:03:49", "name": "[v3,1/1] ixgbe: sync the first fragment unconditionally", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/123909/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1143790/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1143790/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=suse.com", "spf=none (sender IP is )\n\tsmtp.mailfrom=firo.yang@suse.com; " ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 463vrv05l5z9sNy\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 8 Aug 2019 14:04:30 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3A48886B50;\n\tThu, 8 Aug 2019 04:04:28 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id TBpZJlNZ38km; Thu, 8 Aug 2019 04:04:27 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 620E086704;\n\tThu, 8 Aug 2019 04:04:27 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id A5FEB1BF295\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Aug 2019 04:04:25 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 89F5C203E6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Aug 2019 04:04:25 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id DxabIsYLhx38 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Aug 2019 04:04:24 +0000 (UTC)", "from m9a0001g.houston.softwaregrp.com\n\t(m9a0001g.houston.softwaregrp.com [15.124.64.66])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 176862001C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Aug 2019 04:04:23 +0000 (UTC)", "FROM m9a0001g.houston.softwaregrp.com (15.121.0.191) BY\n\tm9a0001g.houston.softwaregrp.com WITH ESMTP; \n\tThu, 8 Aug 2019 04:04:11 +0000", "from M9W0068.microfocus.com (2002:f79:bf::f79:bf) by\n\tM9W0068.microfocus.com (2002:f79:bf::f79:bf) with Microsoft SMTP\n\tServer\n\t(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1591.10; Thu, 8 Aug 2019 04:03:51 +0000", "from NAM04-BN3-obe.outbound.protection.outlook.com (15.124.72.13)\n\tby M9W0068.microfocus.com (15.121.0.191) with Microsoft SMTP Server\n\t(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1591.10 via Frontend Transport; Thu, 8 Aug 2019 04:03:51 +0000", "from BY5PR18MB3187.namprd18.prod.outlook.com (10.255.139.221) by\n\tBY5PR18MB3121.namprd18.prod.outlook.com (10.255.136.150) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.2157.14; Thu, 8 Aug 2019 04:03:50 +0000", "from BY5PR18MB3187.namprd18.prod.outlook.com\n\t([fe80::103a:94a8:b58d:3eac]) by\n\tBY5PR18MB3187.namprd18.prod.outlook.com\n\t([fe80::103a:94a8:b58d:3eac%4]) with mapi id 15.20.2157.015;\n\tThu, 8 Aug 2019 04:03:49 +0000" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n\tb=mn2RNm87rChHMaGS6Bw15fzuMXdP0bD6CW4/cazTQBmQEOJw7WcktRvikZZHJgIbuqJn5cMcI8OnM+BvzfcmEUrrNvLrvfiKhvtXEFQVBvvV2lqenhGK7gt1mijUQahGSVnvY5r+FYWZ8cfEgenDEA4DlQvNR4UrYb8tEH8htTqIYUqL7VvNv21jiyUyVl+0hzlVEUVT5JMuWg0jEF7iMm5Xoum4Uf/cgrx/bdf6IJOvjX8vWV/Nz5LRgKKZyAFP0wgnULGHe6IiHXPUNfI23AteRcvoO9TVIsbBhHpJv+3L3lGue1vBrcQjHmIrgVsFIbgOgRr1wdcbs2FzOqQA0g==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n\ts=arcselector9901;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=X5jJ4FAwXdNpYOZep35e6eOMfLUlDHQV5HsZDLk4t0A=;\n\tb=LnO4c6fRbo/emkRHbrSFLUixJ7SreeKK0+TQzbdyRUqf4IvX/Hye1dHA7YdYDXS3pTj3QB58jetiuceuu1qOp75wi0lum9IP/8cfS89Zpt7yN2kWNr2unOxRxB/6SOQbgn8h3DMkcciJ6RFa6rAUKPs0dBi1MN3BzttJlBzlz12ONW8ymZZhSqjsGAU9zPAdG17plAvHR5Egz3iFQzQlDdI4A60ZOGw9e6qTbM4KFlOmqN2sA9AetV8IYcwtb7jpELbhj+hEKp3WOG7dr/TrqmeuSCVaIMn6Q5Bi+mwnPkKfRQ5akJfjuoZ9ZsczrqXcDYCJwFNKFxUjF6Lw+bDeKw==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n\tsmtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; \n\tdkim=pass header.d=suse.com; arc=none", "From": "Firo Yang <firo.yang@suse.com>", "To": "\"netdev@vger.kernel.org\" <netdev@vger.kernel.org>", "Thread-Topic": "[PATCH v3 1/1] ixgbe: sync the first fragment unconditionally", "Thread-Index": "AQHVTZ5IOEeUaPwZuEuqOf/M8/vBig==", "Date": "Thu, 8 Aug 2019 04:03:49 +0000", "Message-ID": "<20190808040312.21719-1-firo.yang@suse.com>", "Accept-Language": "en-US, en-GB, zh-CN", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "x-clientproxiedby": "MA1PR01CA0148.INDPRD01.PROD.OUTLOOK.COM\n\t(2603:1096:a00:71::18) To BY5PR18MB3187.namprd18.prod.outlook.com\n\t(2603:10b6:a03:196::29)", "authentication-results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=suse.com", "spf=none (sender IP is )\n\tsmtp.mailfrom=firo.yang@suse.com; " ], "x-ms-exchange-messagesentrepresentingtype": "1", "x-mailer": "git-send-email 2.16.4", "x-originating-ip": "[45.122.156.254]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "10597ca8-ca5e-4448-299d-08d71bb56b05", "x-microsoft-antispam": "BCL:0; PCL:0;\n\tRULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);\n\tSRVR:BY5PR18MB3121; ", "x-ms-traffictypediagnostic": "BY5PR18MB3121:", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "<BY5PR18MB31216BCE628A437990EFF5C788D70@BY5PR18MB3121.namprd18.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:1468;", "x-forefront-prvs": "012349AD1C", "x-forefront-antispam-report": "SFV:NSPM;\n\tSFS:(10019020)(4636009)(376002)(396003)(366004)(136003)(39860400002)(346002)(189003)(199004)(86362001)(5660300002)(478600001)(2501003)(54906003)(7736002)(316002)(1076003)(50226002)(81166006)(81156014)(53936002)(305945005)(3846002)(8936002)(6116002)(66476007)(8676002)(14454004)(64756008)(66446008)(1730700003)(66946007)(66556008)(52116002)(4326008)(99286004)(486006)(26005)(386003)(102836004)(6506007)(2351001)(2616005)(44832011)(476003)(25786009)(256004)(14444005)(107886003)(6916009)(5640700003)(71200400001)(6512007)(186003)(71190400001)(6486002)(2906002)(36756003)(6436002)(66066001);\n\tDIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3121;\n\tH:BY5PR18MB3187.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en;\n\tPTR:InfoNoRecords; MX:1; A:1; ", "received-spf": "None (protection.outlook.com: suse.com does not designate\n\tpermitted sender hosts)", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam-message-info": "tdjIGv1cEHaQ3jOgiuyHhi8vjgzlkxwpjXxz3X36ykrnTi4X8UVWUU8E2rXDV9m2qsDDACNVR5Z3DBtjYC1CEgHduPPOIUw9XLrK4S2dWUcS/FCH/tJIBbPOlAiuN/ffkLJalcgNVVBDPAalD/XlZJkT7xwbX0CSpdAzgpjj2cD5SpVthkkYBEY7kzQ/O9PEv3i+qMh6ov2nrRNhWP+Tb0qL3A4ZDKGXIuuaAkydjbbUZGqtt/EdGvEPzOPXtMK+IgJmZ7KoCMUULXB5asduyVnPMkTIQQg7MnVEHYHdTEmO1msrfXfUwVUkRfI4j/v+Br74qdbuvdPIWoBB99BB/rLB8F+8EXehtEDnOvOH2vMuS5IPyjWQhahxzHGskbXofL0wnJfGUtyd9E5FBFwcM6U2UGnxUOIWZo4chgYBknU=", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-Network-Message-Id": "10597ca8-ca5e-4448-299d-08d71bb56b05", "X-MS-Exchange-CrossTenant-originalarrivaltime": "08 Aug 2019 04:03:49.8613\n\t(UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "856b813c-16e5-49a5-85ec-6f081e13b527", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "GUMzrQGjKdsSItmluoQ/QLUJBptLOPq7+FmrN5k40THRK7C2/ihYKjgjJyaxnvqv8b1zk3wtnBZLGf2mKPVZEg==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BY5PR18MB3121", "X-OriginatorOrg": "suse.com", "Subject": "[Intel-wired-lan] [PATCH v3 1/1] ixgbe: sync the first fragment\n\tunconditionally", "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>", "Cc": "\"maciejromanfijalkowski@gmail.com\" <maciejromanfijalkowski@gmail.com>,\n\tFiro Yang <firo.yang@suse.com>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\t\"intel-wired-lan@lists.osuosl.org\" <intel-wired-lan@lists.osuosl.org>,\n\t\"jian.w.wen@oracle.com\" <jian.w.wen@oracle.com>,\n\t\"alexander.h.duyck@linux.intel.com\" <alexander.h.duyck@linux.intel.com>, \n\t\"davem@davemloft.net\" <davem@davemloft.net>", "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": "In Xen environment, if Xen-swiotlb is enabled, ixgbe driver\ncould possibly allocate a page, DMA memory buffer, for the first\nfragment which is not suitable for Xen-swiotlb to do DMA operations.\nXen-swiotlb have to internally allocate another page for doing DMA\noperations. This mechanism requires syncing the data from the internal\npage to the page which ixgbe sends to upper network stack. However,\nsince commit f3213d932173 (\"ixgbe: Update driver to make use of DMA\nattributes in Rx path\"), the unmap operation is performed with\nDMA_ATTR_SKIP_CPU_SYNC. As a result, the sync is not performed.\nSince the sync isn't performed, the upper network stack could receive\na incomplete network packet. By incomplete, it means the linear data\non the first fragment(between skb->head and skb->end) is invalid. So \nwe have to copy the data from the internal xen-swiotlb page to the page \nwhich ixgbe sends to upper network stack through the sync operation.\n\nMore details from Alexander Duyck:\nSpecifically since we are mapping the frame with\nDMA_ATTR_SKIP_CPU_SYNC we have to unmap with that as well. As a result\na sync is not performed on an unmap and must be done manually as we\nskipped it for the first frag. As such we need to always sync before\npossibly performing a page unmap operation.\n\nFixes: f3213d932173 (\"ixgbe: Update driver to make use of DMA\nattributes in Rx path\")\nReviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>\nSigned-off-by: Firo Yang <firo.yang@suse.com>\n---\nChanges from v2:\n * Added details on the problem caused by skipping the sync.\n * Added more explanation from Alexander Duyck.\n\nChanges from v1:\n * Imporved the patch description.\n * Added Reviewed-by: and Fixes: as suggested by Alexander Duyck.\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex cbaf712d6529..200de9838096 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1825,13 +1825,7 @@ static void ixgbe_pull_tail(struct ixgbe_ring *rx_ring,\n static void ixgbe_dma_sync_frag(struct ixgbe_ring *rx_ring,\n \t\t\t\tstruct sk_buff *skb)\n {\n-\t/* if the page was released unmap it, else just sync our portion */\n-\tif (unlikely(IXGBE_CB(skb)->page_released)) {\n-\t\tdma_unmap_page_attrs(rx_ring->dev, IXGBE_CB(skb)->dma,\n-\t\t\t\t ixgbe_rx_pg_size(rx_ring),\n-\t\t\t\t DMA_FROM_DEVICE,\n-\t\t\t\t IXGBE_RX_DMA_ATTR);\n-\t} else if (ring_uses_build_skb(rx_ring)) {\n+\tif (ring_uses_build_skb(rx_ring)) {\n \t\tunsigned long offset = (unsigned long)(skb->data) & ~PAGE_MASK;\n \n \t\tdma_sync_single_range_for_cpu(rx_ring->dev,\n@@ -1848,6 +1842,14 @@ static void ixgbe_dma_sync_frag(struct ixgbe_ring *rx_ring,\n \t\t\t\t\t skb_frag_size(frag),\n \t\t\t\t\t DMA_FROM_DEVICE);\n \t}\n+\n+\t/* If the page was released, just unmap it. */\n+\tif (unlikely(IXGBE_CB(skb)->page_released)) {\n+\t\tdma_unmap_page_attrs(rx_ring->dev, IXGBE_CB(skb)->dma,\n+\t\t\t\t ixgbe_rx_pg_size(rx_ring),\n+\t\t\t\t DMA_FROM_DEVICE,\n+\t\t\t\t IXGBE_RX_DMA_ATTR);\n+\t}\n }\n \n /**\n", "prefixes": [ "v3", "1/1" ] }