17 Jan, 2021

1 commit

  • [ Upstream commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad ]

    VLAN checks for NETREG_UNINITIALIZED to distinguish between
    registration failure and unregistration in progress.

    Since commit cb626bf566eb ("net-sysfs: Fix reference count leak")
    registration failure may, however, result in NETREG_UNREGISTERED
    as well as NETREG_UNINITIALIZED.

    This fix is similer to cebb69754f37 ("rtnetlink: Fix
    memory(net_device) leak when ->newlink fails")

    Fixes: cb626bf566eb ("net-sysfs: Fix reference count leak")
    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Jakub Kicinski
     

28 Sep, 2020

1 commit

  • After commit d0186842ec5f ("net: vlan: Avoid using BUG() in
    vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed
    integer, however one of its called: vlan_group_prealloc_vid() was still
    using an unsigned integer for its return value, fix that.

    Fixes: d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()")
    Reported-by: kernel test robot
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

26 Sep, 2020

1 commit

  • While we should always make sure that we specify a valid VLAN protocol
    to vlan_proto_idx(), killing the machine when an invalid value is
    specified is too harsh and not helpful for debugging. All callers are
    capable of dealing with an error returned by vlan_proto_idx() so check
    the index value and propagate it accordingly.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

25 Oct, 2019

1 commit

  • This patch removes variables and callback these are related to the nested
    device structure.
    devices that can be nested have their own nest_level variable that
    represents the depth of nested devices.
    In the previous patch, new {lower/upper}_level variables are added and
    they replace old private nest_level variable.
    So, this patch removes all 'nest_level' variables.

    In order to avoid lockdep warning, ->ndo_get_lock_subclass() was added
    to get lockdep subclass value, which is actually lower nested depth value.
    But now, they use the dynamic lockdep key to avoid lockdep warning instead
    of the subclass.
    So, this patch removes ->ndo_get_lock_subclass() callback.

    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Apr, 2019

1 commit


07 Dec, 2018

1 commit

  • In order to pass extack together with NETDEV_PRE_UP notifications, it's
    necessary to route the extack to __dev_open() from diverse (possibly
    indirect) callers. One prominent API through which the notification is
    invoked is dev_change_flags().

    Therefore extend dev_change_flags() with and extra extack argument and
    update all users. Most of the calls end up just encoding NULL, but
    several sites (VLAN, ipvlan, VRF, rtnetlink) do have extack available.

    Since the function declaration line is changed anyway, name the other
    function arguments to placate checkpatch.

    Signed-off-by: Petr Machata
    Acked-by: Jiri Pirko
    Reviewed-by: Ido Schimmel
    Reviewed-by: David Ahern
    Signed-off-by: David S. Miller

    Petr Machata
     

17 Nov, 2018

1 commit

  • Currently, the vlan packet offloads are registered only upon 8021q module
    load. However, even without this module loaded, the offloads could be
    utilized, for example by openvswitch datapath. As reported by Michael,
    that causes 2x to 5x performance improvement, depending on a testcase.

    So move the vlan offload registrations into vlan_core and make this
    available even without 8021q module loaded.

    Reported-by: Michael Shteinbok
    Signed-off-by: Jiri Pirko
    Tested-by: Michael Shteinbok
    Reviewed-by: David Ahern
    Signed-off-by: David S. Miller

    Jiri Pirko
     

08 Nov, 2018

1 commit

  • GSO tunneled packets are always segmented in software before they are
    transmitted by a VLAN, even when the lower device can offload tunnel
    encapsulation and VLAN together (i.e., some bits in NETIF_F_GSO_ENCAP_ALL
    mask are set in the lower device 'vlan_features'). If we let VLANs have
    the same tunnel offload capabilities as their lower device, throughput
    can improve significantly when CPU is limited on the transmitter side.

    - set NETIF_F_GSO_ENCAP_ALL bits in the VLAN 'hw_features', to ensure
    that 'features' will have those bits zeroed only when the lower device
    has no hardware support for tunnel encapsulation.
    - for the same reason, copy GSO-related bits of 'hw_enc_features' from
    lower device to VLAN, and ensure to update that value when the lower
    device changes its features.
    - set NETIF_F_HW_CSUM bit in the VLAN 'hw_enc_features' if 'real_dev'
    is able to compute checksums at least for a kind of packets, like done
    with commit 8403debeead8 ("vlan: Keep NETIF_F_HW_CSUM similar to other
    software devices"). This avoids software segmentation due to mismatching
    checksum capabilities between VLAN's 'features' and 'hw_enc_features'.

    Reported-by: Flavio Leitner
    Signed-off-by: Davide Caratti
    Signed-off-by: David S. Miller

    Davide Caratti
     

03 Jul, 2018

1 commit


02 Jul, 2018

1 commit

  • Since the addition of GRO for ESP, gro_receive can consume the skb and
    return -EINPROGRESS. In that case, the lower layer GRO handler cannot
    touch the skb anymore.

    Commit 5f114163f2f5 ("net: Add a skb_gro_flush_final helper.") converted
    some of the gro_receive handlers that can lead to ESP's gro_receive so
    that they wouldn't access the skb when -EINPROGRESS is returned, but
    missed other spots, mainly in tunneling protocols.

    This patch finishes the conversion to using skb_gro_flush_final(), and
    adds a new helper, skb_gro_flush_final_remcsum(), used in VXLAN and
    GUE.

    Fixes: 5f114163f2f5 ("net: Add a skb_gro_flush_final helper.")
    Signed-off-by: Sabrina Dubroca
    Reviewed-by: Stefano Brivio
    Signed-off-by: David S. Miller

    Sabrina Dubroca
     

26 Jun, 2018

1 commit

  • Manage pending per-NAPI GRO packets via list_head.

    Return an SKB pointer from the GRO receive handlers. When GRO receive
    handlers return non-NULL, it means that this SKB needs to be completed
    at this time and removed from the NAPI queue.

    Several operations are greatly simplified by this transformation,
    especially timing out the oldest SKB in the list when gro_count
    exceeds MAX_GRO_SKBS, and napi_gro_flush() which walks the queue
    in reverse order.

    Signed-off-by: David S. Miller

    David Miller
     

18 May, 2018

1 commit


30 Mar, 2018

1 commit

  • NETIF_F_HW_VLAN_[CS]TAG_FILTER features require more than just a bit
    flip in dev->features in order to keep the driver in a consistent state.
    These features notify the driver of each added/removed vlan, but toggling
    of vlan-filter does not notify the driver accordingly for each of the
    existing vlans.

    This patch implements a similar solution to NETIF_F_RX_UDP_TUNNEL_PORT
    behavior (which notifies the driver about UDP ports in the same manner
    that vids are reported).

    Each toggling of the features propagates to the 8021q module, which
    iterates over the vlans and call add/kill ndo accordingly.

    Signed-off-by: Gal Pressman
    Reviewed-by: Tariq Toukan
    Signed-off-by: David S. Miller

    Gal Pressman
     

28 Mar, 2018

1 commit


28 Feb, 2018

1 commit


11 Jan, 2018

1 commit

  • A vlan device with vid 0 is allow to creat by not able to be fully
    cleaned up by unregister_vlan_dev() which checks for vlan_id!=0.

    Also, VLAN 0 is probably not a valid number and it is kinda
    "reserved" for HW accelerating devices, but it is probably too
    late to reject it from creation even if makes sense. Instead,
    just remove the check in unregister_vlan_dev().

    Reported-by: Dmitry Vyukov
    Fixes: ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)")
    Cc: Vlad Yasevich
    Cc: Ben Hutchings
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

12 Nov, 2017

1 commit


11 Nov, 2017

1 commit

  • After refcnt reaches zero, vlan_vid_del() could free
    dev->vlan_info via RCU:

    RCU_INIT_POINTER(dev->vlan_info, NULL);
    call_rcu(&vlan_info->rcu, vlan_info_rcu_free);

    However, the pointer 'grp' still points to that memory
    since it is set before vlan_vid_del():

    vlan_info = rtnl_dereference(dev->vlan_info);
    if (!vlan_info)
    goto out;
    grp = &vlan_info->grp;

    Depends on when that RCU callback is scheduled, we could
    trigger a use-after-free in vlan_group_for_each_dev()
    right following this vlan_vid_del().

    Fix it by moving vlan_vid_del() before setting grp. This
    is also symmetric to the vlan_vid_add() we call in
    vlan_device_event().

    Reported-by: Fengguang Wu
    Fixes: efc73f4bbc23 ("net: Fix memory leak - vlan_info struct")
    Cc: Alexander Duyck
    Cc: Linus Torvalds
    Cc: Girish Moodalbail
    Signed-off-by: Cong Wang
    Reviewed-by: Girish Moodalbail
    Tested-by: Fengguang Wu
    Signed-off-by: David S. Miller

    Cong Wang
     

04 Nov, 2017

1 commit

  • Some time ago Eric Dumazet suggested a "hack the IFF_XMIT_DST_RELEASE
    flag on the vlan netdev". But the last comment was "does not support
    properly bonding/team.(If the real_dev->privflags IFF_XMIT_DST_RELEASE
    bit changes, we want to update all the vlans at the same time )"

    I've extended that patch to support changes of IFF_XMIT_DST_RELEASE in
    bonding/team.
    Both bonding and team call netdev_change_features() after recalculation
    of features including priv_flags IFF_XMIT_DST_RELEASE bit. So the only
    thing needed to support is to recheck this bit in
    vlan_transfer_features().

    Suggested-by: Eric Dumazet
    Signed-off-by: Vadim Fedorenko
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Vadim Fedorenko
     

05 Oct, 2017

1 commit


20 Jun, 2017

1 commit

  • The register_vlan_device would invoke free_netdev directly, when
    register_vlan_dev failed. It would trigger the BUG_ON in free_netdev
    if the dev was already registered. In this case, the netdev would be
    freed in netdev_run_todo later.

    So add one condition check now. Only when dev is not registered, then
    free it directly.

    The following is the part coredump when netdev_upper_dev_link failed
    in register_vlan_dev. I removed the lines which are too long.

    [ 411.237457] ------------[ cut here ]------------
    [ 411.237458] kernel BUG at net/core/dev.c:7998!
    [ 411.237484] invalid opcode: 0000 [#1] SMP
    [ 411.237705] [last unloaded: 8021q]
    [ 411.237718] CPU: 1 PID: 12845 Comm: vconfig Tainted: G E 4.12.0-rc5+ #6
    [ 411.237737] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015
    [ 411.237764] task: ffff9cbeb6685580 task.stack: ffffa7d2807d8000
    [ 411.237782] RIP: 0010:free_netdev+0x116/0x120
    [ 411.237794] RSP: 0018:ffffa7d2807dbdb0 EFLAGS: 00010297
    [ 411.237808] RAX: 0000000000000002 RBX: ffff9cbeb6ba8fd8 RCX: 0000000000001878
    [ 411.237826] RDX: 0000000000000001 RSI: 0000000000000282 RDI: 0000000000000000
    [ 411.237844] RBP: ffffa7d2807dbdc8 R08: 0002986100029841 R09: 0002982100029801
    [ 411.237861] R10: 0004000100029980 R11: 0004000100029980 R12: ffff9cbeb6ba9000
    [ 411.238761] R13: ffff9cbeb6ba9060 R14: ffff9cbe60f1a000 R15: ffff9cbeb6ba9000
    [ 411.239518] FS: 00007fb690d81700(0000) GS:ffff9cbebb640000(0000) knlGS:0000000000000000
    [ 411.239949] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 411.240454] CR2: 00007f7115624000 CR3: 0000000077cdf000 CR4: 00000000003406e0
    [ 411.240936] Call Trace:
    [ 411.241462] vlan_ioctl_handler+0x3f1/0x400 [8021q]
    [ 411.241910] sock_ioctl+0x18b/0x2c0
    [ 411.242394] do_vfs_ioctl+0xa1/0x5d0
    [ 411.242853] ? sock_alloc_file+0xa6/0x130
    [ 411.243465] SyS_ioctl+0x79/0x90
    [ 411.243900] entry_SYSCALL_64_fastpath+0x1e/0xa9
    [ 411.244425] RIP: 0033:0x7fb69089a357
    [ 411.244863] RSP: 002b:00007ffcd04e0fc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
    [ 411.245445] RAX: ffffffffffffffda RBX: 00007ffcd04e2884 RCX: 00007fb69089a357
    [ 411.245903] RDX: 00007ffcd04e0fd0 RSI: 0000000000008983 RDI: 0000000000000003
    [ 411.246527] RBP: 00007ffcd04e0fd0 R08: 0000000000000000 R09: 1999999999999999
    [ 411.246976] R10: 000000000000053f R11: 0000000000000202 R12: 0000000000000004
    [ 411.247414] R13: 00007ffcd04e1128 R14: 00007ffcd04e2888 R15: 0000000000000001
    [ 411.249129] RIP: free_netdev+0x116/0x120 RSP: ffffa7d2807dbdb0

    Signed-off-by: Gao Feng
    Signed-off-by: David S. Miller

    Gao Feng
     

25 Dec, 2016

1 commit


18 Nov, 2016

1 commit

  • Make struct pernet_operations::id unsigned.

    There are 2 reasons to do so:

    1)
    This field is really an index into an zero based array and
    thus is unsigned entity. Using negative value is out-of-bound
    access by definition.

    2)
    On x86_64 unsigned 32-bit data which are mixed with pointers
    via array indexing or offsets added or subtracted to pointers
    are preffered to signed 32-bit data.

    "int" being used as an array index needs to be sign-extended
    to 64-bit before being used.

    void f(long *p, int i)
    {
    g(p[i]);
    }

    roughly translates to

    movsx rsi, esi
    mov rdi, [rsi+...]
    call g

    MOVSX is 3 byte instruction which isn't necessary if the variable is
    unsigned because x86_64 is zero extending by default.

    Now, there is net_generic() function which, you guessed it right, uses
    "int" as an array index:

    static inline void *net_generic(const struct net *net, int id)
    {
    ...
    ptr = ng->ptr[id - 1];
    ...
    }

    And this function is used a lot, so those sign extensions add up.

    Patch snipes ~1730 bytes on allyesconfig kernel (without all junk
    messing with code generation):

    add/remove: 0/0 grow/shrink: 70/598 up/down: 396/-2126 (-1730)

    Unfortunately some functions actually grow bigger.
    This is a semmingly random artefact of code generation with register
    allocator being used differently. gcc decides that some variable
    needs to live in new r8+ registers and every access now requires REX
    prefix. Or it is shifted into r12, so [r12+0] addressing mode has to be
    used which is longer than [r8]

    However, overall balance is in negative direction:

    add/remove: 0/0 grow/shrink: 70/598 up/down: 396/-2126 (-1730)
    function old new delta
    nfsd4_lock 3886 3959 +73
    tipc_link_build_proto_msg 1096 1140 +44
    mac80211_hwsim_new_radio 2776 2808 +32
    tipc_mon_rcv 1032 1058 +26
    svcauth_gss_legacy_init 1413 1429 +16
    tipc_bcbase_select_primary 379 392 +13
    nfsd4_exchange_id 1247 1260 +13
    nfsd4_setclientid_confirm 782 793 +11
    ...
    put_client_renew_locked 494 480 -14
    ip_set_sockfn_get 730 716 -14
    geneve_sock_add 829 813 -16
    nfsd4_sequence_done 721 703 -18
    nlmclnt_lookup_host 708 686 -22
    nfsd4_lockt 1085 1063 -22
    nfs_get_client 1077 1050 -27
    tcf_bpf_init 1106 1076 -30
    nfsd4_encode_fattr 5997 5930 -67
    Total: Before=154856051, After=154854321, chg -0.00%

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

31 Oct, 2016

1 commit


21 Oct, 2016

1 commit

  • Currently, GRO can do unlimited recursion through the gro_receive
    handlers. This was fixed for tunneling protocols by limiting tunnel GRO
    to one level with encap_mark, but both VLAN and TEB still have this
    problem. Thus, the kernel is vulnerable to a stack overflow, if we
    receive a packet composed entirely of VLAN headers.

    This patch adds a recursion counter to the GRO layer to prevent stack
    overflow. When a gro_receive function hits the recursion limit, GRO is
    aborted for this skb and it is processed normally. This recursion
    counter is put in the GRO CB, but could be turned into a percpu counter
    if we run out of space in the CB.

    Thanks to Vladimír Beneš for the initial bug report.

    Fixes: CVE-2016-7039
    Fixes: 9b174d88c257 ("net: Add Transparent Ethernet Bridging GRO support.")
    Fixes: 66e5133f19e9 ("vlan: Add GRO support for non hardware accelerated vlan")
    Signed-off-by: Sabrina Dubroca
    Reviewed-by: Jiri Benc
    Acked-by: Hannes Frederic Sowa
    Acked-by: Tom Herbert
    Signed-off-by: David S. Miller

    Sabrina Dubroca
     

19 Oct, 2016

1 commit


18 Oct, 2016

1 commit

  • args.u.name_type is of type unsigned int and is always >= 0.

    This fixes the following GCC warning:

    net/8021q/vlan.c: In function ‘vlan_ioctl_handler’:
    net/8021q/vlan.c:574:14: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

    Signed-off-by: Tobias Klauser
    Signed-off-by: David S. Miller

    Tobias Klauser
     

14 Aug, 2016

1 commit


01 Jun, 2016

1 commit

  • The MAC address of the physical interface is only copied to the VLAN
    when it is first created, resulting in an inconsistency after MAC
    address changes of only newly created VLANs having an up-to-date MAC.

    The VLANs should continue inheriting the MAC address of the physical
    interface until the VLAN MAC address is explicitly set to any value.
    This allows IPv6 EUI64 addresses for the VLAN to reflect any changes
    to the MAC of the physical interface and thus for DAD to behave as
    expected.

    Signed-off-by: Mike Manning
    Signed-off-by: David S. Miller

    Mike Manning
     

18 Mar, 2016

1 commit


22 Feb, 2016

1 commit

  • Currently vlan device inherits unicast filtering flag from underlying
    device. If underlying device doesn't support unicast filter, this will
    put vlan device into promiscuous mode when it's stacked.

    Tun on IFF_UNICAST_FLT on the vlan device in any case so that it does
    not go into promiscuous mode needlessly. If underlying device does not
    support unicast filtering, that device will enter promiscuous mode.

    Signed-off-by: Zhang Shengju
    Signed-off-by: David S. Miller

    Zhang Shengju
     

02 Jun, 2015

1 commit

  • 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
    Signed-off-by: David S. Miller

    Toshiaki Makita
     

14 May, 2015

1 commit

  • 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->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] [] __dev_set_promiscuity+0x38/0x1e0
    [62852.052186] [] ? _raw_spin_unlock_bh+0x1b/0x40
    [62852.052188] [] ? dev_set_rx_mode+0x2e/0x40
    [62852.052190] [] dev_set_promiscuity+0x24/0x50
    [62852.052194] [] vlan_dev_open+0xd5/0x1f0 [8021q]
    [62852.052196] [] __dev_open+0xbf/0x140
    [62852.052198] [] __dev_change_flags+0x9d/0x170
    [62852.052200] [] dev_change_flags+0x29/0x60

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

    [62852.053569] [] __dev_set_promiscuity+0x38/0x1e0
    [62852.053571] [] ? vlan_dev_set_rx_mode+0x2b/0x30
    [8021q]
    [62852.053573] [] __dev_change_flags+0xe5/0x170
    [62852.053645] [] dev_change_flags+0x29/0x60
    [62852.053647] [] vlan_device_event+0x18a/0x690
    [8021q]
    [62852.053649] [] notifier_call_chain+0x4c/0x70
    [62852.053651] [] raw_notifier_call_chain+0x16/0x20
    [62852.053653] [] call_netdevice_notifiers+0x2d/0x60
    [62852.053654] [] __dev_notify_flags+0x33/0xa0
    [62852.053656] [] dev_change_flags+0x52/0x60
    [62852.053657] [] 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
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

19 Mar, 2015

1 commit

  • 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
    --> vlan_device_event()
    --> dev_change_flags()
    --> __dev_change_flags()
    --> __dev_close()
    --> __dev_close_many()
    --> dev_deactivate_many()
    --> 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
    Signed-off-by: David S. Miller

    David S. Miller
     

30 Jul, 2014

1 commit


16 Jul, 2014

1 commit

  • Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
    all users to pass NET_NAME_UNKNOWN.

    Coccinelle patch:

    @@
    expression sizeof_priv, name, setup, txqs, rxqs, count;
    @@

    (
    -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
    +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
    |
    -alloc_netdev_mq(sizeof_priv, name, setup, count)
    +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
    |
    -alloc_netdev(sizeof_priv, name, setup)
    +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
    )

    v9: move comments here from the wrong commit

    Signed-off-by: Tom Gundersen
    Reviewed-by: David Herrmann
    Signed-off-by: David S. Miller

    Tom Gundersen
     

17 May, 2014

1 commit

  • This reverts commit dc8eaaa006350d24030502a4521542e74b5cb39f.
    vlan: Fix lockdep warning when vlan dev handle notification

    Instead we use the new new API to find the lock subclass of
    our vlan device. This way we can support configurations where
    vlans are interspersed with other devices:
    bond -> vlan -> macvlan -> vlan

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

28 Mar, 2014

1 commit

  • Currently, if the card supports CTAG acceleration we do not
    account for the vlan header even if we are configuring an
    8021AD vlan. This may not be best since we'll do software
    tagging for 8021AD which will cause data copy on skb head expansion
    Configure the length based on available hw offload capabilities and
    vlan protocol.

    CC: Patrick McHardy
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

22 Jan, 2014

1 commit