Thread (25 messages) 25 messages, 3 authors, 2018-02-28

Re: [PATCH net-next 06/11] ipmr, ip6mr: Make mfc_cache a common structure

From: Yuval Mintz <hidden>
Date: 2018-02-28 20:50:58

On Wed, Feb 28, 2018 at 12:38:20AM +0200, Nikolay Aleksandrov wrote:
On 27/02/18 20:58, Yuval Mintz wrote:
quoted
mfc_cache and mfc6_cache are almost identical - the main difference is
in the origin/group addresses and comparison-key. Make a common
structure encapsulating most of the multicast routing logic  - mr_mfc
and convert both ipmr and ip6mr into using it.

For easy conversion [casting, in this case] mr_mfc has to be the first
field inside every multicast routing abstraction utilizing it.

Signed-off-by: Yuval Mintz <redacted>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c |  21 +-
 include/linux/mroute.h                            |  45 +---
 include/linux/mroute6.h                           |  23 +--
 include/linux/mroute_base.h                       |  45 ++++
 net/ipv4/ipmr.c                                   | 234 +++++++++++----------
 net/ipv6/ip6mr.c                                  | 241 +++++++++++-----------
 6 files changed, 312 insertions(+), 297 deletions(-)
I feel uneasy about these casts all over the place, anyway functionally
the patch looks fine.
Well, testing revealed a bug in handling unresolved cache entries;
I'll fix it as well in v2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help