Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2475911rbb; Wed, 28 Feb 2024 03:06:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWiN0FDwvWicCIc1sRSuaSI0SfxKbS8I4h0VUrlcZcP7NCOrkChYhG4LcmmYqn5u3UwtFAqaspa6q0UouCazT59uTeyqRs/eEQGm85qwg== X-Google-Smtp-Source: AGHT+IHvGsDybPtO4uYqUydB5QcUZnjLiL6EtKWblRtPklOhfMFEwDKbW3t0oY2fUlxIQqhLAqY0 X-Received: by 2002:a05:6102:cf:b0:472:6685:98ee with SMTP id u15-20020a05610200cf00b00472668598eemr2537991vsp.30.1709118395725; Wed, 28 Feb 2024 03:06:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709118395; cv=pass; d=google.com; s=arc-20160816; b=fNjHaDWLFMo+NVAp986qea/C0K42Q8kEIvstop3HZ2kk7l91S+sbw9MYlfbegAunCq LfFgwc3sDnbR+LKIiw+u/LiWJALyd011GeuS7oak4NrRjFHc9KXwH43ocJK9dZs/kd28 IoBGROluLZYTzIVrNeNlortUi+mFEitU7eEce9Ur7FHdSrvNYLjsW78iEIqLhJjL0xTq rl6bis49U4/n8qyim6sNPoLb0Wl9Kk3mBPyvYRaKwpYPUVfj0O4KwvU5mMpAz0yw044o IiNo4BzU1VKWKx1+h6zC1lkVnNuH42NjfvDl2ORZq6eLdoTY3DCNpX0KDrN83yyoYc0F Vpbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=l8Uqhjc2I+TzVCK/gfjx3G/lcI0108GsVQAeMW88Bh4=; fh=tnBSroFNUmYXTntEeVPXcRpxR7VxLLzxwkyyZujZ9ik=; b=DBIYPPkrd6kcOdKUmXIY2NJ+aZVqvx5uwjlodUdyZlIzXQhCAhQoflkZIk9IjTzhgj NPXHyjvqS9pB1tyQwrtRPFYdEtwzxQPM4o0zYz81EXshWKie+wcL0dWjmsePO9Zs0I+c Kpyqi4B8QhUDO0+6oX0ZsR+EcyPGbZ7eza9Rk1QkwpIstbQrtO5DJlHnwOfTBADnwDeW KFsfePXJg0TgnZyiNJmve2xQRbUpQJtnk5ViL17CPHqT+M1Pm9OAhTq1s8qRJz8sqwJE TR/FbDPfYX6R2kkO5w1xTJMIToQbEVatXmHQmRAUDi3PnLANDaGwVie2biUDyhCv3sBp cADQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-84854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v11-20020a05622a130b00b0042eb2aeeb73si315276qtk.270.2024.02.28.03.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:06:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-84854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 58B021C2246B for ; Wed, 28 Feb 2024 11:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E87221384BB; Wed, 28 Feb 2024 11:05:37 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 AB00F1384A8; Wed, 28 Feb 2024 11:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709118337; cv=none; b=NBf3M3UjYUF9+V5WCE/s27Dy91/aveKz8Wry8vssY2Dsk+g2Kuu6F8/lTZjMGznV9W0FDeTo8zfwDEtiAqBsWUe1OUkjIDMmUSJfqMGjo1NEzvfQIhvGBVvbJ0sjtDi2bXHbYYjn3x2xeME0NrCgiUVzMnkeJqwKHovb8Y3Qa+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709118337; c=relaxed/simple; bh=vvPzA5m67iNmEEVtRfGj6EfkA8sicGIPKVEKqQRXXaQ=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=fYE7P5tvVMxw0qzQPF6ZuLxe4E133EyKJVoEJDOxyXzRAz/nQXyheQA0JmBaFU3OUxBiEhfRbOOX+Xh8GjoX6b+ohogvLE9+Gd+F483OArEwhZJeMk7/nRS3hfmLqJh1rC1uGItbFHCljcEzyCV6L6pj5m79npONNlEp3zpt4uc= 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.187 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.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4TlBL24VBszpStF; Wed, 28 Feb 2024 19:03:38 +0800 (CST) Received: from dggpemm500008.china.huawei.com (unknown [7.185.36.136]) by mail.maildlp.com (Postfix) with ESMTPS id 5EEE2140414; Wed, 28 Feb 2024 19:05:27 +0800 (CST) Received: from localhost (10.174.242.157) by dggpemm500008.china.huawei.com (7.185.36.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 28 Feb 2024 19:05:27 +0800 From: Yunjian Wang To: , , , , , , , , CC: , , , , , , , Yunjian Wang Subject: [PATCH net-next v2 1/3] xsk: Remove non-zero 'dma_page' check in xp_assign_dev Date: Wed, 28 Feb 2024 19:05:25 +0800 Message-ID: <1709118325-120336-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500008.china.huawei.com (7.185.36.136) Now dma mappings are used by the physical NICs. However the vNIC maybe do not need them. So remove non-zero 'dma_page' check in xp_assign_dev. Signed-off-by: Yunjian Wang --- net/xdp/xsk_buff_pool.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index ce60ecd48a4d..a5af75b1f43c 100644 --- a/net/xdp/xsk_buff_pool.c +++ b/net/xdp/xsk_buff_pool.c @@ -219,16 +219,9 @@ int xp_assign_dev(struct xsk_buff_pool *pool, if (err) goto err_unreg_pool; - if (!pool->dma_pages) { - WARN(1, "Driver did not DMA map zero-copy buffers"); - err = -EINVAL; - goto err_unreg_xsk; - } pool->umem->zc = true; return 0; -err_unreg_xsk: - xp_disable_drv_zc(pool); err_unreg_pool: if (!force_zc) err = 0; /* fallback to copy mode */ -- 2.41.0