From: Jakub Kicinski <kuba@kernel.org>
To: Gerhard Engleder <gerhard@engleder-embedded.com>
Cc: Alexander H Duyck <alexander.duyck@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com
Subject: Re: [PATCH net-next v4 10/10] tsnep: Support XDP BPF program setup
Date: Tue, 10 Jan 2023 16:12:37 -0800 [thread overview]
Message-ID: <20230110161237.2a40ccc8@kernel.org> (raw)
In-Reply-To: <3d0bc2ad-2c4a-527a-be09-b9746c87b2a8@engleder-embedded.com>
On Tue, 10 Jan 2023 22:38:04 +0100 Gerhard Engleder wrote:
> > As I called out earlier the __TSNEP_DOWN is just !IFF_UP so you don't
> > need that bit.
> >
> > The fact that netif_carrier_off is here also points out the fact that
> > the code in the Tx path isn't needed regarding __TSNEP_DOWN and you can
> > probably just check netif_carrier_ok if you need the check.
>
> tsnep_netdev_close() is called directly during bpf prog setup (see
> tsnep_xdp_setup_prog() in this commit). If the following
> tsnep_netdev_open() call fails, then this flag signals that the device
> is already down and nothing needs to be cleaned up if
> tsnep_netdev_close() is called later (because IFF_UP is still set).
TBH we've been pushing pretty hard for a while now to stop people
from implementing the:
close()
change config
open()
sort of reconfiguration. I did that myself when I was a was
implementing my first Ethernet driver and DaveM nacked the change.
Must have been a decade ago.
Imagine you're working on a remote box via SSH and the box is under
transient memory pressure. Allocations fail, we don't want the machine
to fall off the network :(
next prev parent reply other threads:[~2023-01-11 0:12 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 19:15 [PATCH net-next v4 00/10] tsnep: XDP support Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 01/10] tsnep: Use spin_lock_bh for TX Gerhard Engleder
2023-01-10 15:49 ` Alexander H Duyck
2023-01-10 19:44 ` Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 02/10] tsnep: Forward NAPI budget to napi_consume_skb() Gerhard Engleder
2023-01-10 15:50 ` Alexander H Duyck
2023-01-09 19:15 ` [PATCH net-next v4 03/10] tsnep: Do not print DMA mapping error Gerhard Engleder
2023-01-10 15:53 ` Alexander H Duyck
2023-01-10 19:47 ` Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 04/10] tsnep: Add adapter down state Gerhard Engleder
2023-01-10 16:05 ` Alexander H Duyck
2023-01-10 20:16 ` Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 05/10] tsnep: Add XDP TX support Gerhard Engleder
2023-01-10 16:56 ` Alexander H Duyck
2023-01-10 21:07 ` Gerhard Engleder
2023-01-10 22:38 ` Alexander Duyck
2023-01-11 18:51 ` Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 06/10] tsnep: Substract TSNEP_RX_INLINE_METADATA_SIZE once Gerhard Engleder
2023-01-10 17:05 ` Alexander H Duyck
2023-01-09 19:15 ` [PATCH net-next v4 07/10] tsnep: Prepare RX buffer for XDP support Gerhard Engleder
2023-01-09 19:15 ` [PATCH net-next v4 08/10] tsnep: Add RX queue info " Gerhard Engleder
2023-01-10 17:29 ` Alexander H Duyck
2023-01-10 21:21 ` Gerhard Engleder
2023-01-10 22:27 ` Alexander Duyck
2023-01-09 19:15 ` [PATCH net-next v4 09/10] tsnep: Add XDP RX support Gerhard Engleder
2023-01-10 17:40 ` Alexander H Duyck
2023-01-10 21:28 ` Gerhard Engleder
2023-01-10 22:30 ` Alexander Duyck
2023-01-09 19:15 ` [PATCH net-next v4 10/10] tsnep: Support XDP BPF program setup Gerhard Engleder
2023-01-10 17:33 ` Alexander H Duyck
2023-01-10 21:38 ` Gerhard Engleder
2023-01-10 23:00 ` Alexander H Duyck
2023-01-11 18:58 ` Gerhard Engleder
2023-01-11 0:12 ` Jakub Kicinski [this message]
2023-01-11 19:11 ` Gerhard Engleder
2023-01-11 20:06 ` Jakub Kicinski
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=20230110161237.2a40ccc8@kernel.org \
--to=kuba@kernel.org \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gerhard@engleder-embedded.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).