Linux CAN drivers development
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Andri Yngvason <andri.yngvason@marel.com>, linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	John Ernberg <john.ernberg@actia.se>
Subject: Re: [RFC PATCH 0/4] Net namespaces for SocketCAN
Date: Mon, 28 Sep 2015 19:54:35 +0200	[thread overview]
Message-ID: <56097EDB.9050607@hartkopp.net> (raw)
In-Reply-To: <DB3PR05MB09246A6393EF43427D2CC17689400@DB3PR05MB0924.eurprd05.prod.outlook.com>

Hi Andri,

On 27.09.2015 20:22, Andri Yngvason wrote:

> I've added net namespace support for raw and gw sockets. BCM needs work.
>
> I've done some preliminary testing and everything seems to work, but I would
> like to have some input from you guys before continuing.
>
> In particular I'm worried that I might have missed something with regard to
> receive lists. Devices still share the same "rcv_cache" across namespaces.

What I know from net namespaces is that you can create virtual interfaces 
(veth) which are 'peered' to another veth and can be 'bridged' to a real 
interface.

As the receive lists are interface specific (for real and virtual CAN 
interfaces, see dev->ml_priv in find_dev_rcv_lists()) you would need to make 
the virtual CAN driver namespace aware.

And you would need to implement some 'bind' and 'peering' between the 
interfaces to connect your virtual CAN to other vcan's or real CAN interfaces.

Net namespaces sounds fancy but I wonder what kind of use case you have in 
mind that cannot be realized by virtual CAN interfaces and can-gw routing 
assigments?

Regards,
Oliver

>
> Please tell me what you think.
>
> Thanks,
> Andri
>
> Andri Yngvason (4):
>    net: can: make af_can header global
>    net: can: rename structures
>    net: can: move shared data into net namespace
>    net: can: remove net namespace restrictions
>
>   include/linux/can/core.h    |   4 +-
>   include/net/af_can.h        | 131 +++++++++++++++++++
>   include/net/net_namespace.h |   4 +
>   include/net/netns/can.h     |  20 +++
>   net/can/af_can.c            | 183 ++++++++++++++------------
>   net/can/af_can.h            | 126 ------------------
>   net/can/bcm.c               |  29 +++--
>   net/can/gw.c                |  13 +-
>   net/can/proc.c              | 307 ++++++++++++++++++++++++--------------------
>   net/can/raw.c               |  34 +++--
>   10 files changed, 466 insertions(+), 385 deletions(-)
>   create mode 100644 include/net/af_can.h
>   create mode 100644 include/net/netns/can.h
>   delete mode 100644 net/can/af_can.h
>

  reply	other threads:[~2015-09-28 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 18:22 [RFC PATCH 0/4] Net namespaces for SocketCAN Andri Yngvason
2015-09-28 17:54 ` Oliver Hartkopp [this message]
2015-09-29 10:30   ` Andri Yngvason
2015-09-29 17:56     ` Oliver Hartkopp
2015-09-29 19:07       ` Andri Yngvason

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=56097EDB.9050607@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=andri.yngvason@marel.com \
    --cc=john.ernberg@actia.se \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox