lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 1 Oct 2022 12:34:08 +0300 From: Yevhen Orlov <yevhen.orlov@...ision.eu> To: netdev@...r.kernel.org Cc: Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>, Taras Chornyi <taras.chornyi@...ision.eu>, Mickey Rachamim <mickeyr@...vell.com>, Serhiy Pshyk <serhiy.pshyk@...ision.eu>, "David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>, Stephen Hemminger <stephen@...workplumber.org>, linux-kernel@...r.kernel.org, Yevhen Orlov <yevhen.orlov@...ision.eu>, Taras Chornyi <tchornyi@...vell.com>, Oleksandr Mazur <oleksandr.mazur@...ision.eu> Subject: [PATCH net-next v7 0/9] net: marvell: prestera: add nexthop routes offloading 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@...vell.com> Signed-off-by: Taras Chornyi <tchornyi@...vell.com> Co-developed-by: Oleksandr Mazur <oleksandr.mazur@...ision.eu> Signed-off-by: Oleksandr Mazur <oleksandr.mazur@...ision.eu> Signed-off-by: Yevhen Orlov <yevhen.orlov@...ision.eu> Changes for v2: * Add more reviewers in CC * Check if route nexthop or direct with fib_nh_gw_family instead of fib_nh_scope This is needed after, 747c14307214 ("ip: fix dflt addr selection for connected nexthop"), because direct route is now with the same scope as nexthop (RT_SCOPE_LINK) Changes for v3: * Resolve "unused functions" warnings, after patch ("net: marvell: prestera: Add heplers to interact ... "), and before patch ("net: marvell: prestera: Add neighbour cache accounting") Changes for v4: * Rebase to the latest master to resolve patch applying issues Changes for v5: * Repack structures to prevent holes * Remove unused variables * Fix misspeling issues Changes for v6: * Rebase on top of master * Fix smatch warnings Changes for v7: * Rebase on top of master * Refactor: use "fib_lookup" instead of "fib_new_table"+"fib_table_lookup", according to Paolo Abeni suggestion * Refactor: use "rhashtable_free_and_destroy" instead of rhashtable walk, according to Paolo Abeni suggestion 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: Propagate nh state from hw to kernel .../net/ethernet/marvell/prestera/prestera.h | 12 + .../ethernet/marvell/prestera/prestera_hw.c | 130 ++ .../ethernet/marvell/prestera/prestera_hw.h | 11 + .../ethernet/marvell/prestera/prestera_main.c | 11 + .../marvell/prestera/prestera_router.c | 1119 ++++++++++++++++- .../marvell/prestera/prestera_router_hw.c | 366 +++++- .../marvell/prestera/prestera_router_hw.h | 76 +- 7 files changed, 1683 insertions(+), 42 deletions(-) -- 2.17.1
Powered by blists - more mailing lists