03 Mar, 2015

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 Jan, 2014

1 commit

  • When ndo_neigh_setup is called, the bitfield used by NEIGH_VAR_SET is
    not initialized yet. This might cause confusion for the people who use
    NEIGH_VAR_SET in ndo_neigh_setup. So rather introduce NEIGH_VAR_INIT for
    usage in ndo_neigh_setup.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

15 Jan, 2014

1 commit


10 Dec, 2013

1 commit

  • This patch converts the neigh param members to an array. This allows easier
    manipulation which will be needed later on to provide better management of
    default values.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

24 Sep, 2013

1 commit

  • MRP doesn't implement the periodictimer in 802.1Q, so it never retries
    if packets get lost. I ran into this problem when MRP sent a MVRP
    JoinIn before the interface was fully up. The JoinIn was lost, MRP
    didn't retry, and MVRP registration failed.

    Tested against Juniper QFabric switches

    Signed-off-by: Noel Burton-Krahn
    Acked-by: David Ward
    Signed-off-by: David S. Miller

    Noel Burton-Krahn
     

15 May, 2013

1 commit

  • commit fb745e9a037895 ("net/802/mrp: fix possible race condition when
    calling mrp_pdu_queue()") introduced a lockdep splat.

    [ 19.735147] =================================
    [ 19.735235] [ INFO: inconsistent lock state ]
    [ 19.735324] 3.9.2-build-0063 #4 Not tainted
    [ 19.735412] ---------------------------------
    [ 19.735500] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
    [ 19.735592] rmmod/1840 [HC0[0]:SC0[0]:HE1:SE1] takes:
    [ 19.735682] (&(&app->lock)->rlock#2){+.?...}, at: []
    mrp_uninit_applicant+0x69/0xba [mrp]

    app->lock is normally taken under softirq context, so disable BH to
    avoid the splat.

    Reported-by: Denys Fedoryshchenko
    Signed-off-by: Eric Dumazet
    Cc: David Ward
    Cc: Cong Wang
    Tested-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

23 Apr, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    drivers/net/ethernet/intel/igb/igb_main.c
    drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
    include/net/scm.h
    net/batman-adv/routing.c
    net/ipv4/tcp_input.c

    The e{uid,gid} --> {uid,gid} credentials fix conflicted with the
    cleanup in net-next to now pass cred structs around.

    The be2net driver had a bug fix in 'net' that overlapped with the VLAN
    interface changes by Patrick McHardy in net-next.

    An IGB conflict existed because in 'net' the build_skb() support was
    reverted, and in 'net-next' there was a comment style fix within that
    code.

    Several batman-adv conflicts were resolved by making sure that all
    calls to batadv_is_my_mac() are changed to have a new bat_priv first
    argument.

    Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
    rewrite in 'net-next', mostly overlapping changes.

    Thanks to Stephen Rothwell and Antonio Quartulli for help with several
    of these merge resolutions.

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Apr, 2013

1 commit

  • (Adapted from a very similar change to net/802/garp.c by Cong Wang.)

    mrp_pdu_queue() should ways be called with the applicant spin lock.
    mrp_uninit_applicant() only holds the rtnl lock which is not enough;
    a race is possible because mrp_rcv() is called in BH context:

    mrp_rcv()
    |->mrp_pdu_parse_msg()
    |->mrp_pdu_parse_vecattr()
    |->mrp_pdu_parse_vecattr_event()
    |-> mrp_attr_event()
    |-> mrp_pdu_append_vecattr_event()
    |-> mrp_pdu_queue()

    Cc: Cong Wang
    Cc: Eric Dumazet
    Signed-off-by: David Ward
    Acked-by: Cong Wang
    Signed-off-by: David S. Miller

    David Ward
     

08 Apr, 2013

1 commit

  • (Resend with a better changelog)

    garp_pdu_queue() should ways be called with this spin lock.
    garp_uninit_applicant() only holds rtnl lock which is not
    enough here. A possible race can happen as garp_pdu_rcv()
    is called in BH context:

    garp_pdu_rcv()
    |->garp_pdu_parse_msg()
    |->garp_pdu_parse_attr()
    |-> garp_gid_event()

    Found by code inspection.

    Cc: Eric Dumazet
    Cc: "David S. Miller"
    Cc: David Ward
    Cc: "Jorge Boncompte [DTI2]"
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

12 Feb, 2013

1 commit


11 Feb, 2013

1 commit


16 May, 2012

2 commits

  • This represents the mass deletion of the of the tokenring support.

    It gets rid of:
    - the net/tr.c which the drivers depended on
    - the drivers/net component
    - the Kbuild infrastructure around it
    - any tokenring related CONFIG_ settings in any defconfigs
    - the tokenring headers in the include/linux dir
    - the firmware associated with the tokenring drivers.
    - any associated token ring documentation.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • We are going to delete the Token ring support. This removes any
    special processing in the core networking for token ring, (aside
    from net/tr.c itself), leaving the drivers and remaining tokenring
    support present but inert.

    The mass removal of the drivers and net/tr.c will be in a separate
    commit, so that the history of these files that we still care
    about won't have the giant deletion tied into their history.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

10 May, 2012

1 commit

  • Use the new bool function ether_addr_equal to add
    some clarity and reduce the likelihood for misuse
    of compare_ether_addr for sorting.

    Done via cocci script:

    $ cat compare_ether_addr.cocci
    @@
    expression a,b;
    @@
    - !compare_ether_addr(a, b)
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - compare_ether_addr(a, b)
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal(a, b) == 0
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal(a, b) != 0
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal(a, b) == 0
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal(a, b) != 0
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !!ether_addr_equal(a, b)
    + ether_addr_equal(a, b)

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

21 Apr, 2012

2 commits

  • This results in code with less boiler plate that is a bit easier
    to read.

    Additionally stops us from using compatibility code in the sysctl
    core, hastening the day when the compatibility code can be removed.

    Signed-off-by: Eric W. Biederman
    Acked-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • This makes it clearer which sysctls are relative to your current network
    namespace.

    This makes it a little less error prone by not exposing sysctls for the
    initial network namespace in other namespaces.

    This is the same way we handle all of our other network interfaces to
    userspace and I can't honestly remember why we didn't do this for
    sysctls right from the start.

    Signed-off-by: Eric W. Biederman
    Acked-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

16 Apr, 2012

1 commit


14 Apr, 2012

1 commit

  • The comparison operators were backwards in both garp_attr_lookup and
    garp_attr_create, so the entire GID rbtree was in reverse order.
    (There was no practical side effect to this though, except that PDUs
    were sent with attributes listed in reverse order, which is still
    valid by the protocol. This change is only for clarity.)

    Signed-off-by: David Ward
    Signed-off-by: David S. Miller

    David Ward
     

03 Apr, 2012

1 commit

  • Pull networking fixes from David Miller:

    1) Provide device string properly for USB i2400m wimax devices, also
    don't OOPS when providing firmware string. From Phil Sutter.

    2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu.

    3) Add another device ID to USB zaurus driver, from Guan Xin.

    4) Loop index start in pool vector iterator is wrong causing MAC to not
    get configured in bnx2x driver, fix from Dmitry Kravkov.

    5) EQL driver assumes HZ=100, fix from Eric Dumazet.

    6) Now that skb_add_rx_frag() can specify the truesize increment
    separately, do so in f_phonet and cdc_phonet, also from Eric
    Dumazet.

    7) virtio_net accidently uses net_ratelimit() not only on the kernel
    warning but also the statistic bump, fix from Rick Jones.

    8) ip_route_input_mc() uses fixed init_net namespace, oops, use
    dev_net(dev) instead. Fix from Benjamin LaHaise.

    9) dev_forward_skb() needs to clear the incoming interface index of the
    SKB so that it looks like a new incoming packet, also from Benjamin
    LaHaise.

    10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of
    5GHZ, fix from Stanislav Yakovlev.

    11) Missing kmalloc() return value checks in orinoco, from Santosh
    Nayak.

    12) ath9k doesn't check for HT capabilities in the right way, it is
    checking ht_supported instead of the ATH9K_HW_CAP_HT flag. Fix from
    Sujith Manoharan.

    13) Fix x86 BPF JIT emission of 16-bit immediate field of AND
    instructions, from Feiran Zhuang.

    14) Avoid infinite loop in GARP code when registering sysfs entries.
    From David Ward.

    15) rose protocol uses memcpy instead of memcmp in a device address
    comparison, oops. Fix from Daniel Borkmann.

    16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being
    renamed to eth_hw_addr_random(). From Roland Stigge.

    17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way
    that ipv4 does. Fix from Shmulik Ladkani.

    18) via-rhine has an inverted bit test, causing suspend/resume
    regressions. Fix from Andreas Mohr.

    19) RIONET assumes 4K page size, fix from Akinobu Mita.

    20) Initialization of imask register in sky2 is buggy, because bits are
    "or'd" into an uninitialized local variable. Fix from Lino
    Sanfilippo.

    21) Fix FCOE checksum offload handling, from Yi Zou.

    22) Fix VLAN processing regression in e1000, from Jiri Pirko.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
    sky2: dont overwrite settings for PHY Quick link
    tg3: Fix 5717 serdes powerdown problem
    net: usb: cdc_eem: fix mtu
    net: sh_eth: fix endian check for architecture independent
    usb/rtl8150 : Remove duplicated definitions
    rionet: fix page allocation order of rionet_active
    via-rhine: fix wait-bit inversion.
    ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
    net: lpc_eth: Fix rename of dev_hw_addr_random
    net/netfilter/nfnetlink_acct.c: use linux/atomic.h
    rose_dev: fix memcpy-bug in rose_set_mac_address
    Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
    net/garp: avoid infinite loop if attribute already exists
    x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
    bonding: emit event when bonding changes MAC
    mac80211: fix oper channel timestamp updation
    ath9k: Use HW HT capabilites properly
    MAINTAINERS: adding maintainer for ipw2x00
    net: orinoco: add error handling for failed kmalloc().
    net/wireless: ipw2x00: fix a typo in wiphy struct initilization
    ...

    Linus Torvalds
     

02 Apr, 2012

1 commit

  • An infinite loop occurred if garp_attr_create was called with the values
    of an existing attribute. This might happen if a previous leave request
    for the attribute has not yet been followed by a PDU transmission (or,
    if the application previously issued a join request for the attribute
    and is now issuing another one, without having issued a leave request).

    If garp_attr_create finds an existing attribute having the same values,
    return the address to it. Its state will then get updated (i.e., if it
    was in a leaving state, it will move into a non-leaving state and not
    get deleted during the next PDU transmission).

    To accomplish this fix, collapse garp_attr_insert into garp_attr_create
    (which is its only caller).

    Thanks to Jorge Boncompte [DTI2] for contributing to
    this fix.

    Signed-off-by: David Ward
    Acked-by: Jorge Boncompte [DTI2]
    Signed-off-by: David S. Miller

    David Ward
     

29 Mar, 2012

1 commit


01 Nov, 2011

2 commits


02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

24 May, 2011

1 commit


21 May, 2011

1 commit


13 May, 2011

1 commit

  • When removing last vlan from a device, garp_uninit_applicant() calls
    synchronize_rcu() to make sure no user can still manipulate struct
    garp_applicant before we free it.

    Use call_rcu() instead, as a step to further net_device dismantle
    optimizations.

    Add the temporary garp_cleanup_module() function to make sure no pending
    call_rcu() are left at module unload time [ this will be removed when
    kfree_rcu() is available ]

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

10 May, 2011

1 commit

  • Speedup vlan dismantling in CONFIG_VLAN_8021Q_GVRP=y cases,
    by using a call_rcu() to free the memory instead of waiting with
    expensive synchronize_rcu() [ while RTNL is held ]

    Signed-off-by: Eric Dumazet
    Cc: Ben Greear
    Cc: Patrick McHardy
    Cc: Paul E. McKenney
    Signed-off-by: David S. Miller

    Eric Dumazet
     

26 Oct, 2010

1 commit

  • (struct net_device)->garp_port is rcu protected :
    (struct garp_port)->applicants is rcu protected :

    add __rcu annotation and proper rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 Sep, 2010

1 commit


12 Apr, 2010

1 commit


04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

12 Nov, 2009

1 commit

  • Now that sys_sysctl is a compatiblity wrapper around /proc/sys
    all sysctl strategy routines, and all ctl_name and strategy
    entries in the sysctl tables are unused, and can be
    revmoed.

    In addition neigh_sysctl_register has been modified to no longer
    take a strategy argument and it's callers have been modified not
    to pass one.

    Cc: "David Miller"
    Cc: Hideaki YOSHIFUJI
    Cc: netdev@vger.kernel.org
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     

25 May, 2009

1 commit


11 Apr, 2009

1 commit


07 Apr, 2009

1 commit


22 Mar, 2009

1 commit


05 Mar, 2009

1 commit