* [PATCH net repost] nfp: do not update MTU from BH in flower app
@ 2017-08-11 8:18 Simon Horman
2017-08-11 21:51 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2017-08-11 8:18 UTC (permalink / raw)
To: David Miller, Jakub Kicinski; +Cc: netdev, oss-drivers, Simon Horman
The Flower app may receive a request to update the MTU of a representor
netdev upon receipt of a control message from the firmware. This requires
the RTNL lock which needs to be taken outside of the packet processing
path.
As a handling of this correctly seems a little to invasive for a fix simply
skip setting the MTU for now.
Relevant backtrace:
[ 1496.288489] BUG: scheduling while atomic: kworker/0:3/373/0x00000100
[ 1496.294911] dca syscopyarea sysfillrect sysimgblt fb_sys_fops ptp drm mxm_wmi ahci pps_core libahci i2c_algo_bit wmi [last unloaded: nfp]
[ 1496.294918] CPU: 0 PID: 373 Comm: kworker/0:3 Tainted: G OE 4.13.0-rc3+ #3
[ 1496.294919] Hardware name: Supermicro X10DRi/X10DRi, BIOS 2.0 12/28/2015
[ 1496.294923] Workqueue: events work_for_cpu_fn
[ 1496.294924] Call Trace:
[ 1496.294927] <IRQ>
[ 1496.294931] dump_stack+0x63/0x82
[ 1496.294935] __schedule_bug+0x54/0x70
[ 1496.294937] __schedule+0x62f/0x890
[ 1496.294941] ? intel_unmap_sg+0x90/0x90
[ 1496.294942] schedule+0x36/0x80
[ 1496.294943] schedule_preempt_disabled+0xe/0x10
[ 1496.294945] __mutex_lock.isra.2+0x445/0x4a0
[ 1496.294947] ? device_is_rmrr_locked+0x12/0x50
[ 1496.294950] ? kfree+0x162/0x170
[ 1496.294952] ? device_is_rmrr_locked+0x12/0x50
[ 1496.294953] ? iommu_should_identity_map+0x50/0xe0
[ 1496.294954] __mutex_lock_slowpath+0x13/0x20
[ 1496.294955] ? iommu_no_mapping+0x48/0xd0
[ 1496.294956] ? __mutex_lock_slowpath+0x13/0x20
[ 1496.294957] mutex_lock+0x2f/0x40
[ 1496.294960] rtnl_lock+0x15/0x20
[ 1496.294979] nfp_flower_cmsg_rx+0xc8/0x150 [nfp]
[ 1496.294986] nfp_ctrl_poll+0x286/0x350 [nfp]
[ 1496.294989] tasklet_action+0xf6/0x110
[ 1496.294992] __do_softirq+0xed/0x278
[ 1496.294993] irq_exit+0xb6/0xc0
[ 1496.294994] do_IRQ+0x4f/0xd0
[ 1496.294996] common_interrupt+0x89/0x89
Fixes: 948faa46c05b ("nfp: add support for control messages for flower app")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
index dd7fa9cf225f..b0837b58c3a1 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
@@ -115,14 +115,10 @@ nfp_flower_cmsg_portmod_rx(struct nfp_app *app, struct sk_buff *skb)
return;
}
- if (link) {
+ if (link)
netif_carrier_on(netdev);
- rtnl_lock();
- dev_set_mtu(netdev, be16_to_cpu(msg->mtu));
- rtnl_unlock();
- } else {
+ else
netif_carrier_off(netdev);
- }
rcu_read_unlock();
}
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net repost] nfp: do not update MTU from BH in flower app
2017-08-11 8:18 [PATCH net repost] nfp: do not update MTU from BH in flower app Simon Horman
@ 2017-08-11 21:51 ` David Miller
2017-08-15 6:13 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2017-08-11 21:51 UTC (permalink / raw)
To: simon.horman; +Cc: jakub.kicinski, netdev, oss-drivers
From: Simon Horman <simon.horman@netronome.com>
Date: Fri, 11 Aug 2017 10:18:20 +0200
> The Flower app may receive a request to update the MTU of a representor
> netdev upon receipt of a control message from the firmware. This requires
> the RTNL lock which needs to be taken outside of the packet processing
> path.
>
> As a handling of this correctly seems a little to invasive for a fix simply
> skip setting the MTU for now.
>
> Relevant backtrace:
...
> Fixes: 948faa46c05b ("nfp: add support for control messages for flower app")
> Signed-off-by: Simon Horman <simon.horman@netronome.com>
> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net repost] nfp: do not update MTU from BH in flower app
2017-08-11 21:51 ` David Miller
@ 2017-08-15 6:13 ` Simon Horman
2017-08-16 0:52 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2017-08-15 6:13 UTC (permalink / raw)
To: David Miller; +Cc: jakub.kicinski, netdev, oss-drivers
On Fri, Aug 11, 2017 at 02:51:07PM -0700, David Miller wrote:
> From: Simon Horman <simon.horman@netronome.com>
> Date: Fri, 11 Aug 2017 10:18:20 +0200
>
> > The Flower app may receive a request to update the MTU of a representor
> > netdev upon receipt of a control message from the firmware. This requires
> > the RTNL lock which needs to be taken outside of the packet processing
> > path.
> >
> > As a handling of this correctly seems a little to invasive for a fix simply
> > skip setting the MTU for now.
> >
> > Relevant backtrace:
> ...
> > Fixes: 948faa46c05b ("nfp: add support for control messages for flower app")
> > Signed-off-by: Simon Horman <simon.horman@netronome.com>
> > Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>
> Applied.
Thanks.
Could you pull net into net-next? I'd like to send up a follow-up
for net-next to allow processing of the MTU.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net repost] nfp: do not update MTU from BH in flower app
2017-08-15 6:13 ` Simon Horman
@ 2017-08-16 0:52 ` David Miller
2017-08-16 4:03 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2017-08-16 0:52 UTC (permalink / raw)
To: simon.horman; +Cc: jakub.kicinski, netdev, oss-drivers
From: Simon Horman <simon.horman@netronome.com>
Date: Tue, 15 Aug 2017 08:13:48 +0200
> Could you pull net into net-next? I'd like to send up a follow-up
> for net-next to allow processing of the MTU.
Once Linus takes the pull request I just sent to him, I will
do this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net repost] nfp: do not update MTU from BH in flower app
2017-08-16 0:52 ` David Miller
@ 2017-08-16 4:03 ` David Miller
2017-08-16 5:35 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2017-08-16 4:03 UTC (permalink / raw)
To: simon.horman; +Cc: jakub.kicinski, netdev, oss-drivers
From: David Miller <davem@davemloft.net>
Date: Tue, 15 Aug 2017 17:52:40 -0700 (PDT)
> From: Simon Horman <simon.horman@netronome.com>
> Date: Tue, 15 Aug 2017 08:13:48 +0200
>
>> Could you pull net into net-next? I'd like to send up a follow-up
>> for net-next to allow processing of the MTU.
>
> Once Linus takes the pull request I just sent to him, I will
> do this.
And this is now done.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net repost] nfp: do not update MTU from BH in flower app
2017-08-16 4:03 ` David Miller
@ 2017-08-16 5:35 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2017-08-16 5:35 UTC (permalink / raw)
To: David Miller; +Cc: jakub.kicinski, netdev, oss-drivers
On Tue, Aug 15, 2017 at 09:03:58PM -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Tue, 15 Aug 2017 17:52:40 -0700 (PDT)
>
> > From: Simon Horman <simon.horman@netronome.com>
> > Date: Tue, 15 Aug 2017 08:13:48 +0200
> >
> >> Could you pull net into net-next? I'd like to send up a follow-up
> >> for net-next to allow processing of the MTU.
> >
> > Once Linus takes the pull request I just sent to him, I will
> > do this.
>
> And this is now done.
Great, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-16 5:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 8:18 [PATCH net repost] nfp: do not update MTU from BH in flower app Simon Horman
2017-08-11 21:51 ` David Miller
2017-08-15 6:13 ` Simon Horman
2017-08-16 0:52 ` David Miller
2017-08-16 4:03 ` David Miller
2017-08-16 5:35 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.