Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: David Miller <davem@davemloft.net>
To: snelson@pensando.io
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] ionic: recover from ringsize change failure
Date: Fri, 24 Jul 2020 19:44:17 -0700 (PDT)
Message-ID: <20200724.194417.2151242753657227232.davem@davemloft.net> (raw)
In-Reply-To: <20200725002326.41407-3-snelson@pensando.io>

From: Shannon Nelson <snelson@pensando.io>
Date: Fri, 24 Jul 2020 17:23:24 -0700

> If the ringsize change fails, try restoring the previous setting.
> 
> Signed-off-by: Shannon Nelson <snelson@pensando.io>

You really can't recover properly, or reliably, with the way all of this
is structured in the ionic driver.  This is at best a half attempt at
error recovery.

Doing a full ionic_open() call abstracts things too heavily.

What you need to do is save away the current queue memory and object,
without freeing them, and only release them when you can successfully
setup the new queues.

This is the only way you can properly recover from errors in this
operation, with a proper check/commit sequence.

I'd rather not merge half solutions to this problem, sorry.

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25  0:23 [PATCH net-next 0/4] ionic txrx updates Shannon Nelson
2020-07-25  0:23 ` [PATCH net-next 1/4] ionic: use fewer firmware doorbells on rx fill Shannon Nelson
2020-07-25  0:23 ` [PATCH net-next 2/4] ionic: recover from ringsize change failure Shannon Nelson
2020-07-25  2:44   ` David Miller [this message]
2020-07-27 16:42     ` Shannon Nelson
2020-07-25  0:23 ` [PATCH net-next 3/4] ionic: tx separate servicing Shannon Nelson
2020-07-25  0:23 ` [PATCH net-next 4/4] ionic: separate interrupt for Tx and Rx Shannon Nelson
2020-07-25  0:56   ` Jakub Kicinski
2020-07-27 16:37     ` Shannon Nelson

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=20200724.194417.2151242753657227232.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=snelson@pensando.io \
    /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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git