From patchwork Thu Sep 12 12:45:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunsheng Lin X-Patchwork-Id: 1984672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=w+z4sJ8s; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X4HPT1HRVz1y1y for ; Thu, 12 Sep 2024 22:51:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5509B60E0F; Thu, 12 Sep 2024 12:51:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id eSpxDrtQ6QrQ; Thu, 12 Sep 2024 12:51:21 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1B58760E08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1726145481; bh=1stBqhmyGv3At6lM7XjLumiofL3xIeySle3Ks00Qc4Y=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=w+z4sJ8sh2X2kZJTzkMq/wqabu/g/bDqOEhRe9GHFXnhFEz9yNBHUfFuVbTBHZF4j jM5UDLjXz7RF9RL9yp8U8ivQMhEDBKFY5hDi5jmkMlvCjSdPQAOoJnwZzKapW29Tfa QDIJVLGSKZ3hqnp5xL/2EOmee+iXiNYKMkkBxP7MPl7JeWFiWMEptDZm2HI9FS26LR BO9Em2f6ClwMMUxBgS2BCCYCUfi5RTHMthXh6hc/oAkmsiYQkqL1t4TS4ihQcmRqNZ q+bi/AUqEiRhT2iYPHYMEDJYrqrSDeQR1sZqYR2NzuGWG17HbAbZcEy6s/DPVY4Ybx w2nObTH60ASpQ== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 1B58760E08; Thu, 12 Sep 2024 12:51:21 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1C2B31BF281 for ; Thu, 12 Sep 2024 12:51:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 15DBE81E7C for ; Thu, 12 Sep 2024 12:51:20 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3De7t-OU0TWm for ; Thu, 12 Sep 2024 12:51:18 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=45.249.212.32; helo=szxga06-in.huawei.com; envelope-from=linyunsheng@huawei.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 34A8581E7A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 34A8581E7A Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by smtp1.osuosl.org (Postfix) with ESMTPS id 34A8581E7A for ; Thu, 12 Sep 2024 12:51:16 +0000 (UTC) Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4X4HP64kk6z1xxGS; Thu, 12 Sep 2024 20:51:06 +0800 (CST) Received: from dggpemf200006.china.huawei.com (unknown [7.185.36.61]) by mail.maildlp.com (Postfix) with ESMTPS id A6C811400D4; Thu, 12 Sep 2024 20:51:07 +0800 (CST) Received: from localhost.localdomain (10.90.30.45) by dggpemf200006.china.huawei.com (7.185.36.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 12 Sep 2024 20:51:07 +0800 From: Yunsheng Lin To: , , Date: Thu, 12 Sep 2024 20:45:11 +0800 Message-ID: <20240912124514.2329991-1-linyunsheng@huawei.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-Originating-IP: [10.90.30.45] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemf200006.china.huawei.com (7.185.36.61) X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Subject: [Intel-wired-lan] [RFC 0/2] fix two bugs related to page_pool X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, Jesper Dangaard Brouer , Daniel Borkmann , netdev@vger.kernel.org, John Fastabend , IOMMU , Alexander Duyck , Alexei Starovoitov , Alexander Lobakin , Yunsheng Lin , liuyonglong@huawei.com, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , fanghaiqing@huawei.com, bpf@vger.kernel.org, Robin Murphy , linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Patch 1 fix a possible time window problem for pagw_pool. Patch 2 fix the kernel crash problem at iommu_get_dma_domain reported in [1]. 1. https://lore.kernel.org/lkml/8067f204-1380-4d37-8ffd-007fc6f26738@kernel.org/T/ CC: Alexander Lobakin CC: Robin Murphy CC: Alexander Duyck CC: IOMMU Yunsheng Lin (2): page_pool: fix timing for checking and disabling napi_local page_pool: fix IOMMU crash when driver has already unbound drivers/net/ethernet/freescale/fec_main.c | 8 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 6 +- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 14 +- drivers/net/ethernet/intel/libeth/rx.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en/xdp.c | 3 +- drivers/net/netdevsim/netdev.c | 6 +- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- include/linux/mm_types.h | 2 +- include/linux/skbuff.h | 1 + include/net/libeth/rx.h | 3 +- include/net/netmem.h | 2 +- include/net/page_pool/helpers.h | 11 ++ include/net/page_pool/types.h | 15 +- net/core/devmem.c | 2 +- net/core/page_pool.c | 176 +++++++++++++++--- net/core/page_pool_priv.h | 9 +- net/core/skbuff.c | 3 +- net/core/xdp.c | 3 +- 18 files changed, 219 insertions(+), 49 deletions(-)