20 Aug, 2016

17 commits

  • In preparation for allowing switch drivers to implement system-wide
    suspend/resume functions, export dsa_switch_suspend and
    dsa_switch_resume() such that these are callable from the appropriate
    driver specific suspend/resume functions.

    Reviewed-by: Andrew Lunn
    Tested-by: Vivien Didelot
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Andrew Lunn says:

    ====================
    Fix mv88e6xxx wait function

    The mv88e6xxx wait function can be upset of the system has nots of
    other things to do and a sleep takes a lot longer than expected. Fix
    this be using a fixed number of iterations, rather than a fixed
    walkclock time.

    Witht that change made, it is possible to consoliate another
    wait function.

    A wait actually timing out should not happen and when it does, it
    means something serious is wrong. Make sure an error is logged,
    since not all callers will log an error.
    ====================

    Reviewed-by: Vivien Didelot
    Signed-off-by: David S. Miller

    David S. Miller
     
  • When mv88e6xxx_wait() returns a timeout, something bad has
    happened. Make sure it is noticed by logging an error.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Now that mv88e6xx_wait() iterated on a counter than a fixed time
    interval, it implements the same mechanism as mv88e6xxx_update() uses.
    So use it in mv88e6xx_wait().

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • The mv88e6xxx driver times out operations on the switch based on
    looping until an elapsed wall clock time is reached. However, if
    usleep_range() sleeps much longer than expected, it could timeout with
    an error without actually checking to see if the devices has completed
    the operation. So replace the elapsed time with a fixed upper bound on
    the number of loops.

    Testing on various switches has shown that switches takes either 0 or
    1 iteration, so a maximum of 16 iterations is a safe limit.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Andrew Lunn says:

    ====================
    PHY Kconfig and Makefile cleanup

    The Ethernet PHY directory has slowly been getting more entries.
    Split the entries in the Makefile and Kconfig into MDIO bus drivers
    and PHYs. Within these two groups, sort them. This should reduce merge
    conflicts and aid finding what one searches for.

    The Kconfig text contains redundant "Driver for" and "Support for"
    which add little value, make the vendor less obvious, and defeat the
    shortcut key in the menu. Remove such text.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Remove the redundant "Support for" and "Drivers for" from the Kconfig
    short description. This makes the manufacture much more prominent in
    the list and makes the shortcut keys useful.

    Signed-off-by: Andrew Lunn
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Sort the files to reduce merge conflicts and to make it easier to find
    drivers by name. Also separate the MDIO bus drivers from the PHY
    drivers, again to help find what you need.

    Signed-off-by: Andrew Lunn
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Fixes following sparse errors :

    net/ipv4/fib_semantics.c:1579:61: warning: incorrect type in argument 2
    (different base types)
    net/ipv4/fib_semantics.c:1579:61: expected unsigned int [unsigned]
    [usertype] key
    net/ipv4/fib_semantics.c:1579:61: got restricted __be32 const
    [usertype] nh_gw

    Fixes: a6db4494d218c ("net: ipv4: Consider failed nexthops in multipath routes")
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Include ipv4_rcv_saddr_equal() definition to avoid this sparse error :

    net/ipv4/udp.c:362:5: warning: symbol 'ipv4_rcv_saddr_equal' was not
    declared. Should it be static?

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

    Eric Dumazet
     
  • After commit 19689e38eca5 ("tcp: md5: use kmalloc() backed scratch
    areas") this function is no longer used.

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

    Eric Dumazet
     
  • An upcoming feature of IBM VNIC protocol is the ability to configure
    redundant backing devices for a VNIC client. In case of a failure
    on the current backing device, the driver will receive a signal
    from the hypervisor indicating that a failover will occur. The driver
    will then wait for a message from the backing device before
    establishing a new connection.

    Signed-off-by: Thomas Falcon
    Signed-off-by: David S. Miller

    Thomas Falcon
     
  • It added reset function for RoCE driver. RoCE is a feature of hns.
    In hip06 SoC, in RoCE reset process, it's needed to configure dsaf
    channel reset, port and sl map info. Reset function of RoCE is
    located in dsaf module, we only call it in RoCE driver when needed.

    This patch is used to fix the conflict, please refer to this link:
    https://www.spinics.net/lists/linux-rdma/msg39114.html

    Signed-off-by: Wei Hu
    Signed-off-by: Nenglong Zhao
    Signed-off-by: Lijun Ou
    Signed-off-by: Sheng Li
    Reviewed-by: Yisen Zhuang
    Signed-off-by: David S. Miller

    oulijun
     
  • Herbert Xu says:

    ====================
    rhashtable: Get rid of raw table walkers part 1

    This series starts the process of getting rid of all raw rhashtable
    walkers (e.g., using any of the rht_for_each helpers) from the
    kernel.

    We need to do this before I can fix the resize kmalloc failure issue
    by using multi-layered tables.

    We should do this anyway because almost all raw table walkers are
    already buggy in that they don't handle multiple rhashtables during
    a resize.
    ====================

    Dave/Tomas, please keep an eye out for any new patches that try
    to introduce raw table walkers and nack them.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch converts the diag dumping code to use the rhashtable
    walk code instead of going through rhashtable by hand. The lock
    nl_table_lock is now only taken while we process the multicast
    list as it's not needed for the rhashtable walk.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • As I'm working actively on rhashtable it helps if people CCed me
    when they work on in.

    Signed-off-by: Herbert Xu
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • The commit 8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 ("rhashtable:
    accept GFP flags in rhashtable_walk_init") added a GFP flag argument
    to rhashtable_walk_init because some users wish to use the walker
    in an unsleepable context.

    In fact we don't need to allocate memory in rhashtable_walk_init
    at all. The walker is always paired with an iterator so we could
    just stash ourselves there.

    This patch does that by introducing a new enter function to replace
    the existing init function. This way we don't have to churn all
    the existing users again.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

19 Aug, 2016

23 commits

  • Hariprasad Shenai says:

    ====================
    crypto/chcr: Add support for Chelsio Crypto Driver

    This patch series adds support for Chelsio Crypto driver.

    The patch series has been created against net-next tree and includes
    patches for Chelsio Low Level Driver(cxgb4) and adds the new crypto
    Upper Layer Driver(chcr) under a new directory drivers/crypto/chelsio.

    Patch 1/4 ("cxgb4: Add support for dynamic allocation of resources for
    ULD") adds support for dynamic allocation of resources for ULD. The
    objective of this patch is to provide generic interface for upper layer
    drivers to allocate and initialize hardware resources.

    The present cxgb4 (network driver) apart from network functionality, also
    initializes hardware and thus acts as lower layer driver for other drivers
    to use hardware resources. Thus it acts as both a Low level driver for
    Upper layer driver's like iw_cxgb4, cxgb4i and cxgb4it and a Network Driver.

    Right now the allocation of resources for Upper layer driver's is done
    statically. Patch 1/4 adds a new infrastructure for dynamic allocation of
    resources. cxgb4 will read the hardware capability through firmware and
    allocate/free the queues for Upper layer drivers when the respective
    driver's are loaded and freed when unloaded.

    Patch 2/3, 3/4 and 4/4 adds support for Chelsio Crypto Driver. The Crypto
    driver will act as another ULD on top of cxgb4.

    In this patch series, the ULD API framework is used only by crypto and other
    ULD's will make use of it in the next series.

    This patch series is only for review, if this looks ok we will test it
    thoroughly and send request for merge.

    We have included all the maintainers of respective drivers. Kindly
    review the changes and provide feedback on the same.

    V3: - Removed crypto queues from cxgb4 and added support for dynamic
    allocation of resources for Upper layer drivers
    - Dependency fix in Kconfig.

    V2: - Some residual code cleanup
    - Adds pr_fmt with chcr (KBUILD_MODNAME) added
    - Changes var name to accomodate them

    David S. Miller
     
  • Adds the config entry for the Chelsio Crypto Driver, Makefile changes
    for the same.

    Signed-off-by: Atul Gupta
    Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • The Chelsio's Crypto Hardware can perform the following operations:
    SHA1, SHA224, SHA256, SHA384 and SHA512, HMAC(SHA1), HMAC(SHA224),
    HMAC(SHA256), HMAC(SHA384), HAMC(SHA512), AES-128-CBC, AES-192-CBC,
    AES-256-CBC, AES-128-XTS, AES-256-XTS

    This patch implements the driver for above mentioned features. This
    driver is an Upper Layer Driver which is attached to Chelsio's LLD
    (cxgb4) and uses the queue allocated by the LLD for sending the crypto
    requests to the Hardware and receiving the responses from it.

    The crypto operations can be performed by Chelsio's hardware from the
    userspace applications and/or from within the kernel space using the
    kernel's crypto API.

    The above mentioned crypto features have been tested using kernel's
    tests mentioned in testmgr.h. They also have been tested from user
    space using libkcapi and Openssl.

    Signed-off-by: Atul Gupta
    Signed-off-by: Hariprasad Shenai
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • Signed-off-by: Atul Gupta
    Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • Add a new commmon infrastructure to allocate reosurces dynamically to
    Upper layer driver's(ULD) when they register with cxgb4 driver and free
    them during unregistering. All the queues and the interrupts for
    them will be allocated during ULD probe only and freed during remove.

    Signed-off-by: Atul Gupta
    Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • The data member of structure firmware is const and this constness is
    dropped by some cast.
    This patch add some const for keeping the const information.

    Signed-off-by: LABBE Corentin
    Signed-off-by: David S. Miller

    LABBE Corentin
     
  • Daniel Borkmann says:

    ====================
    BPF helper improvements and cleanups

    This set adds various improvements to BPF helpers, a cleanup to use
    skb_pkt_type_ok() helper, addition of bpf_skb_change_tail(), a follow
    up for event output helper and removing ifdefs around the cgroupv2
    helper bits. For details please see individual patches.

    The set is based against net-next tree, but requires a merge of net
    into net-next first.

    Thanks a lot!
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • As recently discussed during the task_under_cgroup_hierarchy() addition,
    we should get rid of the ifdefs surrounding the bpf_skb_under_cgroup()
    helper. If related functionality is not built-in, the helper cannot be
    used anyway, which is also in line with what we do for all other helpers.

    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Follow-up to 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for
    event output") for also adding the event output helper for XDP typed
    programs. The event output helper has been very useful in particular for
    debugging or event notification purposes, since it's much faster and
    flexible than regular trace printk due to programmatically being able to
    attach meta data. Same flags structure applies as with tc BPF programs.

    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • This work adds a bpf_skb_change_tail() helper for tc BPF programs. The
    basic idea is to expand or shrink the skb in a controlled manner. The
    eBPF program can then rewrite the rest via helpers like bpf_skb_store_bytes(),
    bpf_lX_csum_replace() and others rather than passing a raw buffer for
    writing here.

    bpf_skb_change_tail() is really a slow path helper and intended for
    replies with f.e. ICMP control messages. Concept is similar to other
    helpers like bpf_skb_change_proto() helper to keep the helper without
    protocol specifics and let the BPF program mangle the remaining parts.
    A flags field has been added and is reserved for now should we extend
    the helper in future.

    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Since we have a skb_pkt_type_ok() helper for checking the type before
    mangling, make use of it instead of open coding. Follow-up to commit
    8b10cab64c13 ("net: simplify and make pkt_type_ok() available for other
    users") that came in after d2485c4242a8 ("bpf: add bpf_skb_change_type
    helper").

    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Add TIPC_NL_PEER_REMOVE netlink command. This command can remove
    an offline peer node from the internal data structures.

    This will be supported by the tipc user space tool in iproute2.

    Signed-off-by: Richard Alpe
    Reviewed-by: Jon Maloy
    Acked-by: Ying Xue
    Signed-off-by: David S. Miller

    Richard Alpe
     
  • Over the years, TCP BDP has increased a lot, and is typically
    in the order of ~10 Mbytes with help of clever Congestion Control
    modules.

    In presence of packet losses, TCP stores incoming packets into an out of
    order queue, and number of skbs sitting there waiting for the missing
    packets to be received can match the BDP (~10 Mbytes)

    In some cases, TCP needs to make room for incoming skbs, and current
    strategy can simply remove all skbs in the out of order queue as a last
    resort, incurring a huge penalty, both for receiver and sender.

    Unfortunately these 'last resort events' are quite frequent, forcing
    sender to send all packets again, stalling the flow and wasting a lot of
    resources.

    This patch cleans only a part of the out of order queue in order
    to meet the memory constraints.

    Signed-off-by: Eric Dumazet
    Cc: Neal Cardwell
    Cc: Yuchung Cheng
    Cc: Soheil Hassas Yeganeh
    Cc: C. Stephen Gun
    Cc: Van Jacobson
    Acked-by: Soheil Hassas Yeganeh
    Acked-by: Yuchung Cheng
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is
    equal to 0. It make code a bit clener, so far when reading it one could
    think we forgot to set a proper mode. It also keeps this mode code in
    sync with other ones.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: David S. Miller

    Rafał Miłecki
     
  • BCM53573 is a new series of Broadcom's SoCs. It's based on ARM and can
    be found in two packages (versions): BCM53573 and BCM47189. It shares
    some code with the Northstar family, but also requires some new quirks.

    First of all there can be up to 2 Ethernet cores on this SoC. If that is
    the case, they are connected to two different switch ports allowing some
    more complex/optimized setups. It seems the second unit doesn't come
    fully configured and requires some IRQ quirk.

    Other than that only the first core is connected to the PHY. For the
    second one we have to register fixed PHY (similarly to the Northstar),
    otherwise generic PHY driver would get some invalid info.

    This has been successfully tested on Tenda AC9 (BCM47189B0).

    Signed-off-by: Rafał Miłecki
    Signed-off-by: David S. Miller

    Rafał Miłecki
     
  • trivial fix to spelling mistake in dev_err message

    Signed-off-by: Colin Ian King
    Signed-off-by: David S. Miller

    Colin Ian King
     
  • It is useful to be able to see the hash configuration when running tests.
    This patch adds a debugfs node for that purpose.

    Signed-off-by: Paul Durrant
    Cc: Wei Liu
    Acked-by: Wei Liu
    Signed-off-by: David S. Miller

    Paul Durrant
     
  • The division is already being done properly in efx_ef10_get_timer_config
    which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq.

    Fixes: d95e329a55ba ("sfc: get timer configuration from adapter")
    Signed-off-by: Edward Cree
    Signed-off-by: David S. Miller

    Edward Cree
     
  • While chasing tcp_xmit_retransmit_queue() kasan issue, I found
    that we could avoid reading sacked field of skb that we wont send,
    possibly removing one cache line miss.

    Very minor change in slow path, but why not ? ;)

    Signed-off-by: Eric Dumazet
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Nikolay Aleksandrov says:

    ====================
    net: bridge: export vlan stats per-port with flags

    This set adds the ability to export vlan stats per-port. Patch 01 makes
    that possible by consolidating the bridge and port linkxstats calls. Then
    patch 02 allows to dump the vlan entry flags in order to be able to
    distinguish between bridge and port vlan entries when dumping the master
    device vlan stats. That is needed because that call was implemented when
    the stats API didn't have slave dumping capabilities and it dumps all vlan
    stats (for both bridge and port entries). We also need it in order to print
    the vlan flags when dumping the stats.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Use one of the vlan xstats padding fields to export the vlan flags. This is
    needed in order to be able to distinguish between master (bridge) and port
    vlan entries in user-space when dumping the bridge vlan stats.

    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • In the bridge driver we usually have the same function working for both
    port and bridge. In order to follow that logic and also avoid code
    duplication, consolidate the bridge_ and brport_ linkxstats calls into
    one since they share most of their code. As a side effect this allows us
    to dump the vlan stats also via the slave call which is in preparation for
    the upcoming per-port vlan stats and vlan flag dumping.

    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • Hadar Hen Zion says:

    ====================
    net_sched, flow_dissector, flower: Introduce vlan tag support

    This patchset introduce vlan tag support to the flower classifier and the flow
    dissector. In addition to adding vlan priority to act vlan.

    The first 2 patches are dealing with flow-dissector:
    - The first patch is a fix, in case the vlan was already stripped from the
    skb, take it from skb->vlan_tci.
    - The second patch adds support for vlan priority.

    The next 2 patches are dealing with flower:
    - The first patch is a fix, sets flow dissector 'used_keys' according to the
    mask value of each key.
    - The secound patch adds vlan tag support to the flower classifier, user space
    patches will be sent later to complete it.

    The last patch adds vlan priority to act vlan since only vlan id is currently supported.

    Changes from V1:
    - A new patch was added to this series "net_sched: flower: Avoid dissection of unmasked keys"
    - Adding u16 padding to struct flow_dissector_key_vlan
    - change flow_label field in struct flow_dissector_key_tags form 20 bits field to u32
    - Remove 'if (v->tcfv_push_prio)' check from tcf_vlan_dump function
    - Add support to un-stripped vlan skb and skb with multipale vlans in __skb_flow_dissect
    ====================

    Signed-off-by: David S. Miller

    David S. Miller