[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2011 16:04:41 -0200
From: Flavio Leitner <fbl@...hat.com>
To: Jiri Pirko <jpirko@...hat.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
eric.dumazet@...il.com, bhutchings@...arflare.com,
shemminger@...tta.com, fubar@...ibm.com, andy@...yhouse.net,
tgraf@...radead.org, ebiederm@...ssion.com, mirqus@...il.com,
kaber@...sh.net, greearb@...delatech.com, jesse@...ira.com,
benjamin.poirier@...il.com, jzupka@...hat.com, ivecera@...hat.com
Subject: Re: [patch net-next V7] net: introduce ethernet teaming device
On Thu, 10 Nov 2011 16:41:38 +0100
Jiri Pirko <jpirko@...hat.com> wrote:
> This patch introduces new network device called team. It supposes to be
> very fast, simple, userspace-driven alternative to existing bonding
> driver.
>
> Userspace library called libteam with couple of demo apps is available
> here:
> https://github.com/jpirko/libteam
> Note it's still in its dipers atm.
>
> team<->libteam use generic netlink for communication. That and rtnl
> suppose to be the only way to configure team device, no sysfs etc.
>
> Python binding of libteam was recently introduced.
> Daemon providing arpmon/miimon active-backup functionality will be
> introduced shortly. All what's necessary is already implemented in
> kernel team driver.
>
> Signed-off-by: Jiri Pirko <jpirko@...hat.com>
>
> v6->v7:
> - transmit and receive functions are not checked in hot paths.
> That also resolves memory leak on transmit when no port is
> present
>
You're right. No need to patch those function names if we use libnl
from git.
[...]
> +static void team_vlan_rx_add_vid(struct net_device *dev, uint16_t vid)
> +{
> + struct team *team = netdev_priv(dev);
> + struct team_port *port;
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(port, &team->port_list, list) {
> + const struct net_device_ops *ops = port->dev->netdev_ops;
> +
> + ops->ndo_vlan_rx_add_vid(port->dev, vid);
This causes a oops when enslaving a tg3 device because there is
no ndo_vlan_rx_add_vid().
> + }
> + rcu_read_unlock();
> +}
> +
> +static void team_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
> +{
> + struct team *team = netdev_priv(dev);
> + struct team_port *port;
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(port, &team->port_list, list) {
> + const struct net_device_ops *ops = port->dev->netdev_ops;
> +
> + ops->ndo_vlan_rx_kill_vid(port->dev, vid);
Well, probably here too, though you can't reach this point without
crashing at team_vlan_rx_add_vid() first.
fbl
--
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