Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp954911lqc; Fri, 8 Mar 2024 18:15:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFEbz9mnV24dDq0eX+nUnrjIcl0VKL+GEzeUCYK+1IIEvaG9zpWn9jRtVnuriENH2/pCvxcpFVBqlu8y1a1x/CACgcPZj/UHd71LY4vQ== X-Google-Smtp-Source: AGHT+IGXs9RZ0OSqWw+04yI5ik7Uz3LPeSYZTOuwoSvvnDfA+vyOEDtm6wF4wOHU2XMG6/FZqUkd X-Received: by 2002:a05:622a:14cd:b0:42e:fd4d:7f07 with SMTP id u13-20020a05622a14cd00b0042efd4d7f07mr1117182qtx.28.1709950555108; Fri, 08 Mar 2024 18:15:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709950555; cv=pass; d=google.com; s=arc-20160816; b=MXx6Z/pfH1kY4pQJ7obUO0TW7mKoHa58cHDtkuNLfxsIcknqxN3aDQ86VCqWEZtZiv METQNcwKH+TSSgqpGYOk2/mdsMqyMsw11X0a8CouAD+BbKrgiNKyLF9NckgdPoH29fBb /8d4C3nKtN+XaIwb5lKVLzSc2faXBWj2cKe1NyYVnvpXrhaKKewBZ3j/H/g277YOsUe3 nD/bRFYb/0P+NCkzz5QhlFknccXNlnoloWzkYeTUqoNBGfG9+VAOS6pULZZTND8UrjQH AYe2GsGtPTBCDNhqU8qrkdYPxHt/4ZnGOJiEN1VO6m/Tuef/i5DhDrr3AEU+9lFSr2IR Fv7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9az8igjncgnaY0U1W1wkJljIYsplkUiE6Xc4XiRbO+4=; fh=QS0jlv2A1HsPjz53UqyQ/73mrYnj2aR2OYhMEm+2Em4=; b=zr8xH9kQeJ0TmcBle1Jdwy2L+H7ZptewhPtGcQeY80EmqcQXvmyApkqJ44o4oG0AL/ 3mIQI67Cd/SSyyZZf8wByx4BML3YkaOjaB5Jth1wM3GsYkk4/wBuAybjTy5n6KkcVOes RWIaX3obbY8OhJyS0VTujl4lDkvDDmCf/bkNGYFvVYS0nozQXOVu59QqPWpBtRCC6vG6 sRTTaO8fGloQD7vZOIFu1XnEsN/1S+wsNMCpIpcrKL/WgmNUQPqCbh1ogqf57teoNj+S Q9kSAiHnGc3hE5kmLg+/7m99GtEUVtwNBRRSUrSbV3qN/Aawa6SNtg4RIejJZVqKeM3o cI6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=L2SVzAze; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-97695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97695-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m14-20020a05622a118e00b0042ef3599499si794776qtk.498.2024.03.08.18.15.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 18:15:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97695-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=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=L2SVzAze; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-97695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97695-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D30871C211B5 for ; Fri, 8 Mar 2024 23:48:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F40103BBEE; Fri, 8 Mar 2024 23:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b="L2SVzAze" Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (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 478683C6BA for ; Fri, 8 Mar 2024 23:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709941679; cv=none; b=pHSWlIEHV72ScWxEC3pGEz+LNPlSru8GG0FLndQBwQ1V8iQAoNlliIEpO6ZREfogXA60DsafTU1VGvAYcnBNj0lB/GXwNUuR6gMWLK8y1m4rfLpnn9Hu4C3dULQ0TIHY29FAaWEjjtFn5QCg7jcfdyqY2v51vjvM5LlSpD2EKdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709941679; c=relaxed/simple; bh=dchB7UCiRqdqw0lIYP5nDwZdV0ZR/CGk1fMQm9ZuI6c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cYG0ZGvRetL08qFVZBq0tqefhrICnPlWKDXB4XWn/19ylU92YY6MmdJ+keBmm5e7751wsDiywZpZIbSv1ZCOSVHwZNThyS+E2wO7i3NczUUUMb1xzW32DfSIP9eQZtcVzf+8Fo1u/14CVvGClreX19WlL48IahnKll3dPVoz5vY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk; spf=none smtp.mailfrom=davidwei.uk; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b=L2SVzAze; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=davidwei.uk Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-29b7b9a4908so1004909a91.1 for ; Fri, 08 Mar 2024 15:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davidwei-uk.20230601.gappssmtp.com; s=20230601; t=1709941676; x=1710546476; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9az8igjncgnaY0U1W1wkJljIYsplkUiE6Xc4XiRbO+4=; b=L2SVzAzePwXBRM6vqpB+QFbzZEMkhm600Z9LNU18bXT3rfz7fAe/P7ogRt60U4uG7i HXLidI2y6SP+IL0S0e8jPXgk0ZTJpN0/8y7eullrSL868jS664cbUrjHCXR4O/6af6wp ZFLM6nJH/aSwMmPRAQgT5BU9GqHvIXEaYVB8iHQqH1I3dbD8/HOv68ShDA3QuRuclBlr 9zrKlcKkyUVAbCme+7X6/7vFm8kDVZig93IjG7yddBQmcoZmtKttWjR3jTz/d2rjhG8X +gu3mBdIQhOXdcGDqOlGqigx5LEmPztkJ7/Ngv2Sp4AYJ5m8wOa7K11omw88Hs+ppJ82 5Ogg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709941676; x=1710546476; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9az8igjncgnaY0U1W1wkJljIYsplkUiE6Xc4XiRbO+4=; b=RacnyWlQe9pYXBxtAeURKtbR3wJN2ee+JwansD0COZgh7M6+tKAJ8nj2v1eO0NitQY JoPpRUYh4ZIO1aNKbEW5brhtj0NivgYzwQ2QaPelx17LJbj0xSMVTQCvdProTIj+PA7T Xj5YJ9UTo+ngw9FruV1cqgafVh0rAk1WnTxzpYQLkobDab8GBMLZfQO6eqILyWM+eefn 8esHGV3IPEy2S5ZQRHdpSX+2HGIY4XpNTTOsI3KQWvUk0XbjolNUJMdmg9O+pd6UIxtU bPZeYHOkZrnAjxfdjX5cPd2Alpl0Pft0s+/B6MIK5myjOU+oz0+mL047eEoJeWaJW5uG XldA== X-Forwarded-Encrypted: i=1; AJvYcCUzYvfIDcMIvTABmHXfIYZSueDgGEOYQA+LmlfQ/lm4ZicXmRdnsVjV3vhpN9ZP/dItu3nBy6H4+z0/pZ9/WcvHX9nEAdMo1H2qjzBF X-Gm-Message-State: AOJu0Yy33MnA/4cxmMSa+k+EpVkTQlu54IBqjk1GcjqueSLfqXHqnklc QBrPShs/Mb16QZtr1Nebed3OCH6Y0yfznIWr786dXBEBLp5nTuNxO0XVHZZPbL0= X-Received: by 2002:a17:90b:1286:b0:29a:e097:50be with SMTP id fw6-20020a17090b128600b0029ae09750bemr690309pjb.31.1709941676412; Fri, 08 Mar 2024 15:47:56 -0800 (PST) Received: from ?IPV6:2a03:83e0:1156:1:1cbd:da2b:a9f2:881? ([2620:10d:c090:500::5:2342]) by smtp.gmail.com with ESMTPSA id d15-20020a17090ad98f00b0029bbf42daeesm265183pjv.30.2024.03.08.15.47.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Mar 2024 15:47:56 -0800 (PST) Message-ID: <54891f27-555a-4ed1-b92f-668813c18c37@davidwei.uk> Date: Fri, 8 Mar 2024 15:47:51 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH net-next v6 01/15] queue_api: define queue api Content-Language: en-GB To: Mina Almasry , 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: "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 , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Pavel Begunkov , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Jeroen de Borst , Praveen Kaligineedi References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-2-almasrymina@google.com> From: David Wei In-Reply-To: <20240305020153.2787423-2-almasrymina@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-03-04 18:01, Mina Almasry wrote: > This API enables the net stack to reset the queues used for devmem. > > Signed-off-by: Mina Almasry > > --- > include/linux/netdevice.h | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index c41019f34179..3105c586355d 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -1435,6 +1435,20 @@ struct netdev_net_notifier { > * struct kernel_hwtstamp_config *kernel_config, > * struct netlink_ext_ack *extack); > * Change the hardware timestamping parameters for NIC device. > + * > + * 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); > }; I'm working to port bnxt over to using this API. What are your thoughts on maybe pulling this out and use bnxt to drive it? > > /**