Message ID | 20240607005127.3078656-10-almasrymina@google.com |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=3XON=NJ=vger.kernel.org=sparclinux+bounces-1284-patchwork-incoming=ozlabs.org@ozlabs.org> 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=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=UJKicIjm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=150.107.74.76; helo=mail.ozlabs.org; envelope-from=srs0=3xon=nj=vger.kernel.org=sparclinux+bounces-1284-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VwN5H319Tz20Q6 for <incoming@patchwork.ozlabs.org>; Fri, 7 Jun 2024 10:54:43 +1000 (AEST) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4VwN5H2Rxpz4wc8 for <incoming@patchwork.ozlabs.org>; Fri, 7 Jun 2024 10:54:43 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4VwN5H2Nc2z4wxt; Fri, 7 Jun 2024 10:54:43 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=UJKicIjm; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=139.178.88.99; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-1284-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4VwN5H06Qqz4wc8 for <patchwork-incoming@ozlabs.org>; Fri, 7 Jun 2024 10:54:43 +1000 (AEST) 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B92EC287227 for <patchwork-incoming@ozlabs.org>; Fri, 7 Jun 2024 00:54:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 236C6179BF; Fri, 7 Jun 2024 00:52:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UJKicIjm" X-Original-To: sparclinux@vger.kernel.org Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E55754660 for <sparclinux@vger.kernel.org>; Fri, 7 Jun 2024 00:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717721520; cv=none; b=awx1A2pAKHpjfc4coEtnSVAFDbOFkzMxT/3JpKrRyAr0fYyQBfZxfDllAko/whXS27OyIlyHml6cAQav7K3TpXZYf5E0auFfciQtA1P2DnIPt+YJnplSsQkcvRlAfUJCqyX+rFXuwARp98MF6MJT5UvzcwNQDQpmIlBzZi0wvXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717721520; c=relaxed/simple; bh=J8mbjvdj92PfotQdJlvwzcb6+h7YmjJ8KXqUr6Ddu3E=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=TmkYeVOb+Rl2xKAclKwKio6YIJz1ZLFFI94vl5KN0vS7wJCCB86dGqebZoT/ovafl3/PQpjYtz542uA6fIikQ83abeUjy1CW14gB9FAgUf2NNXks/pTcABJtOlLiG6FZ1ePF+HvibIETq08NTzDvXwygXHm+PpTyTEL5OSBUwfw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--almasrymina.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UJKicIjm; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--almasrymina.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dfa78a1b142so2746486276.1 for <sparclinux@vger.kernel.org>; Thu, 06 Jun 2024 17:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717721509; x=1718326309; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=CzOnqbPIRUTcsBxLOzdZGvdcopdF4+YL1fFln+qTAhY=; b=UJKicIjmN99lHzhE7veDJ75F3+/cKx7tWtr98tJw0ygSWQl21htw5uWnAdhGSkj6UE Wcnq2DYFK+7embZIhyO89PCFONTywRBxQF5xcgj2SqirnfhbvxYiFNa/clBaUMKPUkr1 5WIRSGMwXPndYbx+ZUrdTZCrGw6PKgHp2zScImPhcDn/x9h7dtEuIK8ng2aWtAeQl1Sv AdzNk6qG/LC9J8S44XCCm2vfVsC3v7X7osM4S5qWTohRKP/9gUWuEAo5wm7s67SDvzpg 4utQd4EiUKCsMWMPSY+f8w+/a69WqpQD/SMcBqsOjgsQNIvFmulnqbb/jF7PqjONjzvh xtDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717721509; x=1718326309; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CzOnqbPIRUTcsBxLOzdZGvdcopdF4+YL1fFln+qTAhY=; b=i64xr1FDOyz1pdo2Jb0sDvI6jA++2RXExz9N+zKLFahUR9cbrBBfpaSjT1rcHhFsnd pm/ZPdCZU5acVFufTqsBYtlEkrydQTAWeRFFmEuHyZeyasWz+xMLoPEpMRt0yEyHUn5k RZdlAGk7BRHJlAJRJh9MnJpEhsB0nl5LTk4/+Cn0wFsLosZg7cy+Iraki6vwIyEM0aN9 OuGDV0XSDcZR1sFp1vJp5pYyUWikAETrjmuyLaQziUJq7ao+AwigKXBfBZbHSY7Qar46 wH0T9jBQ4YoKZU5E8idlpklmrnKVuNgC3PvqOtO9WLae0NU7euDu/U8TCfwdJyEsbZC1 KjRg== X-Forwarded-Encrypted: i=1; AJvYcCUjnd+3ZCbu6gTT9Q04niHK2NygHdvf47eDdw99aeLn6TtvRMAdlGH/4c1l2LV90KQ+RzMvlarsbLX4+ERDL0IBiyNYvQuUV1ySAA== X-Gm-Message-State: AOJu0Yxl+xDsIYuhmBDqAD2DAhc4YlRvjm6pkgZn/ENEyFQ+h+8lhvhX u0PonJnQs+yQ90JcCdWHhHH8KcZaOp71xdyYY4qpzgYMbORJKnvii2Q8aPiM0PAFA+QLXxrhdTq OudKh/EhQcxremCr6OZEMVA== X-Google-Smtp-Source: AGHT+IGb64Jzc3ruLweq/J0QHjBfjvLJ8k/YYzd2QeCE5S8NwHK59ijT9hW/NBeaYuhkvGh5fP3ER8QSBr/xQauY2A== X-Received: from almasrymina.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:4bc5]) (user=almasrymina job=sendgmr) by 2002:a05:6902:2b08:b0:dee:7bdf:3fc8 with SMTP id 3f1490d57ef6-dfaf64b146fmr150579276.2.1717721508808; Thu, 06 Jun 2024 17:51:48 -0700 (PDT) Date: Fri, 7 Jun 2024 00:51:19 +0000 In-Reply-To: <20240607005127.3078656-1-almasrymina@google.com> Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: <sparclinux.vger.kernel.org> List-Subscribe: <mailto:sparclinux+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:sparclinux+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240607005127.3078656-1-almasrymina@google.com> X-Mailer: git-send-email 2.45.2.505.gda0bf45e8d-goog Message-ID: <20240607005127.3078656-10-almasrymina@google.com> Subject: [PATCH net-next v11 09/13] net: add support for skbs with unreadable frags From: Mina Almasry <almasrymina@google.com> To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Mina Almasry <almasrymina@google.com>, Donald Hunter <donald.hunter@gmail.com>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, Jonathan Corbet <corbet@lwn.net>, Richard Henderson <richard.henderson@linaro.org>, Ivan Kokshaysky <ink@jurassic.park.msu.ru>, Matt Turner <mattst88@gmail.com>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>, Helge Deller <deller@gmx.de>, Andreas Larsson <andreas@gaisler.com>, Jesper Dangaard Brouer <hawk@kernel.org>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Arnd Bergmann <arnd@arndb.de>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>, Yonghong Song <yonghong.song@linux.dev>, John Fastabend <john.fastabend@gmail.com>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Steffen Klassert <steffen.klassert@secunet.com>, Herbert Xu <herbert@gondor.apana.org.au>, David Ahern <dsahern@kernel.org>, Willem de Bruijn <willemdebruijn.kernel@gmail.com>, Shuah Khan <shuah@kernel.org>, Sumit Semwal <sumit.semwal@linaro.org>, " =?utf-8?q?Christian_K=C3=B6nig?= " <christian.koenig@amd.com>, Bagas Sanjaya <bagasdotme@gmail.com>, Christoph Hellwig <hch@infradead.org>, Nikolay Aleksandrov <razor@blackwall.org>, Pavel Begunkov <asml.silence@gmail.com>, David Wei <dw@davidwei.uk>, Jason Gunthorpe <jgg@ziepe.ca>, Yunsheng Lin <linyunsheng@huawei.com>, Shailend Chand <shailend@google.com>, Harshitha Ramamurthy <hramamurthy@google.com>, Shakeel Butt <shakeel.butt@linux.dev>, Jeroen de Borst <jeroendb@google.com>, Praveen Kaligineedi <pkaligineedi@google.com>, Willem de Bruijn <willemb@google.com>, Kaiyuan Zhang <kaiyuanz@google.com> Content-Type: text/plain; charset="UTF-8" |
Series |
Device Memory TCP
|
expand
|
For device memory TCP, we expect the skb headers to be available in host memory for access, and we expect the skb frags to be in device memory and unaccessible to the host. We expect there to be no mixing and matching of device memory frags (unaccessible) with host memory frags (accessible) in the same skb. Add a skb->devmem flag which indicates whether the frags in this skb are device memory frags or not. __skb_fill_netmem_desc() now checks frags added to skbs for net_iov, and marks the skb as skb->devmem accordingly. Add checks through the network stack to avoid accessing the frags of devmem skbs and avoid coalescing devmem skbs with non devmem skbs. Signed-off-by: Willem de Bruijn <willemb@google.com> <