<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/dev.c, branch v4.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-09-04T18:41:12Z</updated>
<entry>
<title>bonding: Fix bonding crash</title>
<updated>2016-09-04T18:41:12Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2016-09-02T05:18:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24b27fc4cdf9e10c5e79e5923b6b7c2c5c95096c'/>
<id>urn:sha1:24b27fc4cdf9e10c5e79e5923b6b7c2c5c95096c</id>
<content type='text'>
Following few steps will crash kernel -

  (a) Create bonding master
      &gt; modprobe bonding miimon=50
  (b) Create macvlan bridge on eth2
      &gt; ip link add link eth2 dev mvl0 address aa:0:0:0:0:01 \
	   type macvlan
  (c) Now try adding eth2 into the bond
      &gt; echo +eth2 &gt; /sys/class/net/bond0/bonding/slaves
      &lt;crash&gt;

Bonding does lots of things before checking if the device enslaved is
busy or not.

In this case when the notifier call-chain sends notifications, the
bond_netdev_event() assumes that the rx_handler /rx_handler_data is
registered while the bond_enslave() hasn't progressed far enough to
register rx_handler for the new slave.

This patch adds a rx_handler check that can be performed right at the
beginning of the enslave code to avoid getting into this situation.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: remove type_check from dev_get_nest_level()</title>
<updated>2016-08-13T22:15:54Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2016-08-12T14:10:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=952fcfd08c8109951622579d0ae7b9cd6cafd688'/>
<id>urn:sha1:952fcfd08c8109951622579d0ae7b9cd6cafd688</id>
<content type='text'>
The idea for type_check in dev_get_nest_level() was to count the number
of nested devices of the same type (currently, only macvlan or vlan
devices).
This prevented the false positive lockdep warning on configurations such
as:

eth0 &lt;--- macvlan0 &lt;--- vlan0 &lt;--- macvlan1

However, this doesn't prevent a warning on a configuration such as:

eth0 &lt;--- macvlan0 &lt;--- vlan0
eth1 &lt;--- vlan1 &lt;--- macvlan1

In this case, all the locks end up with a nesting subclass of 1, so
lockdep thinks that there is still a deadlock:

- in the first case we have (macvlan_netdev_addr_lock_key, 1) and then
  take (vlan_netdev_xmit_lock_key, 1)
- in the second case, we have (vlan_netdev_xmit_lock_key, 1) and then
  take (macvlan_netdev_addr_lock_key, 1)

By removing the linktype check in dev_get_nest_level() and always
incrementing the nesting depth, lockdep considers this configuration
valid.

Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'salted-string-hash'</title>
<updated>2016-07-28T19:26:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-07-28T19:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=554828ee0db41618d101d9549db8808af9fd9d65'/>
<id>urn:sha1:554828ee0db41618d101d9549db8808af9fd9d65</id>
<content type='text'>
This changes the vfs dentry hashing to mix in the parent pointer at the
_beginning_ of the hash, rather than at the end.

That actually improves both the hash and the code generation, because we
can move more of the computation to the "static" part of the dcache
setup, and do less at lookup runtime.

It turns out that a lot of other hash users also really wanted to mix in
a base pointer as a 'salt' for the hash, and so the slightly extended
interface ends up working well for other cases too.

Users that want a string hash that is purely about the string pass in a
'salt' pointer of NULL.

* merge branch 'salted-string-hash':
  fs/dcache.c: Save one 32-bit multiply in dcache lookup
  vfs: make the string hashes salt the hash
</content>
</entry>
<entry>
<title>net: add ndo to setup/query xdp prog in adapter rx</title>
<updated>2016-07-20T04:46:31Z</updated>
<author>
<name>Brenden Blanco</name>
<email>bblanco@plumgrid.com</email>
</author>
<published>2016-07-19T19:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7862b45849fe2f8610a2bec89235580f55d337f'/>
<id>urn:sha1:a7862b45849fe2f8610a2bec89235580f55d337f</id>
<content type='text'>
Add one new netdev op for drivers implementing the BPF_PROG_TYPE_XDP
filter. The single op is used for both setup/query of the xdp program,
modelled after ndo_setup_tc.

Signed-off-by: Brenden Blanco &lt;bblanco@plumgrid.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tracepoint napi:napi_poll add work and budget</title>
<updated>2016-07-09T22:05:02Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2016-07-07T16:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b'/>
<id>urn:sha1:1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b</id>
<content type='text'>
An important information for the napi_poll tracepoint is knowing
the work done (packets processed) by the napi_poll() call. Add
both the work done and budget, as they are related.

Handle trace_napi_poll() param change in dropwatch/drop_monitor
and in python perf script netdev-times.py in backward compat way,
as python fortunately supports optional parameter handling.

Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: introduce default neigh_construct/destroy ndo calls for L2 upper devices</title>
<updated>2016-07-05T16:06:28Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2016-07-05T09:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18bfb924f0005a728caadd90ba755b2a660bf441'/>
<id>urn:sha1:18bfb924f0005a728caadd90ba755b2a660bf441</id>
<content type='text'>
L2 upper device needs to propagate neigh_construct/destroy calls down to
lower devices. Do this by defining default ndo functions and use them in
team, bond, bridge and vlan.

Signed-off-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>mlxsw: spectrum: Add couple of lower device helper functions</title>
<updated>2016-07-05T01:25:15Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2016-07-04T06:23:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ce856aaaf13a5dc969ac5f998e5daaf1abe4cd2'/>
<id>urn:sha1:7ce856aaaf13a5dc969ac5f998e5daaf1abe4cd2</id>
<content type='text'>
Add functions that iterate over lower devices and find port device.
As a dependency add netdev_for_each_all_lower_dev and
netdev_for_each_all_lower_dev_rcu macro with
netdev_all_lower_get_next and netdev_all_lower_get_next_rcu shelpers.

Also, add functions to return mlxsw struct according to lower device
found and mlxsw_port struct with a reference to lower device.

Signed-off-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_sched: drop packets after root qdisc lock is released</title>
<updated>2016-06-25T16:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-22T06:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=520ac30f45519b0a82dd92117c181d1d6144677b'/>
<id>urn:sha1:520ac30f45519b0a82dd92117c181d1d6144677b</id>
<content type='text'>
Qdisc performance suffers when packets are dropped at enqueue()
time because drops (kfree_skb()) are done while qdisc lock is held,
delaying a dequeue() draining the queue.

Nominal throughput can be reduced by 50 % when this happens,
at a time we would like the dequeue() to proceed as fast as possible.

Even FQ is vulnerable to this problem, while one of FQ goals was
to provide some flow isolation.

This patch adds a 'struct sk_buff **to_free' parameter to all
qdisc-&gt;enqueue(), and in qdisc_drop() helper.

I measured a performance increase of up to 12 %, but this patch
is a prereq so that future batches in enqueue() can fly.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: the space is required after ','</title>
<updated>2016-06-17T00:41:23Z</updated>
<author>
<name>Wei Tang</name>
<email>tangwei@cmss.chinamobile.com</email>
</author>
<published>2016-06-16T13:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be4da0e340ed2a17b1a55cbe81d6bc251710ff72'/>
<id>urn:sha1:be4da0e340ed2a17b1a55cbe81d6bc251710ff72</id>
<content type='text'>
The space is missing after ',', and this will introduce much more
noise when checking patch around.

Signed-off-by: Wei Tang &lt;tangwei@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: do not initialise statics to 0</title>
<updated>2016-06-17T00:41:22Z</updated>
<author>
<name>Wei Tang</name>
<email>tangwei@cmss.chinamobile.com</email>
</author>
<published>2016-06-16T13:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84d15ae57d9478efc755306fee5ee562e0fa40e5'/>
<id>urn:sha1:84d15ae57d9478efc755306fee5ee562e0fa40e5</id>
<content type='text'>
This patch fixes the checkpatch.pl error to dev.c:

ERROR: do not initialise statics to 0

Signed-off-by: Wei Tang &lt;tangwei@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
