From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD454CA0EC2 for ; Thu, 29 Aug 2024 21:12:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E18510E765; Thu, 29 Aug 2024 21:12:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="us1i7LvN"; dkim-atps=neutral Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C9E110E765 for ; Thu, 29 Aug 2024 21:12:18 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id B4B38A4288A; Thu, 29 Aug 2024 21:12:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7BD0C4CEC1; Thu, 29 Aug 2024 21:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724965936; bh=SdFDbc/FKfVCaHZ3R/u6SOjH9IobabUDvHC41qgaXUk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=us1i7LvNVt8Qyg0Ds3Qzx74/wqCdnCowJCXYSfINx9H2q6n5Kit1aO8FDlGGeTMaf vHRHoicpP5fkO3U2+B+81byJTxSyg+s/JKaYfAXXXdaGZWJ8id+HmCmmuUmWdaElQn gv+atJ2B0Ww51vx9gFkQVsIDp8BIu4oIA7f7e5Fp9659+RAYm3nte+AWc4etT9Sc/o /HVToybUJrWVLFvJ3z5lls1n69Cce9t5gwg1hA83miP9iDl4xOg9yZp2+Rj04tO4em wlA6UgNFKwOVnSaAgjOChfdDXWkt/q9nVjfwSzRkZxy01PXMkIQpvgBVgXQ7kosnUy Ykx86deotI6gw== Date: Thu, 29 Aug 2024 14:12:12 -0700 From: Jakub Kicinski To: Mina Almasry 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 , Paolo Abeni , Donald Hunter , 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 , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , "=?UTF-8?B?QmrDtnJuIFTDtnBl?= =?UTF-8?B?bA==?=" , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Sumit Semwal , "Christian =?UTF-8?B?S8O2bmln?=" , Pavel Begunkov , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , Bagas Sanjaya , Christoph Hellwig , Nikolay Aleksandrov , Taehee Yoo , Willem de Bruijn , Kaiyuan Zhang , Daniel Vetter Subject: Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice Message-ID: <20240829141212.1d146a16@kernel.org> In-Reply-To: <20240829060126.2792671-4-almasrymina@google.com> References: <20240829060126.2792671-1-almasrymina@google.com> <20240829060126.2792671-4-almasrymina@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 29 Aug 2024 06:01:16 +0000 Mina Almasry wrote: > + if (NL_REQ_ATTR_CHECK(info->extack, attr, tb, NETDEV_A_QUEUE_ID) || > + NL_REQ_ATTR_CHECK(info->extack, attr, tb, NETDEV_A_QUEUE_TYPE) || > + nla_get_u32(tb[NETDEV_A_QUEUE_TYPE]) != NETDEV_QUEUE_TYPE_RX) { I keep going back and forth if I should complain.. so nit: The first two conditions can be together, but for the third one you want to NL_SET_BAD_ATTR(info->extack, tb[NETDEV_A_QUEUE_TYPE])); so separate if() is needed. I think I suggested the combining but I meant just the NL_REQ_ATTR.. ones.