<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/dev.c, branch v4.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-04-26T18:47:14Z</updated>
<entry>
<title>net: core: Prevent from dereferencing null pointer when releasing SKB</title>
<updated>2017-04-26T18:47:14Z</updated>
<author>
<name>Myungho Jung</name>
<email>mhjungk@gmail.com</email>
</author>
<published>2017-04-25T18:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9899886d5e8ec5b343b1efe44f185a0e68dc6454'/>
<id>urn:sha1:9899886d5e8ec5b343b1efe44f185a0e68dc6454</id>
<content type='text'>
Added NULL check to make __dev_kfree_skb_irq consistent with kfree
family of functions.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289

Signed-off-by: Myungho Jung &lt;mhjungk@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: xdp: don't export dev_change_xdp_fd()</title>
<updated>2017-04-12T14:29:40Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2017-04-12T07:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df7dd8fc965c665e83b71a649378cdf200ff36df'/>
<id>urn:sha1:df7dd8fc965c665e83b71a649378cdf200ff36df</id>
<content type='text'>
Since dev_change_xdp_fd() is only used in rtnetlink, which must
be built-in, there's no reason to export dev_change_xdp_fd().

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Resend IGMP memberships upon peer notification.</title>
<updated>2017-03-14T18:33:44Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2017-03-14T12:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37c343b4f4e70e9dc328ab04903c0ec8d154c1a4'/>
<id>urn:sha1:37c343b4f4e70e9dc328ab04903c0ec8d154c1a4</id>
<content type='text'>
When we notify peers of potential changes,  it's also good to update
IGMP memberships.  For example, during VM migration, updating IGMP
memberships will redirect existing multicast streams to the VM at the
new location.

Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: net_enable_timestamp() can be called from irq contexts</title>
<updated>2017-03-02T04:55:57Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-03-01T22:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13baa00ad01bb3a9f893e3a08cbc2d072fc0c15d'/>
<id>urn:sha1:13baa00ad01bb3a9f893e3a08cbc2d072fc0c15d</id>
<content type='text'>
It is now very clear that silly TCP listeners might play with
enabling/disabling timestamping while new children are added
to their accept queue.

Meaning net_enable_timestamp() can be called from BH context
while current state of the static key is not enabled.

Lets play safe and allow all contexts.

The work queue is scheduled only under the problematic cases,
which are the static key enable/disable transition, to not slow down
critical paths.

This extends and improves what we did in commit 5fa8bbda38c6 ("net: use
a work queue to defer net_disable_timestamp() work")

Fixes: b90e5794c5bd ("net: dont call jump_label_dec from irq context")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: solve a NAPI race</title>
<updated>2017-03-01T17:50:58Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-02-28T18:34:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=39e6c8208d7b6fb9d2047850fb3327db567b564b'/>
<id>urn:sha1:39e6c8208d7b6fb9d2047850fb3327db567b564b</id>
<content type='text'>
While playing with mlx4 hardware timestamping of RX packets, I found
that some packets were received by TCP stack with a ~200 ms delay...

Since the timestamp was provided by the NIC, and my probe was added
in tcp_v4_rcv() while in BH handler, I was confident it was not
a sender issue, or a drop in the network.

This would happen with a very low probability, but hurting RPC
workloads.

A NAPI driver normally arms the IRQ after the napi_complete_done(),
after NAPI_STATE_SCHED is cleared, so that the hard irq handler can grab
it.

Problem is that if another point in the stack grabs NAPI_STATE_SCHED bit
while IRQ are not disabled, we might have later an IRQ firing and
finding this bit set, right before napi_complete_done() clears it.

This can happen with busy polling users, or if gro_flush_timeout is
used. But some other uses of napi_schedule() in drivers can cause this
as well.

thread 1                                 thread 2 (could be on same cpu, or not)

// busy polling or napi_watchdog()
napi_schedule();
...
napi-&gt;poll()

device polling:
read 2 packets from ring buffer
                                          Additional 3rd packet is
available.
                                          device hard irq

                                          // does nothing because
NAPI_STATE_SCHED bit is owned by thread 1
                                          napi_schedule();

napi_complete_done(napi, 2);
rearm_irq();

Note that rearm_irq() will not force the device to send an additional
IRQ for the packet it already signaled (3rd packet in my example)

This patch adds a new NAPI_STATE_MISSED bit, that napi_schedule_prep()
can set if it could not grab NAPI_STATE_SCHED

Then napi_complete_done() properly reschedules the napi to make sure
we do not miss something.

Since we manipulate multiple bits at once, use cmpxchg() like in
sk_busy_loop() to provide proper transactions.

In v2, I changed napi_watchdog() to use a relaxed variant of
napi_schedule_prep() : No need to set NAPI_STATE_MISSED from this point.

In v3, I added more details in the changelog and clears
NAPI_STATE_MISSED in busy_poll_stop()

In v4, I added the ideas given by Alexander Duyck in v3 review

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: napi_watchdog() can use napi_schedule_irqoff()</title>
<updated>2017-02-21T18:28:01Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-02-21T16:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=559c59b238ebb7d39b732b6b08a59693b972e75c'/>
<id>urn:sha1:559c59b238ebb7d39b732b6b08a59693b972e75c</id>
<content type='text'>
hrtimer handlers run with masked hard IRQ, we can therefore
use napi_schedule_irqoff()

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next</title>
<updated>2017-02-17T02:25:49Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-02-17T02:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99d5ceeea5120dd3ac2f879f4083697b70a1c89f'/>
<id>urn:sha1:99d5ceeea5120dd3ac2f879f4083697b70a1c89f</id>
<content type='text'>
Steffen Klassert says:

====================
pull request (net-next): ipsec-next 2017-02-16

1) Make struct xfrm_input_afinfo const, nothing writes to it.
   From Florian Westphal.

2) Remove all places that write to the afinfo policy backend
   and make the struct const then.
   From Florian Westphal.

3) Prepare for packet consuming gro callbacks and add
   ESP GRO handlers. ESP packets can be decapsulated
   at the GRO layer then. It saves a round through
   the stack for each ESP packet.

Please note that this has a merge coflict between commit

63fca65d0863 ("net: add confirm_neigh method to dst_ops")

from net-next and

3d7d25a68ea5 ("xfrm: policy: remove garbage_collect callback")
a2817d8b279b ("xfrm: policy: remove family field")

from ipsec-next.

The conflict can be solved as it is done in linux-next.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Prepare gro for packet consuming gro callbacks</title>
<updated>2017-02-15T08:39:44Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2017-02-15T08:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25393d3fc055b76587fcc91627aee8c345400c3a'/>
<id>urn:sha1:25393d3fc055b76587fcc91627aee8c345400c3a</id>
<content type='text'>
The upcomming IPsec ESP gro callbacks will consume the skb,
so prepare for that.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: busy-poll: remove LL_FLUSH_FAILED and LL_FLUSH_BUSY</title>
<updated>2017-02-14T03:23:39Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-02-10T13:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37fabbf4d489cc2e1cbf7cde816d9453a65ddfb7'/>
<id>urn:sha1:37fabbf4d489cc2e1cbf7cde816d9453a65ddfb7</id>
<content type='text'>
Commit 79e7fff47b7b ("net: remove support for per driver
ndo_busy_poll()") made them obsolete.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix checkpatch, Missing a blank line after declarations</title>
<updated>2017-02-10T18:37:49Z</updated>
<author>
<name>tcharding</name>
<email>me@tobin.cc</email>
</author>
<published>2017-02-09T06:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4563a75fb93d6a756416d97e13f0773ac373a24'/>
<id>urn:sha1:f4563a75fb93d6a756416d97e13f0773ac373a24</id>
<content type='text'>
This patch fixes multiple occurrences of checkpatch WARNING: Missing
a blank line after declarations.

Signed-off-by: Tobin C. Harding &lt;me@tobin.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
