All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC (v3) 00/19] MTU changes and other fixes
@ 2016-02-03 11:45 Jakub Kicinski
  2016-02-03 11:45 ` [RFC (v3) 01/19] nfp: return error if MTU change fails Jakub Kicinski
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Jakub Kicinski @ 2016-02-03 11:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, Jakub Kicinski

Hi Dave,

I'm posting this as RFC because I think +625/-339 of mostly
code refactoring is not good for net, my intention is to
show you I did the homework and then repost this as two parts
- for net and for net-next.  In retrospect I could've just
asked you right away where you intend this series to go...

First four patches are what you already seen - those plus
number 5 I would be glad to see in net.

Patches 6-13 refactor open/stop paths to follow this:
 - alloc;
 - dev/FW init;
 - stack init/start.
stop:
 - stack stop;
 - dev/FW down;
 - free.
That's a quite a bit of code churn I did my best to split
it up but probably still not much fun to review.

Patch 14 splits the open/stop into chunks I can call later.

Patch 15 makes sure that FW start/stop operations are
reflected in SW state (which was not needed earlier since
we always did full down/up).

Patches 16 and 18 are trivial, split for readability.

Patch 17 does what you requested for MTU change:
 - alloc new resources;
 - stop dev;
 - try to start dev with new config;
 - if failed try with old config;
 - if failed die loudly.

Patch 19 does the same thing for ring resize.

I tested this with various error injection hacks and it 
seems quite solid.

Please let me know if 1-5/6-19 split makes sense to you or if
you prefer to take them all into one tree (and I should squash
#1 and #2 into proper rework (#17)).

Thanks!


Jakub Kicinski (19):
  nfp: return error if MTU change fails
  nfp: free buffers before changing MTU
  nfp: correct RX buffer length calculation
  nfp: fix RX buffer length validation
  nfp: don't trust netif_running() in debug code
  nfp: move link state interrupt request/free calls
  nfp: break up nfp_net_{alloc|free}_rings
  nfp: make *x_ring_init do all the init
  nfp: allocate ring SW structs dynamically
  nfp: cleanup tx ring flush and rename to reset
  nfp: reorganize initial filling of RX rings
  nfp: preallocate RX buffers early in .ndo_open
  nfp: move filling ring information to FW config
  nfp: slice .ndo_open() and .ndo_stop() up
  nfp: sync ring state during FW reconfiguration
  nfp: propagate list buffer size in struct rx_ring
  nfp: convert .ndo_change_mtu() to prepare/commit paradigm
  nfp: pass ring count as function parameter
  nfp: allow ring size reconfiguration at runtime

 drivers/net/ethernet/netronome/nfp/nfp_net.h       |  10 +-
 .../net/ethernet/netronome/nfp/nfp_net_common.c    | 920 ++++++++++++++-------
 .../net/ethernet/netronome/nfp/nfp_net_debugfs.c   |   4 +-
 .../net/ethernet/netronome/nfp/nfp_net_ethtool.c   |  30 +-
 4 files changed, 625 insertions(+), 339 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-02-03 11:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 11:45 [RFC (v3) 00/19] MTU changes and other fixes Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 01/19] nfp: return error if MTU change fails Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 02/19] nfp: free buffers before changing MTU Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 03/19] nfp: correct RX buffer length calculation Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 04/19] nfp: fix RX buffer length validation Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 05/19] nfp: don't trust netif_running() in debug code Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 06/19] nfp: move link state interrupt request/free calls Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 07/19] nfp: break up nfp_net_{alloc|free}_rings Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 08/19] nfp: make *x_ring_init do all the init Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 09/19] nfp: allocate ring SW structs dynamically Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 10/19] nfp: cleanup tx ring flush and rename to reset Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 11/19] nfp: reorganize initial filling of RX rings Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 12/19] nfp: preallocate RX buffers early in .ndo_open Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 13/19] nfp: move filling ring information to FW config Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 14/19] nfp: slice .ndo_open() and .ndo_stop() up Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 15/19] nfp: sync ring state during FW reconfiguration Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 16/19] nfp: propagate list buffer size in struct rx_ring Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 17/19] nfp: convert .ndo_change_mtu() to prepare/commit paradigm Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 18/19] nfp: pass ring count as function parameter Jakub Kicinski
2016-02-03 11:45 ` [RFC (v3) 19/19] nfp: allow ring size reconfiguration at runtime Jakub Kicinski

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.