public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <ast@kernel.org>, <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<hawk@kernel.org>, <amritha.nambiar@intel.com>, <mst@redhat.com>,
	<jasowang@redhat.com>, <xuanzhuo@linux.alibaba.com>,
	<daniel@iogearbox.net>, <andrii@kernel.org>,
	<martin.lau@linux.dev>, <song@kernel.org>,
	<yonghong.song@linux.dev>, <john.fastabend@gmail.com>,
	<kpsingh@kernel.org>, <sdf@google.com>, <haoluo@google.com>,
	<jolsa@kernel.org>, <bjorn@kernel.org>,
	<magnus.karlsson@intel.com>, <maciej.fijalkowski@intel.com>,
	<jonathan.lemon@gmail.com>, <gregkh@linuxfoundation.org>,
	<wangyufen@huawei.com>,
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH bpf-next v2 2/3] net: move struct netdev_rx_queue out of netdevice.h
Date: Thu, 3 Aug 2023 17:52:32 +0200	[thread overview]
Message-ID: <b67d4e91-9802-57f1-462a-38000a6e159f@intel.com> (raw)
In-Reply-To: <20230803010230.1755386-3-kuba@kernel.org>

From: Jakub Kicinski <kuba@kernel.org>
Date: Wed,  2 Aug 2023 18:02:29 -0700

> struct netdev_rx_queue is touched in only a few places
> and having it defined in netdevice.h brings in the dependency
> on xdp.h, because struct xdp_rxq_info gets embedded in
> struct netdev_rx_queue.

[...]

> +static inline struct netdev_rx_queue *
> +__netif_get_rx_queue(struct net_device *dev, unsigned int rxq)
> +{
> +	return dev->_rx + rxq;
> +}
> +
> +#ifdef CONFIG_SYSFS
> +static inline unsigned int
> +get_netdev_rx_queue_index(struct netdev_rx_queue *queue)
> +{
> +	struct net_device *dev = queue->dev;
> +	int index = queue - dev->_rx;
> +
> +	BUG_ON(index >= dev->num_rx_queues);
> +	return index;
> +}
> +#endif
> +#endif

Looks a bit confusing :s Could you separate then by a NL and leave a
comment near each one with the corresponding definition? Like

	return index;
}
#endif /* CONFIG_SYSFS */

#endif /* _LINUX_NETDEV_RX_QUEUE_H */

Maybe Alex could do that when applying, given that there are no more
change requests.

> diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
> index 7d47f53f20c1..0aac76c13fd4 100644
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -20,6 +20,7 @@

[...]

Thanks,
Olek

  parent reply	other threads:[~2023-08-03 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  1:02 [PATCH bpf-next v2 0/3] net: struct netdev_rx_queue and xdp.h reshuffling Jakub Kicinski
2023-08-03  1:02 ` [PATCH bpf-next v2 1/3] eth: add missing xdp.h includes in drivers Jakub Kicinski
2023-08-03 14:09   ` Jesper Dangaard Brouer
2023-08-03 19:34   ` Horatiu Vultur
2023-08-03  1:02 ` [PATCH bpf-next v2 2/3] net: move struct netdev_rx_queue out of netdevice.h Jakub Kicinski
2023-08-03 14:24   ` Jesper Dangaard Brouer
2023-08-03 15:52   ` Alexander Lobakin [this message]
2023-08-03  1:02 ` [PATCH bpf-next v2 3/3] net: invert the netdevice.h vs xdp.h dependency Jakub Kicinski
2023-08-03 13:59   ` Jesper Dangaard Brouer
2023-08-03 15:50 ` [PATCH bpf-next v2 0/3] net: struct netdev_rx_queue and xdp.h reshuffling patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b67d4e91-9802-57f1-462a-38000a6e159f@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=martin.lau@linux.dev \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wangyufen@huawei.com \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox