<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/team, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-07-03T11:13:41Z</updated>
<entry>
<title>team: Always enable vlan tx offload</title>
<updated>2019-07-03T11:13:41Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-06-26T16:03:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a061216af44be711890d0153b4305553c98d9528'/>
<id>urn:sha1:a061216af44be711890d0153b4305553c98d9528</id>
<content type='text'>
[ Upstream commit ee4297420d56a0033a8593e80b33fcc93fda8509 ]

We should rather have vlan_tci filled all the way down
to the transmitting netdevice and let it do the hw/sw
vlan implementation.

Suggested-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: fix possible recursive locking when add slaves</title>
<updated>2019-04-19T21:57:35Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2019-04-19T06:31:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=925b0c841e066b488cc3a60272472b2c56300704'/>
<id>urn:sha1:925b0c841e066b488cc3a60272472b2c56300704</id>
<content type='text'>
If we add a bond device which is already the master of the team interface,
we will hold the team-&gt;lock in team_add_slave() first and then request the
lock in team_set_mac_address() again. The functions are called like:

- team_add_slave()
 - team_port_add()
   - team_port_enter()
     - team_modeop_port_enter()
       - __set_port_dev_addr()
         - dev_set_mac_address()
           - bond_set_mac_address()
             - dev_set_mac_address()
  	       - team_set_mac_address

Although team_upper_dev_link() would check the upper devices but it is
called too late. Fix it by adding a checking before processing the slave.

v2: Do not split the string in netdev_err()

Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>team: set slave to promisc if team is already in promisc mode</title>
<updated>2019-04-11T02:17:59Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2019-04-08T08:45:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=43c2adb9df7ddd6560fd3546d925b42cef92daa0'/>
<id>urn:sha1:43c2adb9df7ddd6560fd3546d925b42cef92daa0</id>
<content type='text'>
After adding a team interface to bridge, the team interface will enter
promisc mode. Then if we add a new slave to team0, the slave will keep
promisc off. Fix it by setting slave to promisc on if team master is
already in promisc mode, also do the same for allmulti.

v2: add promisc and allmulti checking when delete ports

Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>team: Free BPF filter when unregistering netdev</title>
<updated>2019-03-04T18:57:29Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2019-03-03T07:35:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=692c31bd4054212312396b1d303bffab2c5b93a7'/>
<id>urn:sha1:692c31bd4054212312396b1d303bffab2c5b93a7</id>
<content type='text'>
When team is used in loadbalance mode a BPF filter can be used to
provide a hash which will determine the Tx port.

When the netdev is later unregistered the filter is not freed which
results in memory leaks [1].

Fix by freeing the program and the corresponding filter when
unregistering the netdev.

[1]
unreferenced object 0xffff8881dbc47cc8 (size 16):
  comm "teamd", pid 3068, jiffies 4294997779 (age 438.247s)
  hex dump (first 16 bytes):
    a3 00 6b 6b 6b 6b 6b 6b 88 a5 82 e1 81 88 ff ff  ..kkkkkk........
  backtrace:
    [&lt;000000008a3b47e3&gt;] team_nl_cmd_options_set+0x88f/0x11b0
    [&lt;00000000c4f4f27e&gt;] genl_family_rcv_msg+0x78f/0x1080
    [&lt;00000000610ef838&gt;] genl_rcv_msg+0xca/0x170
    [&lt;00000000a281df93&gt;] netlink_rcv_skb+0x132/0x380
    [&lt;000000004d9448a2&gt;] genl_rcv+0x29/0x40
    [&lt;000000000321b2f4&gt;] netlink_unicast+0x4c0/0x690
    [&lt;000000008c25dffb&gt;] netlink_sendmsg+0x929/0xe10
    [&lt;00000000068298c5&gt;] sock_sendmsg+0xc8/0x110
    [&lt;0000000082a61ff0&gt;] ___sys_sendmsg+0x77a/0x8f0
    [&lt;00000000663ae29d&gt;] __sys_sendmsg+0xf7/0x250
    [&lt;0000000027c5f11a&gt;] do_syscall_64+0x14d/0x610
    [&lt;000000006cfbc8d3&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [&lt;00000000e23197e2&gt;] 0xffffffffffffffff
unreferenced object 0xffff8881e182a588 (size 2048):
  comm "teamd", pid 3068, jiffies 4294997780 (age 438.247s)
  hex dump (first 32 bytes):
    20 00 00 00 02 00 00 00 30 00 00 00 28 f0 ff ff   .......0...(...
    07 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00  ........(.......
  backtrace:
    [&lt;000000002daf01fb&gt;] lb_bpf_func_set+0x45c/0x6d0
    [&lt;000000008a3b47e3&gt;] team_nl_cmd_options_set+0x88f/0x11b0
    [&lt;00000000c4f4f27e&gt;] genl_family_rcv_msg+0x78f/0x1080
    [&lt;00000000610ef838&gt;] genl_rcv_msg+0xca/0x170
    [&lt;00000000a281df93&gt;] netlink_rcv_skb+0x132/0x380
    [&lt;000000004d9448a2&gt;] genl_rcv+0x29/0x40
    [&lt;000000000321b2f4&gt;] netlink_unicast+0x4c0/0x690
    [&lt;000000008c25dffb&gt;] netlink_sendmsg+0x929/0xe10
    [&lt;00000000068298c5&gt;] sock_sendmsg+0xc8/0x110
    [&lt;0000000082a61ff0&gt;] ___sys_sendmsg+0x77a/0x8f0
    [&lt;00000000663ae29d&gt;] __sys_sendmsg+0xf7/0x250
    [&lt;0000000027c5f11a&gt;] do_syscall_64+0x14d/0x610
    [&lt;000000006cfbc8d3&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [&lt;00000000e23197e2&gt;] 0xffffffffffffffff

Fixes: 01d7f30a9f96 ("team: add loadbalance mode")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reported-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Remove switchdev.h inclusion from team/bond/vlan</title>
<updated>2019-02-25T01:40:46Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2019-02-22T20:31:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=47f706262f1d53aff4c67a4e74fbb051d60a7526'/>
<id>urn:sha1:47f706262f1d53aff4c67a4e74fbb051d60a7526</id>
<content type='text'>
This is no longer necessary after eca59f691566 ("net: Remove support for bridge bypass ndos from stacked devices")

Suggested-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>team: use operstate consistently for linkup</title>
<updated>2019-02-22T19:40:23Z</updated>
<author>
<name>George Wilkie</name>
<email>gwilkie@vyatta.att-mail.com</email>
</author>
<published>2019-02-20T08:19:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8c7a77267eec81dd81af8412f29e50c0b1082548'/>
<id>urn:sha1:8c7a77267eec81dd81af8412f29e50c0b1082548</id>
<content type='text'>
When a port is added to a team, its initial state is derived
from netif_carrier_ok rather than netif_oper_up.
If it is carrier up but operationally down at the time of being
added, the port state.linkup will be set prematurely.
port state.linkup should be set consistently using
netif_oper_up rather than netif_carrier_ok.

Fixes: f1d22a1e0595 ("team: account for oper state")
Signed-off-by: George Wilkie &lt;gwilkie@vyatta.att-mail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>team: avoid complex list operations in team_nl_cmd_options_set()</title>
<updated>2019-02-12T19:19:27Z</updated>
<author>
<name>Cong Wang</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2019-02-12T05:59:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2fdeee2549231b1f989f011bb18191f5660d3745'/>
<id>urn:sha1:2fdeee2549231b1f989f011bb18191f5660d3745</id>
<content type='text'>
The current opt_inst_list operations inside team_nl_cmd_options_set()
is too complex to track:

    LIST_HEAD(opt_inst_list);
    nla_for_each_nested(...) {
        list_for_each_entry(opt_inst, &amp;team-&gt;option_inst_list, list) {
            if (__team_option_inst_tmp_find(&amp;opt_inst_list, opt_inst))
                continue;
            list_add(&amp;opt_inst-&gt;tmp_list, &amp;opt_inst_list);
        }
    }
    team_nl_send_event_options_get(team, &amp;opt_inst_list);

as while we retrieve 'opt_inst' from team-&gt;option_inst_list, it could
be added to the local 'opt_inst_list' for multiple times. The
__team_option_inst_tmp_find() doesn't work, as the setter
team_mode_option_set() still calls team-&gt;ops.exit() which uses
-&gt;tmp_list too in __team_options_change_check().

Simplify the list operations by moving the 'opt_inst_list' and
team_nl_send_event_options_get() into the nla_for_each_nested() loop so
that it can be guranteed that we won't insert a same list entry for
multiple times. Therefore, __team_option_inst_tmp_find() can be removed
too.

Fixes: 4fb0534fb7bb ("team: avoid adding twice the same option to the event list")
Fixes: 2fcdb2c9e659 ("team: allow to send multiple set events in one message")
Reported-by: syzbot+4d4af685432dc0e56c91@syzkaller.appspotmail.com
Reported-by: syzbot+68ee510075cf64260cc4@syzkaller.appspotmail.com
Cc: Jiri Pirko &lt;jiri@resnulli.us&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dev: Add extack argument to dev_set_mac_address()</title>
<updated>2018-12-14T02:41:38Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-12-13T11:54:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3a37a9636cf3a1af2621a33f7eef8a2a3da81030'/>
<id>urn:sha1:3a37a9636cf3a1af2621a33f7eef8a2a3da81030</id>
<content type='text'>
A follow-up patch will add a notifier type NETDEV_PRE_CHANGEADDR, which
allows vetoing of MAC address changes. One prominent path to that
notification is through dev_set_mac_address(). Therefore give this
function an extack argument, so that it can be packed together with the
notification. Thus a textual reason for rejection (or a warning) can be
communicated back to the user.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: core: dev: Add extack argument to dev_open()</title>
<updated>2018-12-06T21:26:06Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-12-06T17:05:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=00f54e68924eaf075f3f24be18557899d347bc4a'/>
<id>urn:sha1:00f54e68924eaf075f3f24be18557899d347bc4a</id>
<content type='text'>
In order to pass extack together with NETDEV_PRE_UP notifications, it's
necessary to route the extack to __dev_open() from diverse (possibly
indirect) callers. One prominent API through which the notification is
invoked is dev_open().

Therefore extend dev_open() with and extra extack argument and update
all users. Most of the calls end up just encoding NULL, but bond and
team drivers have the extack readily available.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>team: no need to do team_notify_peers or team_mcast_rejoin when disabling port</title>
<updated>2018-11-24T01:18:15Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2018-11-22T08:15:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ed9dc99107144f83b6c1bb52a69b58875baf540'/>
<id>urn:sha1:5ed9dc99107144f83b6c1bb52a69b58875baf540</id>
<content type='text'>
team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin()
will send multicast join group message to notify peers. We should do this when
enabling/changed to a new port. But it doesn't make sense to do it when a port
is disabled.

On the other hand, when we set mcast_rejoin_count to 2, and do a failover,
team_port_disable() will increase mcast_rejoin.count_pending to 2 and then
team_port_enable() will increase mcast_rejoin.count_pending to 4. We will send
4 mcast rejoin messages at latest, which will make user confused. The same
with notify_peers.count.

Fix it by deleting team_notify_peers() and team_mcast_rejoin() in
team_port_disable().

Reported-by: Liang Li &lt;liali@redhat.com&gt;
Fixes: fc423ff00df3a ("team: add peer notification")
Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
