<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/8021q, branch v4.4-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>vlan: Do not put vlan headers back on bridge and macvlan ports</title>
<updated>2015-11-17T19:38:35+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2015-11-16T20:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=28f9ee22bcdd84726dbf6267d0b58f254166b900'/>
<id>28f9ee22bcdd84726dbf6267d0b58f254166b900</id>
<content type='text'>
When a vlan is configured with REORDER_HEADER set to 0, the vlan
header is put back into the packet and makes it appear that
the vlan header is still there even after it's been processed.
This posses a problem for bridge and macvlan ports.  The packets
passed to those device may be forwarded and at the time of the
forward, vlan headers end up being unexpectedly present.

With the patch, we make sure that we do not put the vlan header
back (when REORDER_HEADER is 0) if a bridge or macvlan has
been configured on top of the vlan device.

Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a vlan is configured with REORDER_HEADER set to 0, the vlan
header is put back into the packet and makes it appear that
the vlan header is still there even after it's been processed.
This posses a problem for bridge and macvlan ports.  The packets
passed to those device may be forwarded and at the time of the
forward, vlan headers end up being unexpectedly present.

With the patch, we make sure that we do not put the vlan header
back (when REORDER_HEADER is 0) if a bridge or macvlan has
been configured on top of the vlan device.

Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vlan: Invoke driver vlan hooks only if device is present</title>
<updated>2015-11-03T16:29:56+00:00</updated>
<author>
<name>Padmanabh Ratnakar</name>
<email>padmanabh.ratnakar@avagotech.com</email>
</author>
<published>2015-11-03T14:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74f2d19caff885bc656e9acf2a6e727b66ab0ed1'/>
<id>74f2d19caff885bc656e9acf2a6e727b66ab0ed1</id>
<content type='text'>
NIC drivers mark device as detached during error recovery.
It expects no manangement hooks to be invoked in this state.
Invoke driver vlan hooks only if device is present.

Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NIC drivers mark device as detached during error recovery.
It expects no manangement hooks to be invoked in this state.
Invoke driver vlan hooks only if device is present.

Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: 8021q: convert to using IFF_NO_QUEUE</title>
<updated>2015-08-18T18:55:06+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2015-08-18T08:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e659c0551c99c9712724d96acd3d9271587265c'/>
<id>2e659c0551c99c9712724d96acd3d9271587265c</id>
<content type='text'>
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vlan: Add GRO support for non hardware accelerated vlan</title>
<updated>2015-06-01T23:50:52+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2015-06-01T12:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66e5133f19e901a044fa5eaeeb6ecff4545839e5'/>
<id>66e5133f19e901a044fa5eaeeb6ecff4545839e5</id>
<content type='text'>
Currently packets with non-hardware-accelerated vlan cannot be handled
by GRO. This causes low performance for 802.1ad and stacked vlan, as their
vlan tags are currently not stripped by hardware.

This patch adds GRO support for non-hardware-accelerated vlan and
improves receive performance of them.

Test Environment:
 vlan device (.1Q) on vlan device (.1ad) on ixgbe (82599)

Result:

- Before

$ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    60.00    5233.17

Rx side CPU usage:
  %usr      %sys      %irq     %soft     %idle
  0.27     58.03      0.00     41.70      0.00

- After

$ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    60.00    7586.85

Rx side CPU usage:
  %usr      %sys      %irq     %soft     %idle
  0.50     25.83      0.00     59.53     14.14

[ Register VLAN offloads with priority 10 -DaveM ]

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently packets with non-hardware-accelerated vlan cannot be handled
by GRO. This causes low performance for 802.1ad and stacked vlan, as their
vlan tags are currently not stripped by hardware.

This patch adds GRO support for non-hardware-accelerated vlan and
improves receive performance of them.

Test Environment:
 vlan device (.1Q) on vlan device (.1ad) on ixgbe (82599)

Result:

- Before

$ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    60.00    5233.17

Rx side CPU usage:
  %usr      %sys      %irq     %soft     %idle
  0.27     58.03      0.00     41.70      0.00

- After

$ netperf -t TCP_STREAM -H 192.168.20.2 -l 60
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    60.00    7586.85

Rx side CPU usage:
  %usr      %sys      %irq     %soft     %idle
  0.50     25.83      0.00     59.53     14.14

[ Register VLAN offloads with priority 10 -DaveM ]

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vlan: Correctly propagate promisc|allmulti flags in notifier.</title>
<updated>2015-05-14T04:54:32+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2015-05-13T00:53:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be346ffaad9bc354075fba5cd009fc4519abdd64'/>
<id>be346ffaad9bc354075fba5cd009fc4519abdd64</id>
<content type='text'>
Currently vlan notifier handler will try to update all vlans
for a device when that device comes up.  A problem occurs,
however, when the vlan device was set to promiscuous, but not
by the user (ex: a bridge).  In that case, dev-&gt;gflags are
not updated.  What results is that the lower device ends
up with an extra promiscuity count.  Here are the
backtraces that prove this:
[62852.052179]  [&lt;ffffffff814fe248&gt;] __dev_set_promiscuity+0x38/0x1e0
[62852.052186]  [&lt;ffffffff8160bcbb&gt;] ? _raw_spin_unlock_bh+0x1b/0x40
[62852.052188]  [&lt;ffffffff814fe4be&gt;] ? dev_set_rx_mode+0x2e/0x40
[62852.052190]  [&lt;ffffffff814fe694&gt;] dev_set_promiscuity+0x24/0x50
[62852.052194]  [&lt;ffffffffa0324795&gt;] vlan_dev_open+0xd5/0x1f0 [8021q]
[62852.052196]  [&lt;ffffffff814fe58f&gt;] __dev_open+0xbf/0x140
[62852.052198]  [&lt;ffffffff814fe88d&gt;] __dev_change_flags+0x9d/0x170
[62852.052200]  [&lt;ffffffff814fe989&gt;] dev_change_flags+0x29/0x60

The above comes from the setting the vlan device to IFF_UP state.

[62852.053569]  [&lt;ffffffff814fe248&gt;] __dev_set_promiscuity+0x38/0x1e0
[62852.053571]  [&lt;ffffffffa032459b&gt;] ? vlan_dev_set_rx_mode+0x2b/0x30
[8021q]
[62852.053573]  [&lt;ffffffff814fe8d5&gt;] __dev_change_flags+0xe5/0x170
[62852.053645]  [&lt;ffffffff814fe989&gt;] dev_change_flags+0x29/0x60
[62852.053647]  [&lt;ffffffffa032334a&gt;] vlan_device_event+0x18a/0x690
[8021q]
[62852.053649]  [&lt;ffffffff8161036c&gt;] notifier_call_chain+0x4c/0x70
[62852.053651]  [&lt;ffffffff8109d456&gt;] raw_notifier_call_chain+0x16/0x20
[62852.053653]  [&lt;ffffffff814f744d&gt;] call_netdevice_notifiers+0x2d/0x60
[62852.053654]  [&lt;ffffffff814fe1a3&gt;] __dev_notify_flags+0x33/0xa0
[62852.053656]  [&lt;ffffffff814fe9b2&gt;] dev_change_flags+0x52/0x60
[62852.053657]  [&lt;ffffffff8150cd57&gt;] do_setlink+0x397/0xa40

And this one comes from the notification code.  What we end
up with is a vlan with promiscuity count of 1 and and a physical
device with a promiscuity count of 2.  They should both have
a count 1.

To resolve this issue, vlan code can use dev_get_flags() api
which correctly masks promiscuity and allmulti flags.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently vlan notifier handler will try to update all vlans
for a device when that device comes up.  A problem occurs,
however, when the vlan device was set to promiscuous, but not
by the user (ex: a bridge).  In that case, dev-&gt;gflags are
not updated.  What results is that the lower device ends
up with an extra promiscuity count.  Here are the
backtraces that prove this:
[62852.052179]  [&lt;ffffffff814fe248&gt;] __dev_set_promiscuity+0x38/0x1e0
[62852.052186]  [&lt;ffffffff8160bcbb&gt;] ? _raw_spin_unlock_bh+0x1b/0x40
[62852.052188]  [&lt;ffffffff814fe4be&gt;] ? dev_set_rx_mode+0x2e/0x40
[62852.052190]  [&lt;ffffffff814fe694&gt;] dev_set_promiscuity+0x24/0x50
[62852.052194]  [&lt;ffffffffa0324795&gt;] vlan_dev_open+0xd5/0x1f0 [8021q]
[62852.052196]  [&lt;ffffffff814fe58f&gt;] __dev_open+0xbf/0x140
[62852.052198]  [&lt;ffffffff814fe88d&gt;] __dev_change_flags+0x9d/0x170
[62852.052200]  [&lt;ffffffff814fe989&gt;] dev_change_flags+0x29/0x60

The above comes from the setting the vlan device to IFF_UP state.

[62852.053569]  [&lt;ffffffff814fe248&gt;] __dev_set_promiscuity+0x38/0x1e0
[62852.053571]  [&lt;ffffffffa032459b&gt;] ? vlan_dev_set_rx_mode+0x2b/0x30
[8021q]
[62852.053573]  [&lt;ffffffff814fe8d5&gt;] __dev_change_flags+0xe5/0x170
[62852.053645]  [&lt;ffffffff814fe989&gt;] dev_change_flags+0x29/0x60
[62852.053647]  [&lt;ffffffffa032334a&gt;] vlan_device_event+0x18a/0x690
[8021q]
[62852.053649]  [&lt;ffffffff8161036c&gt;] notifier_call_chain+0x4c/0x70
[62852.053651]  [&lt;ffffffff8109d456&gt;] raw_notifier_call_chain+0x16/0x20
[62852.053653]  [&lt;ffffffff814f744d&gt;] call_netdevice_notifiers+0x2d/0x60
[62852.053654]  [&lt;ffffffff814fe1a3&gt;] __dev_notify_flags+0x33/0xa0
[62852.053656]  [&lt;ffffffff814fe9b2&gt;] dev_change_flags+0x52/0x60
[62852.053657]  [&lt;ffffffff8150cd57&gt;] do_setlink+0x397/0xa40

And this one comes from the notification code.  What we end
up with is a vlan with promiscuity count of 1 and and a physical
device with a promiscuity count of 2.  They should both have
a count 1.

To resolve this issue, vlan code can use dev_get_flags() api
which correctly masks promiscuity and allmulti flags.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vlan: implement ndo_get_iflink</title>
<updated>2015-04-02T18:05:00+00:00</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-02T15:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2dbf6b5058ace6b12e0674b07d59d47177741ae7'/>
<id>2dbf6b5058ace6b12e0674b07d59d47177741ae7</id>
<content type='text'>
Don't use dev-&gt;iflink anymore.

CC: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't use dev-&gt;iflink anymore.

CC: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vlan: Add features for stacked vlan device</title>
<updated>2015-03-29T20:33:21+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2015-03-27T05:31:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d463504c191c2126d097ac94fb258aabe6d3e62'/>
<id>8d463504c191c2126d097ac94fb258aabe6d3e62</id>
<content type='text'>
Stacked vlan devices curretly have few features (GRO, HIGHDMA, LLTX).
Since we have software fallbacks in case the NIC can not handle some
features for multiple vlans, we can add the same features as the lower
vlan devices for stacked vlan devices.

This allows stacked vlan devices to create large (GSO) packets and not to
segment packets. Those packets will be segmented by software on the real
device, or even can be segmented by the NIC once TSO for multiple vlans
becomes enabled by the following patches.

The exception is those related to FCoE, which does not have a software
fallback.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stacked vlan devices curretly have few features (GRO, HIGHDMA, LLTX).
Since we have software fallbacks in case the NIC can not handle some
features for multiple vlans, we can add the same features as the lower
vlan devices for stacked vlan devices.

This allows stacked vlan devices to create large (GSO) packets and not to
segment packets. Those packets will be segmented by software on the real
device, or even can be segmented by the NIC once TSO for multiple vlans
becomes enabled by the following patches.

The exception is those related to FCoE, which does not have a software
fallback.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix high overhead of vlan sub-device teardown.</title>
<updated>2015-03-19T02:52:56+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-03-19T02:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=99c4a26a159b28fa46a3e746a9b41b297e73d261'/>
<id>99c4a26a159b28fa46a3e746a9b41b297e73d261</id>
<content type='text'>
When a networking device is taken down that has a non-trivial number
of VLAN devices configured under it, we eat a full synchronize_net()
for every such VLAN device.

This is because of the call chain:

	NETDEV_DOWN notifier
	--&gt; vlan_device_event()
		--&gt; dev_change_flags()
		--&gt; __dev_change_flags()
		--&gt; __dev_close()
		--&gt; __dev_close_many()
		--&gt; dev_deactivate_many()
			--&gt; synchronize_net()

This is kind of rediculous because we already have infrastructure for
batching doing operation X to a list of net devices so that we only
incur one sync.

So make use of that by exporting dev_close_many() and adjusting it's
interfaace so that the caller can fully manage the batch list.  Use
this in vlan_device_event() and all the overhead goes away.

Reported-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a networking device is taken down that has a non-trivial number
of VLAN devices configured under it, we eat a full synchronize_net()
for every such VLAN device.

This is because of the call chain:

	NETDEV_DOWN notifier
	--&gt; vlan_device_event()
		--&gt; dev_change_flags()
		--&gt; __dev_change_flags()
		--&gt; __dev_close()
		--&gt; __dev_close_many()
		--&gt; dev_deactivate_many()
			--&gt; synchronize_net()

This is kind of rediculous because we already have infrastructure for
batching doing operation X to a list of net devices so that we only
incur one sync.

So make use of that by exporting dev_close_many() and adjusting it's
interfaace so that the caller can fully manage the batch list.  Use
this in vlan_device_event() and all the overhead goes away.

Reported-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>8021q: Use eth_&lt;foo&gt;_addr instead of memset</title>
<updated>2015-03-03T22:01:37+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-03-03T03:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=423049ab1e93cfcffff7de6ff40e68edede8fdf5'/>
<id>423049ab1e93cfcffff7de6ff40e68edede8fdf5</id>
<content type='text'>
Use the built-in function instead of memset.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the built-in function instead of memset.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Kill dev_rebuild_header</title>
<updated>2015-03-02T21:43:41+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-03-02T06:11:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d476059e77d1af48453a58f9de1e36f2eaff6450'/>
<id>d476059e77d1af48453a58f9de1e36f2eaff6450</id>
<content type='text'>
Now that there are no more users kill dev_rebuild_header and all of it's
implementations.

This is long overdue.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that there are no more users kill dev_rebuild_header and all of it's
implementations.

This is long overdue.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
