<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-16T01:02:08Z</updated>
<entry>
<title>bpf: do not use reciprocal divide</title>
<updated>2014-01-16T01:02:08Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-01-15T14:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aee636c4809fa54848ff07a899b326eb1f9987a2'/>
<id>urn:sha1:aee636c4809fa54848ff07a899b326eb1f9987a2</id>
<content type='text'>
At first Jakub Zawadzki noticed that some divisions by reciprocal_divide
were not correct. (off by one in some cases)
http://www.wireshark.org/~darkjames/reciprocal-buggy.c

He could also show this with BPF:
http://www.wireshark.org/~darkjames/set-and-dump-filter-k-bug.c

The reciprocal divide in linux kernel is not generic enough,
lets remove its use in BPF, as it is not worth the pain with
current cpus.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Jakub Zawadzki &lt;darkjames-ws@darkjames.pl&gt;
Cc: Mircea Gherzan &lt;mgherzan@gmail.com&gt;
Cc: Daniel Borkmann &lt;dxchgb@gmail.com&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Matt Evans &lt;matt@ozlabs.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: core: explicitly select a txq before doing l2 forwarding</title>
<updated>2014-01-10T18:23:08Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2014-01-10T08:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f663dd9aaf9ed124f25f0f8452edf238f087ad50'/>
<id>urn:sha1:f663dd9aaf9ed124f25f0f8452edf238f087ad50</id>
<content type='text'>
Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
will cause several issues:

- NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
  instead of lower device which misses the necessary txq synchronization for
  lower device such as txq stopping or frozen required by dev watchdog or
  control path.
- dev_hard_start_xmit() was called with NULL txq which bypasses the net device
  watchdog.
- dev_hard_start_xmit() does not check txq everywhere which will lead a crash
  when tso is disabled for lower device.

Fix this by explicitly introducing a new param for .ndo_select_queue() for just
selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
forwarding transmission.

With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
dev_queue_xmit() to do the transmission.

In the future, it was also required for macvtap l2 forwarding support since it
provides a necessary synchronization method.

Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: e1000-devel@lists.sourceforge.net
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netpoll: Fix missing TXQ unlock and and OOPS.</title>
<updated>2014-01-03T00:50:52Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-01-03T00:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aca5f58f9ba803ec8c2e6bcf890db17589e8dfcc'/>
<id>urn:sha1:aca5f58f9ba803ec8c2e6bcf890db17589e8dfcc</id>
<content type='text'>
The VLAN tag handling code in netpoll_send_skb_on_dev() has two problems.

1) It exits without unlocking the TXQ.

2) It then tries to queue a NULL skb to npinfo-&gt;txq.

Reported-by: Ahmed Tamrawi &lt;atamrawi@iastate.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vlan: Fix header ops passthru when doing TX VLAN offload.</title>
<updated>2013-12-31T21:23:35Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2013-12-31T21:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2205369a314e12fcec4781cc73ac9c08fc2b47de'/>
<id>urn:sha1:2205369a314e12fcec4781cc73ac9c08fc2b47de</id>
<content type='text'>
When the vlan code detects that the real device can do TX VLAN offloads
in hardware, it tries to arrange for the real device's header_ops to
be invoked directly.

But it does so illegally, by simply hooking the real device's
header_ops up to the VLAN device.

This doesn't work because we will end up invoking a set of header_ops
routines which expect a device type which matches the real device, but
will see a VLAN device instead.

Fix this by providing a pass-thru set of header_ops which will arrange
to pass the proper real device instead.

To facilitate this add a dev_rebuild_header().  There are
implementations which provide a -&gt;cache and -&gt;create but not a
-&gt;rebuild (f.e. PLIP).  So we need a helper function just like
dev_hard_header() to avoid crashes.

Use this helper in the one existing place where the
header_ops-&gt;rebuild was being invoked, the neighbour code.

With lots of help from Florian Westphal.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: allow netdev_all_upper_get_next_dev_rcu with rtnl lock held</title>
<updated>2013-12-18T05:19:08Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2013-11-26T06:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=85328240c625f322af9f69c7b60e619717101d77'/>
<id>urn:sha1:85328240c625f322af9f69c7b60e619717101d77</id>
<content type='text'>
It is useful to be able to walk all upper devices when bringing
a device online where the RTNL lock is held. In this case it
is safe to walk the all_adj_list because the RTNL lock is used
to protect the write side as well.

This patch adds a check to see if the rtnl lock is held before
throwing a warning in netdev_all_upper_get_next_dev_rcu().

Also because we now have a call site for lockdep_rtnl_is_held()
outside COFIG_LOCK_PROVING an inline definition returning 1 is
needed. Similar to the rcu_read_lock_is_held().

Fixes: 2a47fa45d4df ("ixgbe: enable l2 forwarding acceleration for macvlans")
CC: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Reported-by: Yuanhan Liu &lt;yuanhan.liu@linux.intel.com&gt;
Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Tested-by: Phil Schmitt &lt;phillip.j.schmitt@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>neigh: Netlink notification for administrative NUD state change</title>
<updated>2013-12-17T21:14:35Z</updated>
<author>
<name>Bob Gilligan</name>
<email>gilligan@aristanetworks.com</email>
</author>
<published>2013-12-15T21:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53385d2d1de84f4036a0919ec46964c4e81b83f5'/>
<id>urn:sha1:53385d2d1de84f4036a0919ec46964c4e81b83f5</id>
<content type='text'>
The neighbour code sends up an RTM_NEWNEIGH netlink notification if
the NUD state of a neighbour cache entry is changed by a timer (e.g.
from REACHABLE to STALE), even if the lladdr of the entry has not
changed.

But an administrative change to the the NUD state of a neighbour cache
entry that does not change the lladdr (e.g. via "ip -4 neigh change
...  nud ...") does not trigger a netlink notification.  This means
that netlink listeners will not hear about administrative NUD state
changes such as from a resolved state to PERMANENT.

This patch changes the neighbor code to generate an RTM_NEWNEIGH
message when the NUD state of an entry is changed administratively.

Signed-off-by: Bob Gilligan &lt;gilligan@aristanetworks.com&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: unix: allow set_peek_off to fail</title>
<updated>2013-12-11T02:45:15Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2013-12-07T22:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12663bfc97c8b3fdb292428105dd92d563164050'/>
<id>urn:sha1:12663bfc97c8b3fdb292428105dd92d563164050</id>
<content type='text'>
unix_dgram_recvmsg() will hold the readlock of the socket until recv
is complete.

In the same time, we may try to setsockopt(SO_PEEK_OFF) which will hang until
unix_dgram_recvmsg() will complete (which can take a while) without allowing
us to break out of it, triggering a hung task spew.

Instead, allow set_peek_off to fail, this way userspace will not hang.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: drop_monitor: fix the value of maxattr</title>
<updated>2013-12-10T02:10:38Z</updated>
<author>
<name>Changli Gao</name>
<email>xiaosuo@gmail.com</email>
</author>
<published>2013-12-08T14:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d323e92cc3f4edd943610557c9ea1bb4bb5056e8'/>
<id>urn:sha1:d323e92cc3f4edd943610557c9ea1bb4bb5056e8</id>
<content type='text'>
maxattr in genl_family should be used to save the max attribute
type, but not the max command type. Drop monitor doesn't support
any attributes, so we should leave it as zero.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: clear local_df when passing skb between namespaces</title>
<updated>2013-12-06T04:42:38Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-12-05T22:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=239c78db9c41a8f524cce60507440d72229d73bc'/>
<id>urn:sha1:239c78db9c41a8f524cce60507440d72229d73bc</id>
<content type='text'>
We must clear local_df when passing the skb between namespaces as the
packet is not local to the new namespace any more and thus may not get
fragmented by local rules. Fred Templin noticed that other namespaces
do fragment IPv6 packets while forwarding. Instead they should have send
back a PTB.

The same problem should be present when forwarding DF-IPv4 packets
between namespaces.

Reported-by: Templin, Fred L &lt;Fred.L.Templin@boeing.com&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>{pktgen, xfrm} Update IPv4 header total len and checksum after tranformation</title>
<updated>2013-12-02T01:33:52Z</updated>
<author>
<name>fan.du</name>
<email>fan.du@windriver.com</email>
</author>
<published>2013-12-01T08:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3868204d6b89ea373a273e760609cb08020beb1a'/>
<id>urn:sha1:3868204d6b89ea373a273e760609cb08020beb1a</id>
<content type='text'>
commit a553e4a6317b2cfc7659542c10fe43184ffe53da ("[PKTGEN]: IPSEC support")
tried to support IPsec ESP transport transformation for pktgen, but acctually
this doesn't work at all for two reasons(The orignal transformed packet has
bad IPv4 checksum value, as well as wrong auth value, reported by wireshark)

- After transpormation, IPv4 header total length needs update,
  because encrypted payload's length is NOT same as that of plain text.

- After transformation, IPv4 checksum needs re-caculate because of payload
  has been changed.

With this patch, armmed pktgen with below cofiguration, Wireshark is able to
decrypted ESP packet generated by pktgen without any IPv4 checksum error or
auth value error.

pgset "flag IPSEC"
pgset "flows 1"

Signed-off-by: Fan Du &lt;fan.du@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
