[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <469243D3.3090208@trash.net>
Date: Mon, 09 Jul 2007 16:18:59 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Urs Thuermann <urs@...ogud.escape.de>
CC: Oliver Hartkopp <oliver@...tkopp.net>,
David Miller <davem@...emloft.net>,
Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
j.hadi123@...il.com, netdev@...r.kernel.org
Subject: Re: [patch 5/7] CAN: Add virtual CAN netdevice driver
Urs Thuermann wrote:
> + * CAN network devices *should* support a local loopback functionality
> + * (see Documentation/networking/can.txt). To test the handling of CAN
> + * interfaces that do not support the loopback both driver types are
> + * implemented inside this vcan driver. In the case that the driver does
> + * not support the loopback the IFF_LOOPBACK remains clear in dev->flags.
> + * This causes the PF_CAN core to perform the loopback as a fallback solution.
> + */
> +
> +static int loopback = 0; /* vcan default: no loopback, just free the skb */
> +module_param(loopback, int, S_IRUGO);
> +MODULE_PARM_DESC(loopback, "Loop back sent frames. vcan default: 0 (Off)");
...
> +static void vcan_setup(struct net_device *dev)
> +{
> + DBG("dev %s\n", dev->name);
> +
> + dev->type = ARPHRD_CAN;
> + dev->mtu = sizeof(struct can_frame);
> + dev->hard_header_len = 0;
> + dev->addr_len = 0;
> + dev->tx_queue_len = 0;
> + dev->flags = IFF_NOARP;
> +
> + /* set flags according to driver capabilities */
> + if (loopback)
> + dev->flags |= IFF_LOOPBACK;
Still configuration of the network device based on module parameters.
What about people that want loopback and non-loopback devices at the
same time?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists