#
f82b959d |
| 19-Jun-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: allow read/write-only options
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
5149ee58 |
| 19-Jun-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add mode priv to port
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
d299cd51 |
| 19-Jun-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: for nomode use dummy struct team_mode
That leaves team->mode and all its values valid so no checks would be needed (for example in team_mode_option_get()).
Signed-off-by: Jiri Pirko <jpirko@r
team: for nomode use dummy struct team_mode
That leaves team->mode and all its values valid so no checks would be needed (for example in team_mode_option_get()).
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0402788a |
| 19-Jun-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: make team_mode struct const
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
Revision tags: v3.5-rc3, v3.5-rc2, v3.5-rc1, v3.4, v3.4-rc7, v3.4-rc6, v3.4-rc5, v3.4-rc4 |
|
#
acd69962 |
| 19-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add per-port option for enabling/disabling ports
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
19a0b58e |
| 19-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: allow to enable/disable ports
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 userspa
team: allow to enable/disable ports
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 <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.4-rc3 |
|
#
cade4555 |
| 10-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add missed "statics"
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
71472ec1 |
| 10-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add user_linkup and user_linkup_enabled per-port option
Allows userspace to setup linkup for ports. Default is to take linkup directly from ethtool state.
Signed-off-by: Jiri Pirko <jpirko@re
team: add user_linkup and user_linkup_enabled per-port option
Allows userspace to setup linkup for ports. Default is to take linkup directly from ethtool state.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
14f066ba |
| 10-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add bool option type
Add another (hopefully last) option type. Use NLA_FLAG to implement that.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.ne
team: add bool option type
Add another (hopefully last) option type. Use NLA_FLAG to implement that.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
80f7c668 |
| 10-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add support for per-port options
This patch allows to create per-port options. That becomes handy for all sorts of stuff, for example for userspace driven link-state, 802.3ad implementation an
team: add support for per-port options
This patch allows to create per-port options. That becomes handy for all sorts of stuff, for example for userspace driven link-state, 802.3ad implementation and so on.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.4-rc2 |
|
#
2615598f |
| 04-Apr-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: add binary option type
For transfering generic binary data (e.g. BPF code), introduce new binary option type.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <dav
team: add binary option type
For transfering generic binary data (e.g. BPF code), introduce new binary option type.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
86ebb02d |
| 01-Apr-2012 |
David S. Miller <davem@davemloft.net> |
team: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
Revision tags: v3.4-rc1, v3.3, v3.3-rc7, v3.3-rc6, v3.3-rc5, v3.3-rc4 |
|
#
7ce5d222 |
| 15-Feb-2012 |
Danny Kukawka <danny.kukawka@bisect.de> |
net: use eth_hw_addr_random() and reset addr_assign_type
Use eth_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM.
Reset the state to NET
net: use eth_hw_addr_random() and reset addr_assign_type
Use eth_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM.
Reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address.
v2: adapt to renamed eth_hw_addr_random()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.3-rc3, v3.3-rc2 |
|
#
b82b9183 |
| 23-Jan-2012 |
Jiri Pirko <jpirko@redhat.com> |
team: send only changed options/ports via netlink
This patch changes event message behaviour to send only updated records instead of whole list. This fixes bug on which userspace receives non-actual
team: send only changed options/ports via netlink
This patch changes event message behaviour to send only updated records instead of whole list. This fixes bug on which userspace receives non-actual data in case multiple events occur in row.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.3-rc1, v3.2, v3.2-rc7, v3.2-rc6, v3.2-rc5 |
|
#
57459185 |
| 07-Dec-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: use vlan_vids_[addr/del]_by_dev
So far when vlan id was added to team device befor port was added, this vid was not added to port's vlan filter. Also after removal, vid stayed in port device's
team: use vlan_vids_[addr/del]_by_dev
So far when vlan id was added to team device befor port was added, this vid was not added to port's vlan filter. Also after removal, vid stayed in port device's vlan filter. Benefit of new vlan functions to handle this work.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
87002b03 |
| 07-Dec-2011 |
Jiri Pirko <jpirko@redhat.com> |
net: introduce vlan_vid_[add/del] and use them instead of direct [add/kill]_vid ndo calls
This patch adds wrapper for ndo_vlan_rx_add_vid/ndo_vlan_rx_kill_vid functions. Check for NETIF_F_HW_VLAN_FI
net: introduce vlan_vid_[add/del] and use them instead of direct [add/kill]_vid ndo calls
This patch adds wrapper for ndo_vlan_rx_add_vid/ndo_vlan_rx_kill_vid functions. Check for NETIF_F_HW_VLAN_FILTER feature is done in this wrapper.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8e586137 |
| 08-Dec-2011 |
Jiri Pirko <jpirko@redhat.com> |
net: make vlan ndo_vlan_rx_[add/kill]_vid return error value
Let caller know the result of adding/removing vlan id to/from vlan filter.
In some drivers I make those functions to just return 0. But
net: make vlan ndo_vlan_rx_[add/kill]_vid return error value
Let caller know the result of adding/removing vlan id to/from vlan filter.
In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.2-rc4, v3.2-rc3 |
|
#
f8a15af0 |
| 17-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: replace kmalloc+memcpy by kmemdup
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
2bba19ff |
| 16-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: avoid using variable-length array
Apparently using variable-length array is not correct (https://lkml.org/lkml/2011/10/23/25). So remove it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Sign
team: avoid using variable-length array
Apparently using variable-length array is not correct (https://lkml.org/lkml/2011/10/23/25). So remove it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
234a8fd4 |
| 16-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: add fix_features
do fix features in similar way as bonding code does
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
358b8382 |
| 16-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: replicate options on register
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
team: replicate options on register
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 <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
61dc3461 |
| 16-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: convert overall spinlock to mutex
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 Pir
team: convert overall spinlock to mutex
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 <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8c0713a5 |
| 16-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
team: Do not hold rcu_read_lock when running netlink cmds
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
Revision tags: v3.2-rc2 |
|
#
3d249d4c |
| 11-Nov-2011 |
Jiri Pirko <jpirko@redhat.com> |
net: introduce ethernet teaming device
This patch introduces new network device called team. It supposes to be very fast, simple, userspace-driven alternative to existing bonding driver.
Userspace
net: introduce ethernet teaming device
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.
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 <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
bcc83b43 |
| 25-Jan-2021 |
Ivan Vecera <ivecera@redhat.com> |
team: protect features update by RCU to avoid deadlock commit f0947d0d21b219e03940b9be6628a43445c0de7a upstream. Function __team_compute_features() is protected by team->lock mu
team: protect features update by RCU to avoid deadlock commit f0947d0d21b219e03940b9be6628a43445c0de7a upstream. Function __team_compute_features() is protected by team->lock mutex when it is called from team_compute_features() used when features of an underlying device is changed. This causes a deadlock when NETDEV_FEAT_CHANGE notifier for underlying device is fired due to change propagated from team driver (e.g. MTU change). It's because callbacks like team_change_mtu() or team_vlan_rx_{add,del}_vid() protect their port list traversal by team->lock mutex. Example (r8169 case where this driver disables TSO for certain MTU values): ... [ 6391.348202] __mutex_lock.isra.6+0x2d0/0x4a0 [ 6391.358602] team_device_event+0x9d/0x160 [team] [ 6391.363756] notifier_call_chain+0x47/0x70 [ 6391.368329] netdev_update_features+0x56/0x60 [ 6391.373207] rtl8169_change_mtu+0x14/0x50 [r8169] [ 6391.378457] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.387022] dev_set_mtu+0x52/0x90 [ 6391.390820] team_change_mtu+0x64/0xf0 [team] [ 6391.395683] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.399963] do_setlink+0x231/0xf50 ... In fact team_compute_features() called from team_device_event() does not need to be protected by team->lock mutex and rcu_read_lock() is sufficient there for port list traversal. Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Cc: Saeed Mahameed <saeed@kernel.org> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20210125074416.4056484-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|