<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/ipvlan/ipvlan.h, branch v4.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-09-19T05:25:22Z</updated>
<entry>
<title>ipvlan: Introduce l3s mode</title>
<updated>2016-09-19T05:25:22Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2016-09-16T19:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5'/>
<id>urn:sha1:4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5</id>
<content type='text'>
In a typical IPvlan L3 setup where master is in default-ns and
each slave is into different (slave) ns. In this setup egress
packet processing for traffic originating from slave-ns will
hit all NF_HOOKs in slave-ns as well as default-ns. However same
is not true for ingress processing. All these NF_HOOKs are
hit only in the slave-ns skipping them in the default-ns.
IPvlan in L3 mode is restrictive and if admins want to deploy
iptables rules in default-ns, this asymmetric data path makes it
impossible to do so.

This patch makes use of the l3_rcv() (added as part of l3mdev
enhancements) to perform input route lookup on RX packets without
changing the skb-&gt;dev and then uses nf_hook at NF_INET_LOCAL_IN
to change the skb-&gt;dev just before handing over skb to L4.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
CC: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Reviewed-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: misc changes</title>
<updated>2016-02-22T03:43:24Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2016-02-21T03:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab5b7013db3cc637a8f19e00d71310e40db75bf6'/>
<id>urn:sha1:ab5b7013db3cc637a8f19e00d71310e40db75bf6</id>
<content type='text'>
1. scope correction for few functions that are used in single file.
2. Adjust variables that are used in fast-path to fit into single cacheline
3. Update rcv_frame() to skip shared check for frames coming over wire

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: mode is u16</title>
<updated>2016-02-22T03:43:24Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2016-02-21T03:31:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e93fbc5a15ff25d4f9fd92a13c33cd37d99a2340'/>
<id>urn:sha1:e93fbc5a15ff25d4f9fd92a13c33cd37d99a2340</id>
<content type='text'>
The mode argument was erronusly defined as u32 but it has always
been u16. Also use ipvlan_set_mode() helper to set the mode instead
of assigning directly. This should avoid future erronus assignments /
updates.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: use rcu_deference_bh() in ipvlan_queue_xmit()</title>
<updated>2015-07-16T04:33:40Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2015-07-14T13:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0fba37a3af03a7e74bf9e75473729adb98da49c3'/>
<id>urn:sha1:0fba37a3af03a7e74bf9e75473729adb98da49c3</id>
<content type='text'>
In tx path rcu_read_lock_bh() is held, so we need rcu_deference_bh().
This fixes the following warning:

 ===============================
 [ INFO: suspicious RCU usage. ]
 4.1.0-rc1+ #1007 Not tainted
 -------------------------------
 drivers/net/ipvlan/ipvlan.h:106 suspicious rcu_dereference_check() usage!

 other info that might help us debug this:

 rcu_scheduler_active = 1, debug_locks = 0
 1 lock held by dhclient/1076:
  #0:  (rcu_read_lock_bh){......}, at: [&lt;ffffffff817e8d84&gt;] rcu_lock_acquire+0x0/0x26

 stack backtrace:
 CPU: 2 PID: 1076 Comm: dhclient Not tainted 4.1.0-rc1+ #1007
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
  0000000000000001 ffff8800d381bac8 ffffffff81a4154f 000000003c1a3c19
  ffff8800d4d0a690 ffff8800d381baf8 ffffffff810b849f ffff880117d41148
  ffff880117d40000 ffff880117d40068 0000000000000156 ffff8800d381bb18
 Call Trace:
  [&lt;ffffffff81a4154f&gt;] dump_stack+0x4c/0x65
  [&lt;ffffffff810b849f&gt;] lockdep_rcu_suspicious+0x107/0x110
  [&lt;ffffffff8165a522&gt;] ipvlan_port_get_rcu+0x47/0x4e
  [&lt;ffffffff8165ad14&gt;] ipvlan_queue_xmit+0x35/0x450
  [&lt;ffffffff817ea45d&gt;] ? rcu_read_unlock+0x3e/0x5f
  [&lt;ffffffff810a20bf&gt;] ? local_clock+0x19/0x22
  [&lt;ffffffff810b4781&gt;] ? __lock_is_held+0x39/0x52
  [&lt;ffffffff8165b64c&gt;] ipvlan_start_xmit+0x1b/0x44
  [&lt;ffffffff817edf7f&gt;] dev_hard_start_xmit+0x2ae/0x467
  [&lt;ffffffff817ee642&gt;] __dev_queue_xmit+0x50a/0x60c
  [&lt;ffffffff817ee7a7&gt;] dev_queue_xmit_sk+0x13/0x15
  [&lt;ffffffff81997596&gt;] dev_queue_xmit+0x10/0x12
  [&lt;ffffffff8199b41c&gt;] packet_sendmsg+0xb6b/0xbdf
  [&lt;ffffffff810b5ea7&gt;] ? mark_lock+0x2e/0x226
  [&lt;ffffffff810a1fcc&gt;] ? sched_clock_cpu+0x9e/0xb7
  [&lt;ffffffff817d56f9&gt;] sock_sendmsg_nosec+0x12/0x1d
  [&lt;ffffffff817d7257&gt;] sock_sendmsg+0x29/0x2e
  [&lt;ffffffff817d72cc&gt;] sock_write_iter+0x70/0x91
  [&lt;ffffffff81199563&gt;] __vfs_write+0x7e/0xa7
  [&lt;ffffffff811996bc&gt;] vfs_write+0x92/0xe8
  [&lt;ffffffff811997d7&gt;] SyS_write+0x47/0x7e
  [&lt;ffffffff81a4d517&gt;] system_call_fastpath+0x12/0x6f

Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.")
Cc: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Acked-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: unhash addresses without synchronize_rcu</title>
<updated>2015-07-16T04:33:39Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>khlebnikov@yandex-team.ru</email>
</author>
<published>2015-07-14T13:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6640e673c6f3dbaace085ca2686a8a343dc23a71'/>
<id>urn:sha1:6640e673c6f3dbaace085ca2686a8a343dc23a71</id>
<content type='text'>
All structures used in traffic forwarding are rcu-protected:
ipvl_addr, ipvl_dev and ipvl_port. Thus we can unhash addresses
without synchronization. We'll anyway hash it back into the same
bucket: in worst case lockless lookup will scan hash once again.

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: remove counters of ipv4 and ipv6 addresses</title>
<updated>2015-07-16T04:33:39Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>khlebnikov@yandex-team.ru</email>
</author>
<published>2015-07-14T13:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=515866f8185b92fb18a782408c53839f003c7669'/>
<id>urn:sha1:515866f8185b92fb18a782408c53839f003c7669</id>
<content type='text'>
They are unused after commit f631c44bbe15 ("ipvlan: Always set broadcast bit in
multicast filter").

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: Defer multicast / broadcast processing to a work-queue</title>
<updated>2015-05-05T23:29:49Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2015-05-05T00:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba35f8588f474d5bf8988615b04ee722a2684fd2'/>
<id>urn:sha1:ba35f8588f474d5bf8988615b04ee722a2684fd2</id>
<content type='text'>
Processing multicast / broadcast in fast path is performance draining
and having more links means more cloning and bringing performance
down further.

Broadcast; in particular, need to be given to all the virtual links.
Earlier tricks of enabling broadcast bit for IPv4 only interfaces are not
really working since it fails autoconf. Which means enabling broadcast
for all the links if protocol specific hacks do not have to be added into
the driver.

This patch defers all (incoming as well as outgoing) multicast traffic to
a work-queue leaving only the unicast traffic in the fast-path. Now if we
need to apply any additional tricks to further reduce the impact of this
(multicast / broadcast) type of traffic, it can be implemented while
processing this work without affecting the fast-path.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: fix check for IP addresses in control path</title>
<updated>2015-03-31T17:28:33Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2015-03-28T18:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9997c2938b23d792528da1597b3aea9b0f2a324'/>
<id>urn:sha1:e9997c2938b23d792528da1597b3aea9b0f2a324</id>
<content type='text'>
When an ipvlan interface is down, its addresses are not on the hash list.
Fix checks for existence of addresses not to depend on the hash list, walk
through all interface addresses instead.

Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Acked-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipvlan: add a missing __percpu pcpu_stats</title>
<updated>2015-02-12T04:03:23Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-02-12T03:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6aa6395ff320abe242e05766ae201f23e7978a94'/>
<id>urn:sha1:6aa6395ff320abe242e05766ae201f23e7978a94</id>
<content type='text'>
Cosmetic patch to add __percpu qualifier to pcpu_stats

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>ipvlan: move the device check function into netdevice.h</title>
<updated>2014-12-09T21:10:06Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2014-12-06T23:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5933fea7aa7237ba52d67c069c39ad5c3ab7a036'/>
<id>urn:sha1:5933fea7aa7237ba52d67c069c39ad5c3ab7a036</id>
<content type='text'>
Move the port check [ipvlan_dev_master()] and device check
[ipvlan_dev_slave()] functions to netdevice.h and rename them
netif_is_ipvlan_port() and netif_is_ipvlan() resp. to be
consistent with macvlan api naming.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
