03 Jun, 2014

1 commit

  • Now it is not possible to set mtu to team device which has a port
    enslaved to it. The reason is that when team_change_mtu() calls
    dev_set_mtu() for port device, notificator for NETDEV_PRECHANGEMTU
    event is called and team_device_event() returns NOTIFY_BAD forbidding
    the change. So fix this by returning NOTIFY_DONE here in case team is
    changing mtu in team_change_mtu().

    Introduced-by: 3d249d4c "net: introduce ethernet teaming device"
    Signed-off-by: Jiri Pirko
    Acked-by: Flavio Leitner
    Signed-off-by: David S. Miller

    Jiri Pirko
     

24 Jul, 2013

2 commits


20 Jun, 2013

1 commit

  • Conflicts:
    drivers/net/wireless/ath/ath9k/Kconfig
    drivers/net/xen-netback/netback.c
    net/batman-adv/bat_iv_ogm.c
    net/wireless/nl80211.c

    The ath9k Kconfig conflict was a change of a Kconfig option name right
    next to the deletion of another option.

    The xen-netback conflict was overlapping changes involving the
    handling of the notify list in xen_netbk_rx_action().

    Batman conflict resolution provided by Antonio Quartulli, basically
    keep everything in both conflict hunks.

    The nl80211 conflict is a little more involved. In 'net' we added a
    dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
    Linus reported. Meanwhile in 'net-next' the handlers were converted
    to use pre and post doit handlers which use a flag to determine
    whether to hold the RTNL mutex around the operation.

    However, the dump handlers to not use this logic. Instead they have
    to explicitly do the locking. There were apparent bugs in the
    conversion of nl80211_dump_wiphy() in that we were not dropping the
    RTNL mutex in all the return paths, and it seems we very much should
    be doing so. So I fixed that whilst handling the overlapping changes.

    To simplify the initial returns, I take the RTNL mutex after we try
    to allocate 'tb'.

    Signed-off-by: David S. Miller

    David S. Miller
     

12 Jun, 2013

3 commits


07 Mar, 2013

2 commits


28 Feb, 2013

1 commit

  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     

07 Feb, 2013

1 commit

  • Some modes don't require any special carrier handling so
    in these cases, the kernel can control the carrier as for
    any other interface. However, some other modes, e.g. lacp,
    requires more than just that, so userspace needs to control
    the carrier itself.

    The daemon today is ready to control it, but the kernel
    still can change it based on events.

    This fix so that either kernel or userspace is controlling
    the carrier.

    Signed-off-by: Flavio Leitner
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Flavio Leitner
     

13 Oct, 2012

1 commit


23 Aug, 2012

1 commit


20 Aug, 2012

1 commit


15 Aug, 2012

1 commit

  • Although this doesn't matter actually, because netpoll_tx_running()
    doesn't use the parameter, the code will be more readable.

    For team_dev_queue_xmit() we have to move it down to avoid
    compile errors.

    Cc: David Miller
    Signed-off-by: Jiri Pirko
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Amerigo Wang
     

04 Aug, 2012

3 commits


21 Jul, 2012

1 commit


18 Jul, 2012

1 commit


12 Jul, 2012

2 commits


27 Jun, 2012

2 commits


20 Jun, 2012

6 commits


22 Apr, 2012

1 commit

  • This patch changes content of hashlist (used to get port struct by
    computed index (0...en_port_count-1)). Now the hash list contains only
    enabled ports so userspace will be able to say what ports can be used
    for tx/rx. This becomes handy when userspace will need to disable ports
    which does not belong to active aggregator. By default, newly added port
    is enabled.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

11 Apr, 2012

3 commits


05 Apr, 2012

1 commit


25 Jan, 2012

1 commit


17 Nov, 2011

2 commits

  • Since multiple team instances are putting defined options into their
    option list, during register each option must be cloned before added
    into list. This resolves uncool memory corruptions when using multiple
    teams.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • No need to have spinlock for this purpose. So convert this to mutex and
    avoid current schedule while atomic problems in netlink code.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

14 Nov, 2011

1 commit

  • 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.

    teamlibteam 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.

    v7->v8:
    - check ndo_ndo_vlan_rx_[add/kill]_vid functions before calling
    them.
    - use dev_kfree_skb_any() instead of dev_kfree_skb()

    v6->v7:
    - transmit and receive functions are not checked in hot paths.
    That also resolves memory leak on transmit when no port is
    present

    v5->v6:
    - changed couple of _rcu calls to non _rcu ones in non-readers

    v4->v5:
    - team_change_mtu() uses team->lock while travesing though port
    list
    - mac address changes are moved completely to jurisdiction of
    userspace daemon. This way the daemon can do FOM1, FOM2 and
    possibly other weird things with mac addresses.
    Only round-robin mode sets up all ports to bond's address then
    enslaved.
    - Extended Kconfig text

    v3->v4:
    - remove redundant synchronize_rcu from __team_change_mode()
    - revert "set and clear of mode_ops happens per pointer, not per
    byte"
    - extend comment of function __team_change_mode()

    v2->v3:
    - team_change_mtu() uses rcu version of list traversal to unwind
    - set and clear of mode_ops happens per pointer, not per byte
    - port hashlist changed to be embedded into team structure
    - error branch in team_port_enter() does cleanup now
    - fixed rtln->rtnl

    v1->v2:
    - modes are made as modules. Makes team more modular and
    extendable.
    - several commenters' nitpicks found on v1 were fixed
    - several other bugs were fixed.
    - note I ignored Eric's comment about roundrobin port selector
    as Eric's way may be easily implemented as another mode (mode
    "random") in future.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko