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: 13802093 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F40D51A0BD0; Thu, 12 Sep 2024 12:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726145474; cv=none; b=uQtD46oTdcxtG7oVysRj+fW+Guq+qGVZrRlqgMZ1gY2I5LjT9N6DoQb8asT7OLEBbDWbygnGwTJyoi28hF/zv1B3PTfpoBJyP7LVJZhmBkXMnrjfN9tTiZ/gnTNbU6zLn/UwS+nCoPEyfUDvyaIEwvjaNYjq+OkkDdBxe8kiDEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726145474; c=relaxed/simple; bh=PsKr0a5ZBsvrsuGyGrexqgw73E8lU+g8sS9Ep0PwPTs=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=pXnjBXEwhDhOY1mnxoeN0DkUj7sah7AYPcyyuUzfHVquqINbs0Z6YbXbBHBJVV38phWSMoKnNwvt9Tl78kO6XhGEfMTZ3TVw8YecOrS9NYWT5tdqO8nJXkROM8futJ8SSgFBKou7RQdchNdcPQYS8T2qJ3mBUfTZ1y1Z4MPQD3I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com 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: , , CC: , , Yunsheng Lin , Alexander Lobakin , Robin Murphy , Alexander Duyck , IOMMU , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Matthias Brugger , AngeloGioacchino Del Regno , , , , , , Subject: [RFC 0/2] fix two bugs related to page_pool 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 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemf200006.china.huawei.com (7.185.36.61) X-Patchwork-State: RFC 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(-)