mbox series

[net-next,0/5] ip6_tunnel: add MPLS support

Message ID 1589834028-9929-1-git-send-email-vfedorenko@novek.ru
Headers show
Series ip6_tunnel: add MPLS support | expand

Message

Vadim Fedorenko May 18, 2020, 8:33 p.m. UTC
The support for MPLS-in-IPv4 was added earlier. This patchset adds
support for MPLS-in-IPv6.

Vadim Fedorenko (5):
  ip6_tunnel: simplify transmit path
  ip6_tunnel: add MPLS transmit support
  tunnel6: support for IPPROTO_MPLS
  ip6_tunnel: add generic MPLS receive support
  mpls: Add support for IPv6 tunnels

 net/ipv6/ip6_tunnel.c | 252 +++++++++++++++++++++++++++++---------------------
 net/ipv6/tunnel6.c    |  96 ++++++++++++++++++-
 net/mpls/af_mpls.c    |   3 +-
 3 files changed, 242 insertions(+), 109 deletions(-)

Comments

David Miller May 19, 2020, 10:34 p.m. UTC | #1
From: Vadim Fedorenko <vfedorenko@novek.ru>
Date: Mon, 18 May 2020 23:33:43 +0300

> The support for MPLS-in-IPv4 was added earlier. This patchset adds
> support for MPLS-in-IPv6.

This adds way too many ifdefs into the C code, please find another way
to abstract this such that you don't need to add ifdefs all over the
place.

Thank you.
Vadim Fedorenko May 19, 2020, 11:30 p.m. UTC | #2
On 20.05.2020 01:34, David Miller wrote:
> From: Vadim Fedorenko <vfedorenko@novek.ru>
> Date: Mon, 18 May 2020 23:33:43 +0300
>
>> The support for MPLS-in-IPv4 was added earlier. This patchset adds
>> support for MPLS-in-IPv6.
> This adds way too many ifdefs into the C code, please find another way
> to abstract this such that you don't need to add ifdefs all over the
> place.
>
> Thank you.

This patchset was based on support for MPLS in ipip tunnel which is full
of ifdefs. Can you suggest me a way to eliminate them?

I think that almost all code can be compiled without any ifdef because it
uses constants that are always defined execpt the init/deinit code. The
only way I see is to check presence of AF_MPLS at runtime but I don't know
how to do it right.

Thanks.