Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp264502lqc; Thu, 7 Mar 2024 17:31:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULE1M+vtV6Pltxy+Ow9lWTKcVC/cPq/xeunNJZ24SVJ4qUMb+ohqW5YIV2K5H2Wds9B0XVQbnPyRfArsGjsI+2AWL5Ag61YwN+wZbfXw== X-Google-Smtp-Source: AGHT+IE0dLBC+MUyWoFqWlFpA5y+zuxY5xFe3kVanwgaRg6OYpPld6JMtF5wjfOmPXZuOzXfak0e X-Received: by 2002:a19:e047:0:b0:513:486a:57af with SMTP id g7-20020a19e047000000b00513486a57afmr2561819lfj.7.1709861459879; Thu, 07 Mar 2024 17:30:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709861459; cv=pass; d=google.com; s=arc-20160816; b=zHcLDrlvNfI+F8z7bXGavZLO6ip5yIkalcBN43aDx+65rOLOpw0ig3TB6fu7ndpxMk Opo41Cu1e2MjZTDmICQ+U15yK6GUPn64x64DGRsEDNxTB8rjRcgKg8I/Pz9/cR4PuHaA HAM/b2ZvKCl60d7fS9A3Y2/mHecK9cJHkKWyq3aPYeRaOUJO6CY2kjXVqc+SZfT9DcKg efAX8tVCgchA+ukUcbbRfnUYAvHYL3Nt0wERvMgmsrvJWMm5y+hxAGKHSp7xa6DsE+eS M4n5q0iNTO1lx8VBWv5leTzPyP4o2Db6xPrruc0eHdAVDMOwb8tAxSGa/Ft/9PI/eHBX 1Txw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=zAeeYe03LTDYfcQreudxFr3eVRPXBypUm3uFC1s85Zc=; fh=dfBJdxEMZk4NZwWAuHdLnbjyPyiRcXBE9lB7PIzOTEw=; b=vf40r/SfyLkximC2kUHzur3ZsmOqw2Wjk3SDA+PoSsXtbLbnlYUhpL8n5SQhxWZWeN oF3CfrhIegr6jF+H3Xs9vtijtptepTBPvZqw6YZ0ns0YK4n99Cv3j9gdZAiD4wn5IYM9 CbNamlSf1j9x/HeTWXjsxcoYDV3WJiPlhX52juUBxTWJui6WZmP/DwxNeP9YrZXbCXSh /1rMS1qXWm5cwVBVDwH6IW6d5eXlXYDxF8XgkdGsgC3jFPeIMSMjiUSu6hiwIajhsCVg S5PornjUL8eZiFpOHk2qxXXKmG0oxdRNDkfVU2FymE7RX9ruSd2jmczSZZlkMCE+Jtd9 JsdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WuK2qD6w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y1-20020a056402440100b0056645cf4508si7669749eda.154.2024.03.07.17.30.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 17:30:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WuK2qD6w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6F8F51F21F18 for ; Fri, 8 Mar 2024 01:30:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F31342377A; Fri, 8 Mar 2024 01:30:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WuK2qD6w" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CEF4523748; Fri, 8 Mar 2024 01:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709861443; cv=none; b=acwvILkXcLHMUu0rcqAYldOMXb21DFHE2Q6OcwEuFaQeNd76YMSBoY0gzv4GLFngisTUnB2PMh4CM5iTT05LV0YeCdkjIxoc7gWuLyjQd5Ru2Fm4MAXvBYjKMrMDszZ1G0Ivv1ZysAQPeNgOJHX8vkEMzqV2f2EtnzTCj6u6QH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709861443; c=relaxed/simple; bh=pWLPfbMGjAqOMIxZXwrouf7NrYnQYoQSjURpmCc84iU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BUYzwCOWas4t/4pTxnKmSP76T6Pb26ePU3ArqJPJ23CzwBFvlyl4EjADLRoflsCUSV6SghsVn6Nf18MrvElfDi/41s15rTgcp2rZwjZk2xbyRzaGPGCedGSUHNvc4UfQozlkP45UYEvFdoHHrb4PR87jz6Lq47L/85nyHmYLeP4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WuK2qD6w; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AD44C433F1; Fri, 8 Mar 2024 01:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709861442; bh=pWLPfbMGjAqOMIxZXwrouf7NrYnQYoQSjURpmCc84iU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WuK2qD6wyzgEpkNGU94oUn6yHcPXxuUo3uJrLGDTiIGph4N/vCBqNc4nDv471KEn3 sm7aoyIlj2FlbTUAzqmFeQZ3jZxx8uq02/lwxrUs6Fs5ne1P7sc9b+jogdt2cNh5om yy2pPOnMcP+HAkFrHyi8JDY6iodalicwb81v6rzeU0un9tw4HNH9vVQNofxBnlf4+6 iDppG8XOmWfXjccjhAEBc5TroehEx0EzshUNRujMpMwMXGGAQ6kBNOJtKint9xVpy2 SaraH4eSezKXfORbglRhjRO/jH8oAebaFTPdwegjG2bPLQMw9csoNK+YHGu0qpYXyY O/jGEtvZeHEeQ== Date: Thu, 7 Mar 2024 17:30:39 -0800 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 , 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 , David Ahern , Willem de Bruijn , Shuah Khan , 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 Subject: Re: [RFC PATCH net-next v6 01/15] queue_api: define queue api Message-ID: <20240307173039.00e6fbb7@kernel.org> In-Reply-To: <20240305020153.2787423-2-almasrymina@google.com> References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-2-almasrymina@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 4 Mar 2024 18:01:36 -0800 Mina Almasry wrote: > + * void *(*ndo_queue_mem_alloc)(struct net_device *dev, int idx); > + * Allocate memory for an RX queue. The memory returned in the form of > + * a void * can be passed to ndo_queue_mem_free() for freeing or to > + * ndo_queue_start to create an RX queue with this memory. > + * > + * void (*ndo_queue_mem_free)(struct net_device *dev, void *); > + * Free memory from an RX queue. > + * > + * int (*ndo_queue_start)(struct net_device *dev, int idx, void *); > + * Start an RX queue at the specified index. > + * > + * int (*ndo_queue_stop)(struct net_device *dev, int idx, void **); > + * Stop the RX queue at the specified index. > */ > struct net_device_ops { > int (*ndo_init)(struct net_device *dev); > @@ -1679,6 +1693,16 @@ struct net_device_ops { > int (*ndo_hwtstamp_set)(struct net_device *dev, > struct kernel_hwtstamp_config *kernel_config, > struct netlink_ext_ack *extack); > + void * (*ndo_queue_mem_alloc)(struct net_device *dev, > + int idx); > + void (*ndo_queue_mem_free)(struct net_device *dev, > + void *queue_mem); > + int (*ndo_queue_start)(struct net_device *dev, > + int idx, > + void *queue_mem); > + int (*ndo_queue_stop)(struct net_device *dev, > + int idx, > + void **out_queue_mem); The queue configuration object was quite an integral part of the design, I'm slightly worried that it's not here :) Also we may want to rename the about-to-be-merged ops from netdev_stat_ops and netdev_queue_ops, and add these there? https://lore.kernel.org/all/20240306195509.1502746-2-kuba@kernel.org/ Very excited to hear that you made progress on this and ported GVE over!