All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] net: marvell: prestera: add nexthop routes offloading
@ 2022-07-10 17:21 Yevhen Orlov
  2022-07-10 17:21 ` [PATCH net-next 1/9] net: marvell: prestera: Add router nexthops ABI Yevhen Orlov
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Yevhen Orlov @ 2022-07-10 17:21 UTC (permalink / raw)
  To: netdev
  Cc: Volodymyr Mytnyk, Taras Chornyi, Mickey Rachamim, Serhiy Pshyk,
	Yevhen Orlov, Taras Chornyi, Oleksandr Mazur, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel

Add support for nexthop routes for Marvell Prestera driver.
Subscribe on NEIGH_UPDATE events.

Add features:
 - Support connected route adding
   e.g.: "ip address add 1.1.1.1/24 dev sw1p1"
   e.g.: "ip route add 6.6.6/24 dev sw1p1"
 - Support nexthop route adding
   e.g.: "ip route add 5.5.5/24 via 1.1.1.2"
 - Support ECMP route adding
   e.g.: "ip route add 5.5.5/24 nexthop via 1.1.1.2 nexthop via 1.1.1.3"
 - Support "offload" and "trap" flags per each nexthop
 - Support "offload" flag for neighbours

Limitations:
 - Only "local" and "main" tables supported
 - Only generic interfaces supported for router (no bridges or vlans)

Flags meaning:
  ip route add 5.5.5/24 nexthop via 2.2.2.2 nexthop via 2.2.2.3
  ip route show
  ...
  5.5.5.0/24 rt_offload 
        nexthop via 2.2.2.2 dev sw1p31 weight 1 trap 
        nexthop via 2.2.2.3 dev sw1p31 weight 1 trap 
  ...
  # When you just add route - lpm entry became occupied
  # in HW ("rt_offload" flag), but related to nexthops neighbours
  # still not resolved ("trap" flag).
  #
  # After some time...
  ip route show
  ...
  5.5.5.0/24 rt_offload 
        nexthop via 2.2.2.2 dev sw1p31 weight 1 offload 
        nexthop via 2.2.2.3 dev sw1p31 weight 1 offload 
  ...
  # You will see, that appropriate neighbours was resolved and nexthop
  # entries occupied in HW too ("offload" flag)

Co-developed-by: Taras Chornyi <tchornyi@marvell.com>
Signed-off-by: Taras Chornyi <tchornyi@marvell.com>
Co-developed-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Yevhen Orlov <yevhen.orlov@plvision.eu>

Yevhen Orlov (9):
  net: marvell: prestera: Add router nexthops ABI
  net: marvell: prestera: Add cleanup of allocated fib_nodes
  net: marvell: prestera: Add strict cleanup of fib arbiter
  net: marvell: prestera: add delayed wq and flush wq on deinit
  net: marvell: prestera: Add length macros for prestera_ip_addr
  net: marvell: prestera: Add heplers to interact with fib_notifier_info
  net: marvell: prestera: add stub handler neighbour events
  net: marvell: prestera: Add neighbour cache accounting
  net: marvell: prestera: Propogate nh state from hw to kernel

 .../net/ethernet/marvell/prestera/prestera.h  |   12 +
 .../ethernet/marvell/prestera/prestera_hw.c   |  124 ++
 .../ethernet/marvell/prestera/prestera_hw.h   |   11 +
 .../ethernet/marvell/prestera/prestera_main.c |   11 +
 .../marvell/prestera/prestera_router.c        | 1141 ++++++++++++++++-
 .../marvell/prestera/prestera_router_hw.c     |  379 +++++-
 .../marvell/prestera/prestera_router_hw.h     |   76 +-
 7 files changed, 1712 insertions(+), 42 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2022-07-12  3:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-10 17:21 [PATCH net-next 0/9] net: marvell: prestera: add nexthop routes offloading Yevhen Orlov
2022-07-10 17:21 ` [PATCH net-next 1/9] net: marvell: prestera: Add router nexthops ABI Yevhen Orlov
2022-07-12  3:22   ` Jakub Kicinski
2022-07-10 17:22 ` [PATCH net-next 2/9] net: marvell: prestera: Add cleanup of allocated fib_nodes Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 3/9] net: marvell: prestera: Add strict cleanup of fib arbiter Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 4/9] net: marvell: prestera: add delayed wq and flush wq on deinit Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 5/9] net: marvell: prestera: Add length macros for prestera_ip_addr Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 6/9] net: marvell: prestera: Add heplers to interact with fib_notifier_info Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 7/9] net: marvell: prestera: add stub handler neighbour events Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 8/9] net: marvell: prestera: Add neighbour cache accounting Yevhen Orlov
2022-07-10 17:22 ` [PATCH net-next 9/9] net: marvell: prestera: Propogate nh state from hw to kernel Yevhen Orlov
2022-07-12  3:17 ` [PATCH net-next 0/9] net: marvell: prestera: add nexthop routes offloading 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.