aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-08-24team: do not allow to add VLAN challenged port when vlan is usedJiri Pirko1-0/+7
Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-24team: don't print warn message on -ESRCH during event sendJiri Pirko1-4/+4
When no one is listening on NL socket, -ESRCH is returned and warning message is printed. This message is confusing people and in fact has no meaning. So do not print it in this case. Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-7/+9
2012-08-20team: add support for non-ethernet devicesJiri Pirko4-32/+77
This is resolved by two things: 1) allow dev_addr of different length than ETH_ALEN 2) during port add, check for dev->type and change it if necessary Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-14netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup()Amerigo Wang1-7/+9
slave_enable_netpoll() and __netpoll_setup() may be called with read_lock() held, so should use GFP_ATOMIC to allocate memory. Eric suggested to pass gfp flags to __netpoll_setup(). Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-03team: add support for queue override by setting queue_id for portJiri Pirko1-2/+161
Similar to what bonding has. This allows to set queue_id for port so this port will be used when skb with matching skb->queue_mapping is going to be transmitted. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-03team: add per port priority optionJiri Pirko1-0/+25
Allow userspace to set port priority. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-03team: add signed 32-bit team option typeJiri Pirko1-0/+12
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-24team: init error value to 0 in team_netpoll_setup()Jiri Pirko1-1/+1
This will ensure correct value is returned in case the port list is empty. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-20team: add multiqueue supportJiri Pirko1-5/+60
Largely copied from bonding code. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18team: refine IFF_XMIT_DST_RELEASE capabilityJiri Pirko1-0/+5
Cloned patch of Eric Dumazet for bonding. Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability on output net device, avoiding dirtying dst refcount. team currently disables IFF_XMIT_DST_RELEASE unconditionally. If all ports have the IFF_XMIT_DST_RELEASE bit set, then team dev can also have it in its priv_flags. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-17team: add netpoll supportJiri Pirko5-10/+119
It's done in very similar way this is done in bonding and bridge. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12team: make team_port_enabled() and team_port_txable() static inlineJiri Pirko1-12/+0
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12team: add broadcast modeJiri Pirko3-1/+101
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-12team: use function team_port_txable() for determing enabled and up portJiri Pirko2-3/+9
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-30team: use IFF_LIVE_ADDR_CHANGE priv_flagJiri Pirko1-4/+5
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-28net: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new()Thomas Graf1-4/+4
Using NLMSG_GOODSIZE results in multiple pages being used as nlmsg_new() will automatically add the size of the netlink header to the payload thus exceeding the page limit. NLMSG_DEFAULT_SIZE takes this into account. Signed-off-by: Thomas Graf <tgraf@suug.ch> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-26team: do not allow to map disabled portsJiri Pirko2-4/+4
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-26team: fix team_adjust_ops with regard to enabled portsJiri Pirko1-11/+19
team_adjust_ops should check for enabled ports, not all ports. This may lead to division by zero. This patch fixes this. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-20team: do RCU update path fixupsJiri Pirko2-6/+16
Use rcu_access_pointer and rcu_dereference_protected to access RCU pointer by updater. Use RCU_INIT_POINTER for NULL assignment of RCU pointer. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-20team: Revert previous two changes.David S. Miller2-11/+6
I didn't notice that these were superceded by a more uptodate version of the changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-20team: use RCU_INIT_POINTER for NULL assignment of RCU pointerJiri Pirko1-1/+1
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-20team: use rcu_access_pointer to access RCU pointer by writerJiri Pirko2-5/+10
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: use rcu_dereference_bh() in tx pathJiri Pirko2-4/+4
Should be used instead of rcu_dereference, since rcu_read_lock_bh is held. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: allow to send multiple set events in one messageJiri Pirko1-24/+9
When multiple sets are done, event message is generated for each. This patch accumulates these messages into one. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: ensure correct order of netlink messages deliveryJiri Pirko1-20/+5
currently, when port is created and per-port options are present, there options are sent to userspace with ifindex of port which userspace does not know about. Port add message goes right after. This patch corrects message ordering so userspace would not be confused. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: implement multipart netlink messages for options transfersJiri Pirko1-82/+116
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: lb: introduce infrastructure for userspace driven tx loadbalancingJiri Pirko1-17/+500
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: add port_[enabled/disabled] mode callbacksJiri Pirko1-0/+4
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: pass NULL to __team_option_inst_add() instead of 0Jiri Pirko1-1/+1
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: allow to specify one option instance to be send to userspaceJiri Pirko1-86/+124
No need to walk through option instance list and look for ->changed == true when called knows exactly what one option instance changed. Also use lists to pass option instances needed to be present in netlink message. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: fix error path in team_nl_fill_port_list_get()Jiri Pirko1-1/+1
genlmsg_cancel() needs to be called in case nest fails Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: fix error path in team_nl_fill_options_get()Jiri Pirko1-1/+1
genlmsg_cancel() needs to be called in case nest fails Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: allow async option changesJiri Pirko1-0/+18
This patch adds two exported functions. One allows to mark option instance as changed and the second processes change check and does transfer of changed options to userspace. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: push array_index and port into separate structureJiri Pirko1-25/+43
Introduce struct team_option_inst_info and push option instance info there. It can be then easily passed to gsetter context and used for feature async option changes. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: comments: s/net\/drivers\/team/drivers\/net\/team/Jiri Pirko3-3/+3
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: introduce array optionsJiri Pirko1-23/+52
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: allow read/write-only optionsJiri Pirko1-0/+4
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: lb: push hash counting into separate functionJiri Pirko1-7/+16
Also squash hash into one byte Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: add mode priv to portJiri Pirko1-1/+2
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-19team: for nomode use dummy struct team_modeJiri Pirko1-8/+21
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>
2012-06-19team: make team_mode struct constJiri Pirko4-20/+41
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21team: add per-port option for enabling/disabling portsJiri Pirko1-0/+24
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21team: allow to enable/disable portsJiri Pirko3-18/+37
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>
2012-04-21team: lb: let userspace care about port macsJiri Pirko1-12/+0
Better to leave this for userspace Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11team: add missed "statics"Jiri Pirko3-5/+5
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11team: ab: walk through port list non-rcuJiri Pirko1-1/+1
Since team->lock is being held, _rcu variant make no sense. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11team: add user_linkup and user_linkup_enabled per-port optionJiri Pirko1-9/+63
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>
2012-04-11team: add bool option typeJiri Pirko1-11/+29
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>
2012-04-11team: add support for per-port optionsJiri Pirko3-87/+261
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>