Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp722795lqd; Wed, 24 Apr 2024 15:12:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwB1xIxRV4ZEp28MBdAQ2xDqHCfdXhELXbsvIBnITnfawkmcpCbC4x6gbfrEw/HTDi+avI2o6u/+ugMRKnDJhAiG7Bu5562PNA8YFRng== X-Google-Smtp-Source: AGHT+IF4bb+8Krg34MtgYC/Tyvf8AvBfKNIkXMHxaa5x//YUEc9QE79kIdQ4vf8kjhwx2oTGUSw3 X-Received: by 2002:ac8:5dcb:0:b0:437:a180:4a48 with SMTP id e11-20020ac85dcb000000b00437a1804a48mr4034359qtx.14.1713996726745; Wed, 24 Apr 2024 15:12:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713996726; cv=pass; d=google.com; s=arc-20160816; b=ho82RV5WoOOFESO+Y0g7uTkVLswWI9J13AXMcPfgvdWkt1LjNR6X9Wj0nLlSvLSOYI wAzDA70hiQqn/hlyId5NDeAyHcCDPxqjKUql1wK/sQbaSq75YHTHEcjYup0Ak1zQae3F 1y+9CtOTRbk5ODO1lVMGjnZbmnUmunytaPf0pvlbo8eDQ/Rq6+saClbvW1FwPVGP/RRM x6UWL714aHix8y8U1qOqiLzWIN5Sbe0zN2RhwVgqUEZ38psb9xSUyZNB+CpVOLjbckRN lom0LNVfilkltiG1bKw/JpLFiXDXCQfV0TxqOgY0uAZn+TCDtsd4nynOB+l1R6pzEhc+ 9vkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Nrt9xX8+bezTu6PJtCUFo83NI4xccREO2afrxNR68uc=; fh=HvJujL1uuMdyS9YJbXdIou404LukXkg916B0g0GSPvU=; b=ysymJl9c0p0gbQj8W6vt+/T596zSgAz0b1IdY9AtHWUeB5XL8xQFB8QvC9dVulnnzc ugdB7hhEIyJ08thCn/vHLyXGSXZpqgX5GkytOmS9zNN5x0d4TUxWq89uTylQVpq0amiV 0TZY/50TxdA+junN8VtRy2INABctFKWGgBJNeMjHLRi60cSE7qPoMJvxqKCL8PrkIe7i zmEtsSQb+5C3602YPM+qa48ULop96SNBf1VF19tz3MCO5mryQl+WYrAI17zT1npnbyzS 01vMghtxd7ai2yDX+NAK9JHlIfjeT9psJYseKrB7HlrMG5S6vSOi5T1vPaqHV3o4QTAT NVHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="bgLn94E/"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-157768-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 x18-20020ac85f12000000b00436f407d036si16377034qta.54.2024.04.24.15.12.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 15:12:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157768-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; dkim=pass header.i=@google.com header.s=20230601 header.b="bgLn94E/"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-157768-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 D77641C22448 for ; Wed, 24 Apr 2024 22:11:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 934D916C423; Wed, 24 Apr 2024 22:11:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="bgLn94E/" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 E603115FCF9 for ; Wed, 24 Apr 2024 22:11:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713996680; cv=none; b=Legph01/S1cDmUD5d72ni/Xe903UVA11wpzV+N1yXcq8kCmZ5+RFq/sRZ5xefPi1ls5BzrqAZ5uUTjPCRTthkza+X2Eshm6YhhQnch28Eq3vjHlxyImn//vWOGWKDGxJB1h7aLRuXYztharpNdwi4lq6imm0Cb9U4FqALUolu9E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713996680; c=relaxed/simple; bh=pxhvcjOGdzqPJKU0g6cyW3p8OljKVeVIwlTbmM5Usw4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=sYOVlDDXSrd7fvsP0NhHEYf7M8LpZto2mZ0ffFxQ7AkAOovB6JNfCLhlj5VzM9ADxEr8m2lPcqm8pwqvtYwNSoUPYbRgpjtY81ogXa/F6uJmv2nprgqYLfI/PlZl3oPTEcEZk7LymSKHkwSzh1nhyMkp4ydaaWlZB1nk2Nojlpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=bgLn94E/; arc=none smtp.client-ip=209.85.167.44 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=google.com Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5193363d255so385944e87.3 for ; Wed, 24 Apr 2024 15:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713996677; x=1714601477; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Nrt9xX8+bezTu6PJtCUFo83NI4xccREO2afrxNR68uc=; b=bgLn94E/CBQ884LE+ijvvnf0wc5fCnOBsuVQwf0kdx5Tvu1MsMwCy/ZgLXEf+zLMzy Y507Bu7nMKmO0V1fYKsC7auy9IwFF0mRCuD0CtU2NdBuVX/7ke4VZCpXuPnu2jcqigmW 1lNkpky8mr6qNJ76t2uOjHa+MK9zHbnfuXkn63hLgVaEqnd5IDrHwq7hgNSRMWrf9Dr3 /ZBYM0OTowmJzbPzN0r9KMiLLRL06LRVo9PhZ47ZWi0o1ozpbHsShOnIxucAQ2z4p4wp GjMIJC99e7lgk0nAB7lCGi6BfmMDlIC9A+L8KwGYMM6cZT8U6+3B5TAvSabm+oC/eT+s Yf8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713996677; x=1714601477; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nrt9xX8+bezTu6PJtCUFo83NI4xccREO2afrxNR68uc=; b=XJgmUW5Qp95Cey1tML2qiVK1RKchBzTVBoM7sYwdBZkwq+EPaJQms9xqVEN5q97aol 57LCtUJtlC0rnA15are3fjHlCPlvCiAjxWOpqsYjMkizU5yuDSSAzcBq0tImvX3BzIe6 xnVdb+3c7MiNSD9EaVKapDXTUIjdjUFZjTeZbJAvcnM/r2Ix/X3meds5gquv3VZP07yX WlJbdruKmm9o0eDWFWupp15Mt5gfI2ysoCKehRSZ1PAXJh9acCGmpq/C+iyp+XqeAJzB fsfsZQthnAGRiaJw0ZXD3kI9vt1jLo9q2fSo/FOvwYqHPLpo7+oW9mmZosh8Leq3lhba Ve8w== X-Forwarded-Encrypted: i=1; AJvYcCVx5DCXAjlf9m6fyPOAGmFiz1q//tg1TlIifztqbS71McXVf12RGoO5AnvCaWn5FDyQh9QM0q6O9f6SgoQFke93dBSOGAxX96wNtGFG X-Gm-Message-State: AOJu0YwdA1nj9SLJ1qZmHhX7vCYONE0QHZ0rcn1cs/GqiI+TExAQp9xM TM72dNQXRJPJhvnLyeO8t6gXGW8kUoIYDfW6SLla3yeMYruk1iv1zARRqy2NuGlLTAcblDUr4NY l780mnM+1c4d2miduj0gzzZu+Id2P7O7/lTwQ X-Received: by 2002:a05:6512:1315:b0:51c:15fa:985 with SMTP id x21-20020a056512131500b0051c15fa0985mr1591764lfu.15.1713996676557; Wed, 24 Apr 2024 15:11:16 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403002053.2376017-1-almasrymina@google.com> <20240403002053.2376017-5-almasrymina@google.com> In-Reply-To: From: Mina Almasry Date: Wed, 24 Apr 2024 15:11:04 -0700 Message-ID: Subject: Re: [RFC PATCH net-next v8 04/14] netdev: support binding dma-buf to netdevice To: David Wei Cc: 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, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Amritha Nambiar , Maciej Fijalkowski , Alexander Mikhalitsyn , Kaiyuan Zhang , Christian Brauner , Simon Horman , David Howells , Florian Westphal , Yunsheng Lin , Kuniyuki Iwashima , Jens Axboe , Arseniy Krasnov , Aleksander Lobakin , Michael Lass , Jiri Pirko , Sebastian Andrzej Siewior , Lorenzo Bianconi , Richard Gobert , Sridhar Samudrala , Xuan Zhuo , Johannes Berg , Abel Wu , Breno Leitao , Pavel Begunkov , Jason Gunthorpe , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 24, 2024 at 10:36=E2=80=AFAM David Wei wrote: > > On 2024-04-02 5:20 pm, Mina Almasry wrote: > > + /* We hold the rtnl_lock while binding/unbinding dma-buf, so we c= an't > > + * race with another thread that is also modifying this value. Ho= wever, > > + * the driver may read this config while it's creating its * rx-q= ueues. > > + * WRITE_ONCE() here to match the READ_ONCE() in the driver. > > + */ > > + WRITE_ONCE(rxq->mp_params.mp_priv, binding); > > Is the mp_ops update missing here? > I do it in this patch, because it's the one that introduces mp_ops: https://patchwork.kernel.org/project/netdevbpf/patch/20240403002053.2376017= -9-almasrymina@google.com/ --=20 Thanks, Mina