netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Gerhard Engleder <gerhard@engleder-embedded.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
	ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
	john.fastabend@gmail.com
Subject: Re: [PATCH net-next 2/6] tsnep: Add XDP TX support
Date: Wed, 07 Dec 2022 11:24:21 +0100	[thread overview]
Message-ID: <db3d16ff19ee4558bf96e585e56661eb626163df.camel@redhat.com> (raw)
In-Reply-To: <20221203215416.13465-3-gerhard@engleder-embedded.com>

On Sat, 2022-12-03 at 22:54 +0100, Gerhard Engleder wrote:
[...]
> +/* This function requires __netif_tx_lock is held by the caller. */
> +static int tsnep_xdp_xmit_frame_ring(struct xdp_frame *xdpf,
> +				     struct tsnep_tx *tx, bool dma_map)
> +{
> +	struct skb_shared_info *shinfo = xdp_get_shared_info_from_frame(xdpf);
> +	unsigned long flags;
> +	int count = 1;
> +	struct tsnep_tx_entry *entry;
> +	int length;
> +	int i;
> +	int retval;
> +
> +	if (unlikely(xdp_frame_has_frags(xdpf)))
> +		count += shinfo->nr_frags;
> +
> +	spin_lock_irqsave(&tx->lock, flags);

Not strictily related to this patch, but why are you using the _irqsafe
variant? it looks like all the locak users are either in process or BH
context.

Thanks!

Paolo


  reply	other threads:[~2022-12-07 10:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-03 21:54 [PATCH net-next 0/6] tsnep: XDP support Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 1/6] tsnep: Add adapter down state Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 2/6] tsnep: Add XDP TX support Gerhard Engleder
2022-12-07 10:24   ` Paolo Abeni [this message]
2022-12-07 20:05     ` Gerhard Engleder
2022-12-07 10:26   ` Paolo Abeni
2022-12-07 20:06     ` Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 3/6] tsnep: Support XDP BPF program setup Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 4/6] tsnep: Prepare RX buffer for XDP support Gerhard Engleder
2022-12-07 10:29   ` Paolo Abeni
2022-12-07 20:09     ` Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 5/6] tsnep: Add RX queue info " Gerhard Engleder
2022-12-03 21:54 ` [PATCH net-next 6/6] tsnep: Add XDP RX support Gerhard Engleder
2022-12-07 10:18   ` Paolo Abeni
2022-12-07 20:12     ` Gerhard Engleder

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=db3d16ff19ee4558bf96e585e56661eb626163df.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gerhard@engleder-embedded.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).