Thread (8 messages) flat view 8 messages, 2 authors, 2016-02-20

Re: [PATCHv3 net 5/5] nfp: don't trust netif_running() in debug code

From: David Miller <davem@davemloft.net>
Date: 2016-02-20 05:01:47

From: Jakub Kicinski <redacted>
Date: Thu, 18 Feb 2016 20:38:13 +0000
Since change_mtu() can fail and leave us with netif_running()
returning true even though all rings were freed - we should
look at NFP_NET_CFG_CTRL_ENABLE flag to determine if device
is really opened.

Signed-off-by: Jakub Kicinski <redacted>
This is exactly why I don't like how you are doing your MTU change at
all.

You must not make the device inoperative if you simply cannot perform
the MTU change.  I'm pretty sure I've told you this already, this
whole ->close(), MTU change, ->open() OOPS THAT FAILED sequence is a
non-starter.  You can't do this.

You are leaving the netdev object in an illegal state when this
happens.

You must return from ->change_mtu() with the device in the UP
and running state if you cannot make the MTU change.

I don't care how invasive it is, you must fix this properly if
you want to fix this because as-is this patch series is a cure
worse than the disease.

I'm not applying any of your currently submitted changes, both for net
and net-next, sorry.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help