19 May, 2012

1 commit


18 May, 2012

1 commit


17 May, 2012

1 commit


11 May, 2012

1 commit

  • This reverts commit 8a83a00b0735190384a348156837918271034144.

    It causes regressions for S390 devices, because it does an
    unconditional DST drop on SKBs for vlans and the QETH device
    needs the neighbour entry hung off the DST for certain things
    on transmit.

    Arnd can't remember exactly why he even needed this change.

    Conflicts:

    drivers/net/macvlan.c
    net/8021q/vlan_dev.c
    net/core/dev.c

    Signed-off-by: David S. Miller

    David S. Miller
     

01 May, 2012

1 commit

  • GRO can check if skb to be merged has its skb->head mapped to a page
    fragment, instead of a kmalloc() area.

    We 'upgrade' skb->head as a fragment in itself

    This avoids the frag_list fallback, and permits to build true GRO skb
    (one sk_buff and up to 16 fragments), using less memory.

    This reduces number of cache misses when user makes its copy, since a
    single sk_buff is fetched.

    This is a followup of patch "net: allow skb->head to be a page fragment"

    Signed-off-by: Eric Dumazet
    Cc: Ilpo Järvinen
    Cc: Herbert Xu
    Cc: Maciej Żenczykowski
    Cc: Neal Cardwell
    Cc: Tom Herbert
    Cc: Jeff Kirsher
    Cc: Ben Hutchings
    Cc: Matt Carlson
    Cc: Michael Chan
    Signed-off-by: David S. Miller

    Eric Dumazet
     

16 Apr, 2012

3 commits

  • This adds a dev_uc_add_excl() and dev_mc_add_excl() calls
    similar to the original dev_{uc|mc}_add() except it sets
    the global bit and returns -EEXIST for duplicat entires.

    This is useful for drivers that support SR-IOV, macvlan
    devices and any other devices that need to manage the
    unicast and multicast lists.

    v2: fix typo UNICAST should be MULTICAST in dev_mc_add_excl()

    CC: Ben Hutchings
    Signed-off-by: John Fastabend
    Signed-off-by: David S. Miller

    John Fastabend
     
  • This adds two new flags NTF_MASTER and NTF_SELF that can
    now be used to specify where PF_BRIDGE netlink commands should
    be sent. NTF_MASTER sends the commands to the 'dev->master'
    device for parsing. Typically this will be the linux net/bridge,
    or open-vswitch devices. Also without any flags set the command
    will be handled by the master device as well so that current user
    space tools continue to work as expected.

    The NTF_SELF flag will push the PF_BRIDGE commands to the
    device. In the basic example below the commands are then parsed
    and programmed in the embedded bridge.

    Note if both NTF_SELF and NTF_MASTER bits are set then the
    command will be sent to both 'dev->master' and 'dev' this allows
    user space to easily keep the embedded bridge and software bridge
    in sync.

    There is a slight complication in the case with both flags set
    when an error occurs. To resolve this the rtnl handler clears
    the NTF_ flag in the netlink ack to indicate which sets completed
    successfully. The add/del handlers will abort as soon as any
    error occurs.

    To support this new net device ops were added to call into
    the device and the existing bridging code was refactored
    to use these. There should be no required changes in user space
    to support the current bridge behavior.

    A basic setup with a SR-IOV enabled NIC looks like this,

    veth0 veth2
    | |
    ------------
    | bridge0 |
    Signed-off-by: David S. Miller

    John Fastabend
     
  • Use of "unsigned int" is preferred to bare "unsigned" in net tree.

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

    Eric Dumazet
     

04 Apr, 2012

1 commit

  • Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second
    regression, as some devices are missing from /proc/net/dev if many
    devices are defined.

    When seq_file buffer is filled, the last ->next/show() method is
    canceled (pos value is reverted to value prior ->next() call)

    Problem is after above commit, we dont restart the lookup at right
    position in ->start() method.

    Fix this by removing the internal 'pos' pointer added in commit, since
    we need to use the 'loff_t *pos' provided by seq_file layer.

    This also reverts commit 5cac98dd0 (net: Fix corruption
    in /proc/*/net/dev_mcast), since its not needed anymore.

    Reported-by: Ben Greear
    Signed-off-by: Eric Dumazet
    Cc: Mihai Maruseac
    Tested-by: Ben Greear
    Signed-off-by: David S. Miller

    Eric Dumazet
     

25 Mar, 2012

2 commits

  • Pull avoidance patches from Paul Gortmaker:
    "Nearly every subsystem has some kind of header with a proto like:

    void foo(struct device *dev);

    and yet there is no reason for most of these guys to care about the
    sub fields within the device struct. This allows us to significantly
    reduce the scope of headers including headers. For this instance, a
    reduction of about 40% is achieved by replacing the include with the
    simple fact that the device is some kind of a struct.

    Unlike the much larger module.h cleanup, this one is simply two
    commits. One to fix the implicit users, and then one
    to delete the device.h includes from the linux/include/ dir wherever
    possible."

    * tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    device.h: audit and cleanup users in main include dir
    device.h: cleanup users outside of linux/include (C files)

    Linus Torvalds
     
  • Pull cleanup from Paul Gortmaker:
    "The changes shown here are to unify linux's BUG support under the one
    file. Due to historical reasons, we have some BUG code
    in bug.h and some in kernel.h -- i.e. the support for BUILD_BUG in
    linux/kernel.h predates the addition of linux/bug.h, but old code in
    kernel.h wasn't moved to bug.h at that time. As a band-aid, kernel.h
    was including to pseudo link them.

    This has caused confusion[1] and general yuck/WTF[2] reactions. Here
    is an example that violates the principle of least surprise:

    CC lib/string.o
    lib/string.c: In function 'strlcat':
    lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON'
    make[2]: *** [lib/string.o] Error 1
    $
    $ grep linux/bug.h lib/string.c
    #include
    $

    We've included for the BUG infrastructure and yet we
    still get a compile fail! [We've not kernel.h for BUILD_BUG_ON.] Ugh -
    very confusing for someone who is new to kernel development.

    With the above in mind, the goals of this changeset are:

    1) find and fix any include/*.h files that were relying on the
    implicit presence of BUG code.
    2) find and fix any C files that were consuming kernel.h and hence
    relying on implicitly getting some/all BUG code.
    3) Move the BUG related code living in kernel.h to
    4) remove the asm/bug.h from kernel.h to finally break the chain.

    During development, the order was more like 3-4, build-test, 1-2. But
    to ensure that git history for bisect doesn't get needless build
    failures introduced, the commits have been reorderd to fix the problem
    areas in advance.

    [1] https://lkml.org/lkml/2012/1/3/90
    [2] https://lkml.org/lkml/2012/1/17/414"

    Fix up conflicts (new radeon file, reiserfs header cleanups) as per Paul
    and linux-next.

    * tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    kernel.h: doesn't explicitly use bug.h, so don't include it.
    bug: consolidate BUILD_BUG_ON with other bug code
    BUG: headers with BUG/BUG_ON etc. need linux/bug.h
    bug.h: add include of it to various implicit C users
    lib: fix implicit users of kernel.h for TAINT_WARN
    spinlock: macroize assert_spin_locked to avoid bug.h dependency
    x86: relocate get/set debugreg fcns to include/asm/debugreg.

    Linus Torvalds
     

21 Mar, 2012

2 commits

  • Pull networking merge from David Miller:
    "1) Move ixgbe driver over to purely page based buffering on receive.
    From Alexander Duyck.

    2) Add receive packet steering support to e1000e, from Bruce Allan.

    3) Convert TCP MD5 support over to RCU, from Eric Dumazet.

    4) Reduce cpu usage in handling out-of-order TCP packets on modern
    systems, also from Eric Dumazet.

    5) Support the IP{,V6}_UNICAST_IF socket options, making the wine
    folks happy, from Erich Hoover.

    6) Support VLAN trunking from guests in hyperv driver, from Haiyang
    Zhang.

    7) Support byte-queue-limtis in r8169, from Igor Maravic.

    8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but
    was never properly implemented, Jiri Benc fixed that.

    9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang.

    10) Support kernel side dump filtering by ctmark in netfilter
    ctnetlink, from Pablo Neira Ayuso.

    11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker.

    12) Add new peek socket options to assist with socket migration, from
    Pavel Emelyanov.

    13) Add sch_plug packet scheduler whose queue is controlled by
    userland daemons using explicit freeze and release commands. From
    Shriram Rajagopalan.

    14) Fix FCOE checksum offload handling on transmit, from Yi Zou."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits)
    Fix pppol2tp getsockname()
    Remove printk from rds_sendmsg
    ipv6: fix incorrent ipv6 ipsec packet fragment
    cpsw: Hook up default ndo_change_mtu.
    net: qmi_wwan: fix build error due to cdc-wdm dependecy
    netdev: driver: ethernet: Add TI CPSW driver
    netdev: driver: ethernet: add cpsw address lookup engine support
    phy: add am79c874 PHY support
    mlx4_core: fix race on comm channel
    bonding: send igmp report for its master
    fs_enet: Add MPC5125 FEC support and PHY interface selection
    net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
    net: update the usage of CHECKSUM_UNNECESSARY
    fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
    net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
    ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
    net/hyperv: Fix the code handling tx busy
    ixgbe: fix namespace issues when FCoE/DCB is not enabled
    rtlwifi: Remove unused ETH_ADDR_LEN defines
    igbvf: Use ETH_ALEN
    ...

    Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and
    drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.

    Linus Torvalds
     
  • Pull driver core patches for 3.4-rc1 from Greg KH:
    "Here's the big driver core merge for 3.4-rc1.

    Lots of various things here, sysfs fixes/tweaks (with the nlink
    breakage reverted), dynamic debugging updates, w1 drivers, hyperv
    driver updates, and a variety of other bits and pieces, full
    information in the shortlog."

    * tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits)
    Tools: hv: Support enumeration from all the pools
    Tools: hv: Fully support the new KVP verbs in the user level daemon
    Drivers: hv: Support the newly introduced KVP messages in the driver
    Drivers: hv: Add new message types to enhance KVP
    regulator: Support driver probe deferral
    Revert "sysfs: Kill nlink counting."
    uevent: send events in correct order according to seqnum (v3)
    driver core: minor comment formatting cleanups
    driver core: move the deferred probe pointer into the private area
    drivercore: Add driver probe deferral mechanism
    DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers
    w1_bq27000: Only one thread can access the bq27000 at a time.
    w1_bq27000 - remove w1_bq27000_write
    w1_bq27000: remove unnecessary NULL test.
    sysfs: Fix memory leak in sysfs_sd_setsecdata().
    intel_idle: Revert change of auto_demotion_disable_flags for Nehalem
    w1: Fix w1_bq27000
    driver-core: documentation: fix up Greg's email address
    powernow-k6: Really enable auto-loading
    powernow-k7: Fix CPU family number
    ...

    Linus Torvalds
     

20 Mar, 2012

1 commit

  • This is related to fixing the bug of dropping FCoE frames when disabling tx ip
    checksum by 'ethtool -K ethx tx off'. The FCoE protocol stack driver would
    use CHECKSUM_UNNECESSARY on tx path instead of CHECKSUM_PARTIAL (as indicated in
    the 2/2 of this series). To do so, netif_needs_gso() has to be changed here to
    not do gso for both CHECKSUM_PARTIAL and CHECKSUM_UNNECESSARY.

    Ref. to original discussion thread:
    http://patchwork.ozlabs.org/patch/146567/

    Signed-off-by: Yi Zou
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Yi Zou
     

16 Mar, 2012

1 commit

  • The header includes a lot of stuff, and
    it in turn gets a lot of use just for the basic "struct device"
    which appears so often.

    Clean up the users as follows:

    1) For those headers only needing "struct device" as a pointer
    in fcn args, replace the include with exactly that.

    2) For headers not really using anything from device.h, simply
    delete the include altogether.

    3) For headers relying on getting device.h implicitly before
    being included themselves, now explicitly include device.h

    4) For files in which doing #1 or #2 uncovers an implicit
    dependency on some other header, fix by explicitly adding
    the required header(s).

    Any C files that were implicitly relying on device.h to be
    present have already been dealt with in advance.

    Total removals from #1 and #2: 51. Total additions coming
    from #3: 9. Total other implicit dependencies from #4: 7.

    As of 3.3-rc1, there were 110, so a net removal of 42 gives
    about a 38% reduction in device.h presence in include/*

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

13 Mar, 2012

2 commits

  • This change adds a memory barrier to the byte queue limit code to address a
    possible race as has been seen in the past with the
    netif_stop_queue/netif_wake_queue logic.

    Signed-off-by: Alexander Duyck
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • We are seeing dev_watchdog hangs on several drivers. I suspect this is due
    to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link
    change, and then not being cleared by netdev_tx_reset_queue. This change
    corrects that.

    In addition we were seeing dev_watchdog hangs on igb after running the
    ethtool tests. We found this to be due to the fact that the ethtool test
    runs the same logic as ndo_start_xmit, but we were never clearing the XOFF
    flag since the loopback test in ethtool does not do byte queue accounting.

    Signed-off-by: Alexander Duyck
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     

10 Mar, 2012

1 commit

  • Specifically use it in napi_disable_pending(), napi_schedule_prep(),
    napi_reschedule(), netif_tx_queue_stopped(), netif_queue_stopped(),
    netif_xmit_stopped(), netif_xmit_frozen_or_stopped(), netif_running(),
    __netif_subqueue_stopped(), netif_subqueue_stopped(),
    netif_is_multiquue(), netif_carrier_ok(), netif_dormant(),
    netif_oper_up(), netif_device_present(), __netif_tx_trylock(),
    net_gso_ok(), skb_gso_ok(), netif_needs_gso(), and
    netif_is_bond_slave().

    Signed-off-by: David S. Miller

    David S. Miller
     

07 Mar, 2012

1 commit


06 Mar, 2012

1 commit

  • Some drivers use internal netdev stats member to store part of their
    stats, yet advertize ndo_get_stats64() to implement some 64bit fields.

    Allow them to use netdev_stats_to_stats64() helper to make the copy of
    netdev stats before they compute their 64bit counters.

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

    Eric Dumazet
     

05 Mar, 2012

1 commit

  • If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
    other BUG variant in a static inline (i.e. not in a #define) then
    that header really should be including and not just
    expecting it to be implicitly present.

    We can make this change risk-free, since if the files using these
    headers didn't have exposure to linux/bug.h already, they would have
    been causing compile failures/warnings.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

24 Feb, 2012

2 commits

  • This is useful for testing RX handling of frames with bad
    CRCs.

    Requires driver support to actually put the packet on the
    wire properly.

    Signed-off-by: Ben Greear
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Ben Greear
     
  • …_key_slow_[inc|dec]()

    So here's a boot tested patch on top of Jason's series that does
    all the cleanups I talked about and turns jump labels into a
    more intuitive to use facility. It should also address the
    various misconceptions and confusions that surround jump labels.

    Typical usage scenarios:

    #include <linux/static_key.h>

    struct static_key key = STATIC_KEY_INIT_TRUE;

    if (static_key_false(&key))
    do unlikely code
    else
    do likely code

    Or:

    if (static_key_true(&key))
    do likely code
    else
    do unlikely code

    The static key is modified via:

    static_key_slow_inc(&key);
    ...
    static_key_slow_dec(&key);

    The 'slow' prefix makes it abundantly clear that this is an
    expensive operation.

    I've updated all in-kernel code to use this everywhere. Note
    that I (intentionally) have not pushed through the rename
    blindly through to the lowest levels: the actual jump-label
    patching arch facility should be named like that, so we want to
    decouple jump labels from the static-key facility a bit.

    On non-jump-label enabled architectures static keys default to
    likely()/unlikely() branches.

    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Acked-by: Jason Baron <jbaron@redhat.com>
    Acked-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: a.p.zijlstra@chello.nl
    Cc: mathieu.desnoyers@efficios.com
    Cc: davem@davemloft.net
    Cc: ddaney.cavm@gmail.com
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Link: http://lkml.kernel.org/r/20120222085809.GA26397@elte.hu
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    Ingo Molnar
     

25 Jan, 2012

1 commit

  • If CONFIG_DYNAMIC_DEBUG is defined, honor it over DEBUG, so that
    pr_debug()s are controllable, instead of always-on. When DEBUG is
    also defined, change _DPRINTK_FLAGS_DEFAULT to enable printing by
    default.

    Also adding _DPRINTK_FLAGS_INCL_MODNAME would be nice, but there are
    numerous cases of pr_debug(NAME ": ...), which would result in double
    printing of module-name. So defer this until things settle.

    Cc: David Miller
    Cc: Joe Perches
    Signed-off-by: Jim Cromie
    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

10 Jan, 2012

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    igmp: Avoid zero delay when receiving odd mixture of IGMP queries
    netdev: make net_device_ops const
    bcm63xx: make ethtool_ops const
    usbnet: make ethtool_ops const
    net: Fix build with INET disabled.
    net: introduce netif_addr_lock_nested() and call if when appropriate
    net: correct lock name in dev_[uc/mc]_sync documentations.
    net: sk_update_clone is only used in net/core/sock.c
    8139cp: fix missing napi_gro_flush.
    pktgen: set correct max and min in pktgen_setup_inject()
    smsc911x: Unconditionally include linux/smscphy.h in smsc911x.h
    asix: fix infinite loop in rx_fixup()
    net: Default UDP and UNIX diag to 'n'.
    r6040: fix typo in use of MCR0 register bits
    net: fix sock_clone reference mismatch with tcp memcontrol

    Linus Torvalds
     
  • * 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: Remove irqsafe_cpu_xxx variants

    Fix up conflict in arch/x86/include/asm/percpu.h due to clash with
    cebef5beed3d ("x86: Fix and improve percpu_cmpxchg{8,16}b_double()")
    which edited the (now removed) irqsafe_cpu_cmpxchg*_double code.

    Linus Torvalds
     
  • dev_uc_sync() and dev_mc_sync() are acquiring netif_addr_lock for
    destination device of synchronization. Since netif_addr_lock is
    already held at the time for source device, this triggers lockdep
    deadlock warning.

    There's no way this deadlock can happen so use spin_lock_nested() to
    silence the warning.

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

    Jiri Pirko
     

06 Jan, 2012

1 commit

  • This adds a new ndo_get_fcoe_hbainfo() call in
    net_device_ops for FCoE protocol stack.

    If supported by the underlying device, the FCoE protocol
    stack will call this to get device specific information
    from the underlying device.
    This information will then be utilized by the FCoE protocol
    stack to register Fiber Channel HBA attributes with the
    Fiber Channel Management Service via Fabric Device
    Management Interface (FDMI) as per the T11 FC-GS
    specification.

    Changes in v2:
    - As per comments from David Miller aligning the parameters
    of the ndo_get_fcoe_hbainfo()

    Signed-off-by: Neerav Parikh
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Neerav Parikh
     

25 Dec, 2011

1 commit

  • Aim of this patch is to provide full range of rps_flow_cnt on 64bit arches.

    Theorical limit on number of flows is 2^32

    Fix some buggy RPS/RFS macros as well.

    Signed-off-by: Eric Dumazet
    CC: Tom Herbert
    CC: Xi Wang
    CC: Laurent Chavey
    Signed-off-by: David S. Miller

    Eric Dumazet
     

23 Dec, 2011

1 commit

  • We simply say that regular this_cpu use must be safe regardless of
    preemption and interrupt state. That has no material change for x86
    and s390 implementations of this_cpu operations. However, arches that
    do not provide their own implementation for this_cpu operations will
    now get code generated that disables interrupts instead of preemption.

    -tj: This is part of on-going percpu API cleanup. For detailed
    discussion of the subject, please refer to the following thread.

    http://thread.gmane.org/gmane.linux.kernel/1222078

    Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo
    LKML-Reference:

    Christoph Lameter
     

20 Dec, 2011

1 commit


14 Dec, 2011

1 commit


09 Dec, 2011

2 commits

  • This allows to keep track of vids needed to be in rx vlan filters of
    devices even if they are used in bond/team etc.

    vlan_info as well as vlan_group previously was, is allocated when first
    vid is added and dealocated whan last vid is deleted.

    vlan_group definition is moved to private header.

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

    Jiri Pirko
     
  • Let caller know the result of adding/removing vlan id to/from vlan
    filter.

    In some drivers I make those functions to just return 0. But in those
    where there is able to see if hw setup went correctly, return value is
    set appropriately.

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

    Jiri Pirko
     

03 Dec, 2011

1 commit


02 Dec, 2011

1 commit


01 Dec, 2011

2 commits


30 Nov, 2011

2 commits

  • Networking stack support for byte queue limits, uses dynamic queue
    limits library. Byte queue limits are maintained per transmit queue,
    and a dql structure has been added to netdev_queue structure for this
    purpose.

    Configuration of bql is in the tx- sysfs directory for the queue
    under the byte_queue_limits directory. Configuration includes:
    limit_min, bql minimum limit
    limit_max, bql maximum limit
    hold_time, bql slack hold time

    Also under the directory are:
    limit, current byte limit
    inflight, current number of bytes on the queue

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • Add interfaces for drivers to call for recording number of packets and
    bytes at send time and transmit completion. Also, added a function to
    "reset" a queue. These will be used by Byte Queue Limits.

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert