All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org
Cc: David Ahern <dsahern@gmail.com>
Subject: [PATCH v3 net-next 0/7] net: l3mdev: Support for sockets bound to enslaved device
Date: Mon,  7 Aug 2017 08:44:15 -0700	[thread overview]
Message-ID: <1502120662-1430-1-git-send-email-dsahern@gmail.com> (raw)

A missing piece to the VRF puzzle is the ability to bind sockets to
devices enslaved to a VRF. This patch set adds the enslaved device
index, sdif, to IPv4 and IPv6 socket lookups. The end result for users
is the following scope options for services:

1. "global" services - sockets not bound to any device

   Allows 1 service to work across all network interfaces with
   connected sockets bound to the VRF the connection originates
   (Requires net.ipv4.tcp_l3mdev_accept=1 for TCP and
    net.ipv4.udp_l3mdev_accept=1 for UDP)

2. "VRF" local services - sockets bound to a VRF

   Sockets work across all network interfaces enslaved to a VRF but
   are limited to just the one VRF.

3. "device" services - sockets bound to a specific network interface

   Service works only through the one specific interface.

v3
- convert __inet_lookup_established in dccp_v4_err; missed in v2

v2
- remove sk_lookup struct and add sdif as an argument to existing
  functions

Changes since RFC:
- no significant logic changes; mainly whitespace cleanups

David Ahern (7):
  net: ipv4: add second dif to udp socket lookups
  net: ipv4: add second dif to inet socket lookups
  net: ipv4: add second dif to raw socket lookups
  net: ipv4: add second dif to multicast source filter
  net: ipv6: add second dif to udp socket lookups
  net: ipv6: add second dif to inet6 socket lookups
  net: ipv6: add second dif to raw socket lookups

 include/linux/igmp.h           |  3 +-
 include/linux/ipv6.h           | 10 +++++++
 include/net/inet6_hashtables.h | 22 ++++++++------
 include/net/inet_hashtables.h  | 31 +++++++++++---------
 include/net/ip.h               | 10 +++++++
 include/net/raw.h              |  2 +-
 include/net/rawv6.h            |  2 +-
 include/net/tcp.h              | 20 +++++++++++++
 include/net/udp.h              |  4 +--
 net/dccp/ipv4.c                |  4 +--
 net/dccp/ipv6.c                |  4 +--
 net/ipv4/igmp.c                |  6 ++--
 net/ipv4/inet_hashtables.c     | 27 ++++++++++-------
 net/ipv4/raw.c                 | 18 ++++++++----
 net/ipv4/raw_diag.c            |  4 +--
 net/ipv4/tcp_ipv4.c            | 13 +++++----
 net/ipv4/udp.c                 | 66 ++++++++++++++++++++++++------------------
 net/ipv4/udp_diag.c            | 10 +++----
 net/ipv6/inet6_hashtables.c    | 28 +++++++++++-------
 net/ipv6/raw.c                 | 13 +++++----
 net/ipv6/tcp_ipv6.c            | 13 +++++----
 net/ipv6/udp.c                 | 47 ++++++++++++++++--------------
 net/netfilter/xt_TPROXY.c      |  6 ++--
 23 files changed, 228 insertions(+), 135 deletions(-)

-- 
2.1.4

             reply	other threads:[~2017-08-07 15:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 15:44 David Ahern [this message]
2017-08-07 15:44 ` [PATCH v3 net-next 1/7] net: ipv4: add second dif to udp socket lookups David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 2/7] net: ipv4: add second dif to inet " David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 3/7] net: ipv4: add second dif to raw " David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 4/7] net: ipv4: add second dif to multicast source filter David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 5/7] net: ipv6: add second dif to udp socket lookups David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 6/7] net: ipv6: add second dif to inet6 " David Ahern
2017-08-07 15:44 ` [PATCH v3 net-next 7/7] net: ipv6: add second dif to raw " David Ahern
2017-08-07 18:39 ` [PATCH v3 net-next 0/7] net: l3mdev: Support for sockets bound to enslaved device David Miller
2017-08-07 18:40   ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502120662-1430-1-git-send-email-dsahern@gmail.com \
    --to=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.