16 Jul, 2016

5 commits

  • Document the design of mprds, covering a brief description
    of the motivation, data-structures and modifications to the
    RDS control plane.

    Acked-by: Santosh Shilimkar
    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     
  • Update the documentation to describe the changes added by
    commit 8ba38460f363 ("net/rds Add getsockopt support for SO_RDS_TRANSPORT")

    Acked-by: Santosh Shilimkar
    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     
  • Use RDS probe-ping to compute how many paths may be used with
    the peer, and to synchronously start the multiple paths. If mprds is
    supported, hash outgoing traffic to one of multiple paths in rds_sendmsg()
    when multipath RDS is supported by the transport.

    CC: Santosh Shilimkar
    Signed-off-by: Sowmini Varadhan
    Acked-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     
  • Some code duplication in rds_tcp_reset_callbacks() can be avoided
    by having the function call rds_tcp_restore_callbacks() and
    rds_tcp_set_callbacks().

    Acked-by: Santosh Shilimkar
    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     
  • As the existing comments in rds_tcp_listen_data_ready() indicate,
    it is possible under some race-windows to get to this function with the
    accept() socket. If that happens, we could run into a sequence whereby

    thread 1 thread 2

    rds_tcp_accept_one() thread
    sets up new_sock via ->accept().
    The sk_user_data is now
    sock_def_readable
    data comes in for new_sock,
    ->sk_data_ready is called, and
    we land in rds_tcp_listen_data_ready
    rds_tcp_set_callbacks()
    takes the sk_callback_lock and
    sets up sk_user_data to be the cp
    read_lock sk_callback_lock
    ready = cp
    unlock sk_callback_lock
    page fault on ready

    In the above sequence, we end up with a panic on a bad page reference
    when trying to execute (*ready)(). Instead we need to call
    sock_def_readable() safely, which is what this patch achieves.

    Acked-by: Santosh Shilimkar
    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     

15 Jul, 2016

21 commits

  • Including devlink.h on ARM and probably other 32-bit architectures results in
    a harmless warning:

    In file included from ../include/trace/define_trace.h:95:0,
    from ../include/trace/events/devlink.h:51,
    from ../net/core/devlink.c:30:
    include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
    include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]

    The correct format string for 'size_t' is %zu, not %lu, this works on all
    architectures.

    Signed-off-by: Arnd Bergmann
    Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
    Signed-off-by: Jiri Pirko
    Acked-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Arnd Bergmann
     
  • Turned on that driver->owner which is struct module is not available when
    modules are disabled. Better to depend on a driver name which is
    always available.

    Reported-by: Randy Dunlap
    Fixes: e5224f0fe2 ("devlink: add hardware messages tracing facility")
    Signed-off-by: Jiri Pirko
    Acked-by: Randy Dunlap
    Acked-by: Steven Rostedt
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • 'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
    Return an explicit error code (-ENOENT) instead.

    Fixes: 61c503f976 ("mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops")
    Signed-off-by: Christophe JAILLET
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Christophe Jaillet
     
  • There are two generics functions phy_ethtool_{get|set}_link_ksettings,
    so we can use them instead of defining the same code in the driver.

    Signed-off-by: Philippe Reynes
    Signed-off-by: David S. Miller

    Philippe Reynes
     
  • The private structure contain a pointer to phydev, but the structure
    net_device already contain such pointer. So we can remove the pointer
    phy in the private structure, and update the driver to use the
    one contained in struct net_device.

    Signed-off-by: Philippe Reynes
    Signed-off-by: David S. Miller

    Philippe Reynes
     
  • …ub/scm/linux/kernel/git/kvalo/wireless-drivers-next

    Kalle Valo says:

    ====================
    wireless-drivers-next patches for 4.8

    Major changes:

    iwlwifi

    * more work on the RX path for the 9000 device series
    * some more dynamic queue allocation work
    * SAR BIOS implementation
    * some work on debugging capabilities
    * added support for GCMP encryption
    * data path rework in preparation for new HW
    * some cleanup to remove transport dependency on mac80211
    * support for MSIx in preparation for new HW
    * lots of work in preparation for HW support (9000 and a000 series)

    mwifiex

    * implement get_tx_power and get_antenna cfg80211 operation callbacks

    wl18xx

    * add support for 64bit clock

    rtl8xxxu

    * aggregation support (optional for now)

    Also wireless-drivers is merged to fix some conflicts.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Jesper Dangaard Brouer says:

    ====================
    pktgen samples: new scripts and removing older samples

    This patchset is adding some pktgen sample scripts that I've been
    using for a while[1], and they seams to relevant for more people.

    Patchset also remove some of the older style pktgen samples.

    [1] https://github.com/netoptimizer/network-testing/tree/master/pktgen
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Removing the pktgen sample script pktgen.conf-1-1-rdos, because
    it does not contain anything that is not covered by the other and
    newer style sample scripts.

    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • This pktgen sample script is useful for scalability testing a
    receiver. The script will simply generate one flow per
    thread (option -t N) using the thread number as part of the
    source IP-address.

    The single flow sample (pktgen_sample03_burst_single_flow.sh)
    have become quite popular, but it is important that developers
    also make sure to benchmark scalability of multiple receive
    queues.

    Signed-off-by: Jesper Dangaard Brouer
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • Adding a pktgen sample script that demonstrates how to use pktgen
    for simulating flows. Script will generate a certain number of
    concurrent flows ($FLOWS) and each flow will contain $FLOWLEN
    packets, which will be send back-to-back, before switching to a
    new flow, due to flag FLOW_SEQ.

    This script obsoletes the old sample script 'pktgen.conf-1-1-flows',
    which is removed.

    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • Saeed Mahameed says:

    ====================
    Mellanox 100G mlx5 Bulk flow statistics and SRIOV TC offloads

    This series from Amir and Or deals with two enhancements for the mlx5 TC offloads.

    The 1st two patches add bulk reading of flow counters. Few bulk counter queries are
    used instead of issuing thousands firmware commands per second to get statistics of all
    flows set to HW.

    The next patches add TC based SRIOV offloading to mlx5, as a follow up for the e-switch
    offloads mode and the VF representors. When the e-switch is set to the (new) "offloads"
    mode, we can now offload TC/flower drop and forward rules, the forward action we offload
    is TC mirred/redirect.

    The above is done by the VF representor netdevices exporting the setup_tc ndo where from
    there we're re-using and enhancing the existing mlx5 TC offloads sub-module which now
    works for both the NIC and the SRIOV cases.

    The series is applied on top b38a75d2d324 ('mlxsw: core: Trace EMAD messages')
    and it has no merge issues with the on-going net submission ('mlx5 tx timeout watchdog fixes')

    V2:
    - Fixed compilation warning.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The VF representors support only TC filter/action offloads
    (not mqprio) and this is enabled for them by default.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Enhance the TC offload code such that when the eswitch exists and it's
    mode being SRIOV offloads, we do TC actions parsing and setup targeted
    for eswitch. Next, we add the offloaded flow to the HW e-switch (fdb).

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Add the setup code that parses the TC actions needed to support offloading drop
    and mirred/redirect for SRIOV e-switch. We can redirect between two devices if
    they belong to the same HW switch, compare the switchdev HW ID attribute to
    enforce that.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • This helper serves to know if two switchdev port netdevices belong to the
    same HW ASIC, e.g to figure out if forwarding offload is possible between them.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Towards reusing the TC offloads code for an SRIOV use-case, change some of the
    helper functions to have _nic in their names so it's clear what's NIC unique
    and what's general. Also group together the NIC related helpers so we can easily
    branch per the use-case in downstream patch.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • This allows for upper levels in the driver, e.g the TC offload code to add
    e-switch offloaded steering rules. The caller provides the rule spec for
    matching, action, source and destination vports.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • In the offloads mode, some slow path rules are added by the driver (e.g
    send-to-vport), while offloaded rules are to be added from upper layers.

    The slow path rules have lower priority and we don't want matching on
    offloaded rules to suffer from extra steering hops related to the slow
    path rules.

    We use two priorities, one for offloaded rules (fast path), and one for
    the control rules (slow path). To allow for that, we enable two priorities
    for the FDB namespace in the FS core code.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Currenly, the code that programs the flow actions into the firmware
    doesn't check if was actually asked to offload the statistics, fix that.

    Fixes: aad7e08d39bd ('net/mlx5e: Hardware offloaded flower filter statistics support')
    Signed-off-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • This commit utilize the ability of ConnectX-4 to bulk read flow counters.
    Few bulk counter queries could be done instead of issuing thousands of
    firmware commands per second to get statistics of all flows set to HW,
    such as those programmed when we offload tc filters.

    Counters are stored sorted by hardware id, and queried in blocks (id +
    number of counters).

    Due to hardware requirement, start of block and number of counters in a
    block must be four aligned.

    Reviewed-by: Or Gerlitz
    Signed-off-by: Amir Vadai
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Amir Vadai
     
  • In order to use bulk counters, we need to have counters sorted by id.

    Signed-off-by: Amir Vadai
    Reviewed-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Amir Vadai
     

14 Jul, 2016

14 commits

  • Elad Kanfi says:

    ====================
    Code style fixes

    Fix all checkpatch warnings and errors, and reuse code
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add inline function that checks if there is a pending tx packet.

    Signed-off-by: Elad Kanfi
    Signed-off-by: David S. Miller

    Elad Kanfi
     
  • Fix following coding style problems :

    ERROR: else should follow close brace '}'
    + }
    + else { /* !dst_is_aligned */

    WARNING: Missing a blank line after declarations
    + u32 buf = nps_enet_reg_get(priv, NPS_ENET_REG_RX_BUF);
    + put_unaligned_be32(buf, reg);

    WARNING: Missing a blank line after declarations
    + u32 buf;
    + ioread32_rep(priv->regs_base + NPS_ENET_REG_RX_BUF, &buf, 1);

    CHECK: Blank lines aren't necessary before a close brace '}'
    +
    + }

    total: 1 errors, 2 warnings, 1 checks, 683 lines checked

    Signed-off-by: Elad Kanfi
    Signed-off-by: David S. Miller

    Elad Kanfi
     
  • Marcelo Ricardo Leitner says:

    ====================
    sctp: allow GSO frags to access the chunk too

    Patchset is named after the most important fix in it. First two patches
    are preparing the grounds for the 3rd patch.

    After the 3rd, they are not strictly logically related to the patchset,
    but I kept them together as they depend on each other.

    More details on patch changelogs.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Currently only read-only checks are performed up to the point on where
    we check if peer is ECN capable, checks which we can avoid otherwise.
    The flag ecn_ce_done is only used to perform this check once per
    incoming packet, and nothing more.

    Thus this patch moves the peer check up.

    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • We should not clear that flag when switching to a new skb from a GSO skb
    because it would cause ECN processing to happen multiple times per GSO
    skb, which is not wanted. Instead, let it be processed once per chunk.
    That is, in other words, once per IP header available.

    Fixes: 90017accff61 ("sctp: Add GSO support")
    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • Identifying address family operations during rx path is not something
    expensive but it's ugly to the eye to have it done multiple times,
    specially when we already validated it during initial rx processing.

    This patch takes advantage of the now shared sctp_input_cb and make the
    pointer to the operations readily available.

    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • SCTP will try to access original IP headers on sctp_recvmsg in order to
    copy the addresses used. There are also other places that do similar access
    to IP or even SCTP headers. But after 90017accff61 ("sctp: Add GSO
    support") they aren't always there because they are only present in the
    header skb.

    SCTP handles the queueing of incoming data by cloning the incoming skb
    and limiting to only the relevant payload. This clone has its cb updated
    to something different and it's then queued on socket rx queue. Thus we
    need to fix this in two moments.

    For rx path, not related to socket queue yet, this patch uses a
    partially copied sctp_input_cb to such GSO frags. This restores the
    ability to access the headers for this part of the code.

    Regarding the socket rx queue, it removes iif member from sctp_event and
    also add a chunk pointer on it.

    With these changes we're always able to reach the headers again.

    The biggest change here is that now the sctp_chunk struct and the
    original skb are only freed after the application consumed the buffer.
    Note however that the original payload was already like this due to the
    skb cloning.

    For iif, SCTP's IPv4 code doesn't use it, so no change is necessary.
    IPv6 now can fetch it directly from original's IPv6 CB as the original
    skb is still accessible.

    In the future we probably can simplify sctp_v*_skb_iif() stuff, as
    sctp_v4_skb_iif() was called but it's return value not used, and now
    it's not even called, but such cleanup is out of scope for this change.

    Fixes: 90017accff61 ("sctp: Add GSO support")
    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • The next patch needs 8 bytes in there. sctp_ulpevent has a hole due to
    bad alignment; msg_flags is using 4 bytes while it actually uses only 2, so
    we shrink it, and iif member (4 bytes) which can be easily fetched from
    another place once the next patch is there, so we remove it and thus
    creating space for 8 bytes.

    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • We process input path in other files too and having access to it is
    nice, so move it to a header where it's shared.

    Signed-off-by: Marcelo Ricardo Leitner
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     
  • There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • Comments from Frank Kellerman on last doc update:
    - extra whitespace in front of a neigh show command
    - convert the brief link example to 'vrf red'

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

    David Ahern
     
  • …etooth/bluetooth-next

    Johan Hedberg says:

    ====================
    pull request: bluetooth-next 2016-07-13

    Here's our main bluetooth-next pull request for the 4.8 kernel:

    - Fixes and cleanups in 802.15.4 and 6LoWPAN code
    - Fix out of bounds issue in btmrvl driver
    - Fixes to Bluetooth socket recvmsg return values
    - Use crypto_cipher_encrypt_one() instead of crypto_skcipher
    - Cleanup of Bluetooth connection sysfs interface
    - New Authentication failure reson code for Disconnected mgmt event
    - New USB IDs for Atheros, Qualcomm and Intel Bluetooth controllers

    Please let me know if there are any issues pulling. Thanks.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller