<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/drivers/net/macvlan.c, branch linux-2.6.32.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2014-11-23T09:55:42+00:00</updated>
<entry>
<title>macvlan: Initialize vlan_features to turn on offload support.</title>
<updated>2014-11-23T09:55:42+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2014-07-31T14:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b5b640efe723b0087f71b56a055e8d559b82c8cb'/>
<id>urn:sha1:b5b640efe723b0087f71b56a055e8d559b82c8cb</id>
<content type='text'>
[ Upstream commit 081e83a78db9b0ae1f5eabc2dedecc865f509b98 ]

Macvlan devices do not initialize vlan_features.  As a result,
any vlan devices configured on top of macvlans perform very poorly.
Initialize vlan_features based on the vlan features of the lower-level
device.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>macvlan: fix gso_max_size setting</title>
<updated>2009-11-23T22:18:53+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2009-11-23T22:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=8c2acc53fd7987493f11640e266cf7130591e764'/>
<id>urn:sha1:8c2acc53fd7987493f11640e266cf7130591e764</id>
<content type='text'>
gso_max_size must be set based on the value of the underlying device to
support devices not using the full 64k.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: add multiqueue capability</title>
<updated>2009-09-04T03:02:13+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-09-03T00:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=2c11455321f37da6fe6cc36353149f9ac9183334'/>
<id>urn:sha1:2c11455321f37da6fe6cc36353149f9ac9183334</id>
<content type='text'>
macvlan devices are currently not multi-queue capable.

We can do that defining rtnl_link_ops method,
get_tx_queues(), called from rtnl_create_link()

This new method gets num_tx_queues/real_num_tx_queues
from lower device.

macvlan_get_tx_queues() is a copy of vlan_get_tx_queues().

Because macvlan_start_xmit() has to update netdev_queue
stats only (and not dev-&gt;stats), I chose to change
tx_errors/tx_aborted_errors accounting to tx_dropped,
since netdev_queue structure doesnt define tx_errors /
tx_aborted_errors.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: Use compare_ether_addr_64bits()</title>
<updated>2009-09-02T00:40:25+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-09-01T05:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ac06713d55d450cbc9ef871b1b238409238f0fe0'/>
<id>urn:sha1:ac06713d55d450cbc9ef871b1b238409238f0fe0</id>
<content type='text'>
To speedup ether addresses compares, we can use compare_ether_addr_64bits()
(all operands are guaranteed to be at least 8 bytes long)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdev: convert pseudo drivers to netdev_tx_t</title>
<updated>2009-09-01T08:13:40+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2009-08-31T19:50:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=424efe9caf6047ffbcd6b383ff4d2347254aabf1'/>
<id>urn:sha1:424efe9caf6047ffbcd6b383ff4d2347254aabf1</id>
<content type='text'>
These are all drivers that don't touch real hardware.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers/net/macvlan.c: fix cloning of tagged VLAN interfaces</title>
<updated>2009-06-11T09:32:39+00:00</updated>
<author>
<name>sg.tweak@gmail.com</name>
<email>sg.tweak@gmail.com</email>
</author>
<published>2009-06-10T09:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ef5c89967d50042b29937fb724e057c1aa3c5207'/>
<id>urn:sha1:ef5c89967d50042b29937fb724e057c1aa3c5207</id>
<content type='text'>
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13348

akpm: the reporter disappeared, so I typed it in again.

It is not possible to make clone of tagged VLAN interface to be used as
mac-based vlan interfave.

How reproducible:
Use any 802.1q tagged vlan interface, e.g. eth2.700 and clone it:

  ip link add link eth2.700 address 00:04:75:cb:38:09 macvlan0 type macvlan
  ip link set dev macvlan0 up
  ip addr add 10.195.1.1/24 dev macvlan0

So far, so good. Now try to ping anything via macvlan0:

  ping 10.195.1.2

Actual results:
For every attempted packet tx kernel writes to console:

------------[ cut here ]------------
WARNING: at net/8021q/vlan_dev.c:254 vlan_dev_hard_header+0x36/0x126 [8021q]()
Hardware name: M22ES
Modules linked in: arptable_filter arp_tables bridge veth macvlan arc4 ecb
ppp_mppe ppp_async crc_ccitt ppp_generic slhc autofs4 sunrpc 8021q garp stp
ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp
x_tables dm_mirror dm_region_hash dm_log dm_multipath dm_mod sbs sbshc lp
floppy snd_intel8x0 joydev snd_seq_dummy snd_intel8x0m snd_ac97_codec
ide_cd_mod ac97_bus snd_seq_oss cdrom snd_seq_midi_event serio_raw snd_seq
snd_seq_device snd_pcm_oss snd_mixer_oss parport_pc snd_pcm parport battery
8139cp snd_timer i2c_sis96x ac button snd rtc_cmos rtc_core 8139too soundcore
rtc_lib mii i2c_core pcspkr snd_page_alloc pata_sis libata sd_mod scsi_mod ext3
jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded: ip_tables]
Pid: 0, comm: swapper Tainted: G        W  2.6.29.3 #1
Call Trace:
 [&lt;c0425f48&gt;] warn_slowpath+0x60/0x9f
 [&lt;c0425f6f&gt;] warn_slowpath+0x87/0x9f
 [&lt;dffb850d&gt;] vlan_dev_hard_header+0x0/0x126 [8021q]
 [&lt;dffb8543&gt;] vlan_dev_hard_header+0x36/0x126 [8021q]
 [&lt;dffb850d&gt;] vlan_dev_hard_header+0x0/0x126 [8021q]
 [&lt;df83155d&gt;] macvlan_hard_header+0x3c/0x47 [macvlan]
 [&lt;df831521&gt;] macvlan_hard_header+0x0/0x47 [macvlan]
 [&lt;c062bf3f&gt;] arp_create+0xef/0x1ff
 [&lt;c062c08c&gt;] arp_send+0x3d/0x54
 [&lt;c062c916&gt;] arp_solicit+0x16c/0x177
 [&lt;c05fadd2&gt;] neigh_timer_handler+0x227/0x269
 [&lt;c05fabab&gt;] neigh_timer_handler+0x0/0x269
 [&lt;c042ce4d&gt;] run_timer_softirq+0xf0/0x141
 [&lt;c0429e5a&gt;] __do_softirq+0x76/0xf8
 [&lt;c0429de4&gt;] __do_softirq+0x0/0xf8
 &lt;IRQ&gt;  [&lt;c044fb67&gt;] handle_level_irq+0x0/0xad
 [&lt;c0429db7&gt;] irq_exit+0x35/0x62
 [&lt;c04046bb&gt;] do_IRQ+0xdf/0xf4
 [&lt;c04035a7&gt;] common_interrupt+0x27/0x2c
 [&lt;c04079c5&gt;] default_idle+0x2a/0x3d
 [&lt;c0401bb6&gt;] cpu_idle+0x57/0x70

Macvlan driver always uses standard ethernet header length for all types
of interface to which it is linked.  This patch fixes this problem.

Reported-by: &lt;sg.tweak@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: convert unicast addr list</title>
<updated>2009-05-30T05:12:32+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2009-05-22T23:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ccffad25b5136958d4769ed6de5e87992dd9c65c'/>
<id>urn:sha1:ccffad25b5136958d4769ed6de5e87992dd9c65c</id>
<content type='text'>
This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr. It also relaxes the
locking. Original spinlock (still used for multicast addresses) is not
needed and is no longer used for a protection of this list. All
reading and writing takes place under rtnl (with no changes).

I also removed a possibility to specify the length of the address
while adding or deleting unicast address. It's always dev-&gt;addr_len.

The convertion touched especially e1000 and ixgbe codes when the
change is not so trivial.

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;

 drivers/net/bnx2.c               |   13 +--
 drivers/net/e1000/e1000_main.c   |   24 +++--
 drivers/net/ixgbe/ixgbe_common.c |   14 ++--
 drivers/net/ixgbe/ixgbe_common.h |    4 +-
 drivers/net/ixgbe/ixgbe_main.c   |    6 +-
 drivers/net/ixgbe/ixgbe_type.h   |    4 +-
 drivers/net/macvlan.c            |   11 +-
 drivers/net/mv643xx_eth.c        |   11 +-
 drivers/net/niu.c                |    7 +-
 drivers/net/virtio_net.c         |    7 +-
 drivers/s390/net/qeth_l2_main.c  |    6 +-
 drivers/scsi/fcoe/fcoe.c         |   16 ++--
 include/linux/netdevice.h        |   18 ++--
 net/8021q/vlan.c                 |    4 +-
 net/8021q/vlan_dev.c             |   10 +-
 net/core/dev.c                   |  195 +++++++++++++++++++++++++++-----------
 net/dsa/slave.c                  |   10 +-
 net/packet/af_packet.c           |    4 +-
 18 files changed, 227 insertions(+), 137 deletions(-)
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: release dst entry in dev_hard_start_xmit()</title>
<updated>2009-05-19T05:19:19+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-05-19T05:19:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=93f154b594fe47e4a7e5358b309add449a046cd3'/>
<id>urn:sha1:93f154b594fe47e4a7e5358b309add449a046cd3</id>
<content type='text'>
One point of contention in high network loads is the dst_release() performed
when a transmited skb is freed. This is because NIC tx completion calls
dev_kree_skb() long after original call to dev_queue_xmit(skb).

CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is
quite visible if one CPU is 100% handling softirqs for a network device,
since dst_clone() is done by other cpus, involving cache line ping pongs.

It seems right place to release dst is in dev_hard_start_xmit(), for most
devices but ones that are virtual, and some exceptions.

David Miller suggested to define a new device flag, set in alloc_netdev_mq()
(so that most devices set it at init time), and carefuly unset in devices
which dont want a NULL skb-&gt;dst in their ndo_start_xmit().

List of devices that must clear this flag is :

- loopback device, because it calls netif_rx() and quoting Patrick :
    "ip_route_input() doesn't accept loopback addresses, so loopback packets
     already need to have a dst_entry attached."
- appletalk/ipddp.c : needs skb-&gt;dst in its xmit function

- And all devices that call again dev_queue_xmit() from their xmit function
(as some classifiers need skb-&gt;dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: factor out ethtool invocation of vlan/macvlan drivers</title>
<updated>2009-04-21T09:00:51+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2009-04-20T04:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b1b67dd45a6b629eb41553856805aaa1614fbb83'/>
<id>urn:sha1:b1b67dd45a6b629eb41553856805aaa1614fbb83</id>
<content type='text'>
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vlan/macvlan: fix NULL pointer dereferences in ethtool handlers</title>
<updated>2009-04-17T22:59:23+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2009-04-17T22:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=7816a0a862d851d0b05710e7d94bfe390f3180e2'/>
<id>urn:sha1:7816a0a862d851d0b05710e7d94bfe390f3180e2</id>
<content type='text'>
Check whether the underlying device provides a set of ethtool ops before
checking for individual handlers to avoid NULL pointer dereferences.

Reported-by: Art van Breemen &lt;ard@telegraafnet.nl&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
