Skip to content
Permalink
Simon-Horman/f…
Switch branches/tags

Commits on Jul 22, 2021

  1. flow_offload: add process to update action stats from hardware

    When collecting stats for actions update them using both
    both hardware and software counters.
    
    Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
    Signed-off-by: Louis Peens <louis.peens@corigine.com>
    Signed-off-by: Simon Horman <simon.horman@corigine.com>
    zhengbaowen authored and intel-lab-lkp committed Jul 22, 2021
  2. flow_offload: add process to delete offloaded actions from net device

    Add a basic process to delete offloaded actions from net device.
    
    Should not remove the offloaded action entries if the action
    fails to delete in tcf_del_notify.
    
    Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
    Signed-off-by: Louis Peens <louis.peens@corigine.com>
    Signed-off-by: Simon Horman <simon.horman@corigine.com>
    zhengbaowen authored and intel-lab-lkp committed Jul 22, 2021
  3. flow_offload: allow user to offload tc action to net device

    Use flow_indr_dev_register/flow_indr_dev_setup_offload to
    offload tc action.
    
    We offload the tc action mainly for ovs meter configuration.
    Make some basic changes for different vendors to return EOPNOTSUPP.
    
    We need to call tc_cleanup_flow_action to clean up tc action entry since
    in tc_setup_action, some actions may hold dev refcnt, especially the mirror
    action.
    
    As per review from the RFC, the kernel test robot will fail to run, so
    we add CONFIG_NET_CLS_ACT control for the action offload.
    
    Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
    Signed-off-by: Louis Peens <louis.peens@corigine.com>
    Signed-off-by: Simon Horman <simon.horman@corigine.com>
    zhengbaowen authored and intel-lab-lkp committed Jul 22, 2021

Commits on Jul 21, 2021

  1. ionic: cleanly release devlink instance

    The failure to register devlink will leave the system with dangled
    devlink resource, which is not cleaned if devlink_port_register() fails.
    
    In order to remove access to ".registered" field of struct devlink_port,
    require both devlink_register and devlink_port_register to success and
    check it through device pointer.
    
    Fixes: fbfb803 ("ionic: Add hardware init and device commands")
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Acked-by: Shannon Nelson <snelson@pensando.io>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Leon Romanovsky authored and davem330 committed Jul 21, 2021
  2. net: bridge: multicast: add context support for host-joined groups

    Adding bridge multicast context support for host-joined groups is easy
    because we only need the proper timer value. We pass the already chosen
    context and use its timer value.
    
    Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Nikolay Aleksandrov authored and davem330 committed Jul 21, 2021
  3. net: bridge: multicast: add mdb context support

    Choose the proper bridge multicast context when user-spaces is adding
    mdb entries. Currently we require the vlan to be configured on at least
    one device (port or bridge) in order to add an mdb entry if vlan
    mcast snooping is enabled (vlan snooping implies vlan filtering).
    Note that we always allow deleting an entry, regardless of the vlan state.
    
    Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Nikolay Aleksandrov authored and davem330 committed Jul 21, 2021
  4. ARM: dts: imx6qdl: move phy properties into phy device node

    This patch fixes issues found by dtbs_check:
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/fsl,fec.yaml
    
    According to the Micrel PHY dt-binding:
    Documentation/devicetree/bindings/net/micrel-ksz90x1.txt,
    Add clock delay in an Ethernet OF device node is deprecated, so move
    these properties to PHY OF device node.
    
    Suggested-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Jul 21, 2021
  5. dt-bindings: net: fsl,fec: improve the binding a bit

    This patch improves the yaml a bit according to Rob Herring comments:
    1) normalize interrupt-names property, there is no reason to support
    random order.
    2) validate each string in clock-names property.
    3) add constraints for fsl,num-tx-queues/fsl,num-rx-queues property.
    4) change additionalProperties to false in order to do strict checking.
    
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Jul 21, 2021
  6. tcp: tweak len/truesize ratio for coalesce candidates

    tcp_grow_window() is using skb->len/skb->truesize to increase tp->rcv_ssthresh
    which has a direct impact on advertized window sizes.
    
    We added TCP coalescing in linux-3.4 & linux-3.5:
    
    Instead of storing skbs with one or two MSS in receive queue (or OFO queue),
    we try to append segments together to reduce memory overhead.
    
    High performance network drivers tend to cook skb with 3 parts :
    
    1) sk_buff structure (256 bytes)
    2) skb->head contains room to copy headers as needed, and skb_shared_info
    3) page fragment(s) containing the ~1514 bytes frame (or more depending on MTU)
    
    Once coalesced into a previous skb, 1) and 2) are freed.
    
    We can therefore tweak the way we compute len/truesize ratio knowing
    that skb->truesize is inflated by 1) and 2) soon to be freed.
    
    This is done only for in-order skb, or skb coalesced into OFO queue.
    
    The result is that low rate flows no longer pay the memory price of having
    low GRO aggregation factor. Same result for drivers not using GRO.
    
    This is critical to allow a big enough receiver window,
    typically tcp_rmem[2] / 2.
    
    We have been using this at Google for about 5 years, it is due time
    to make it upstream.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Soheil Hassas Yeganeh <soheil@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    neebe000 authored and davem330 committed Jul 21, 2021
  7. net: bridge: multicast: fix igmp/mld port context null pointer derefe…

    …rences
    
    With the recent change to use bridge/port multicast context pointers
    instead of bridge/port I missed to convert two locations which pass the
    port pointer as-is, but with the new model we need to verify the port
    context is non-NULL first and retrieve the port from it. The first
    location is when doing querier selection when a query is received, the
    second location is when leaving a group. The port context will be null
    if the packets originated from the bridge device (i.e. from the host).
    The fix is simple just check if the port context exists and retrieve
    the port pointer from it.
    
    Fixes: adc4703 ("net: bridge: multicast: use multicast contexts instead of bridge or port")
    Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Nikolay Aleksandrov authored and davem330 committed Jul 21, 2021
  8. ionic: drop useless check of PCI driver data validity

    The driver core will call to .remove callback only if .probe succeeded
    and it will ensure that driver data has pointer to struct ionic.
    
    There is no need to check it again.
    
    Fixes: fbfb803 ("ionic: Add hardware init and device commands")
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Acked-by: Shannon Nelson <snelson@pensando.io>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Leon Romanovsky authored and davem330 committed Jul 21, 2021
  9. tcp: avoid indirect call in tcp_new_space()

    For tcp sockets, sk->sk_write_space is most probably sk_stream_write_space().
    
    Other sk->sk_write_space() calls in TCP are slow path and do not deserve
    any change.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    neebe000 authored and davem330 committed Jul 21, 2021
  10. net: wwan: iosm: Switch to use module_pci_driver() macro

    Eliminate some boilerplate code by using module_pci_driver() instead of
    init/exit, moving the salient bits from init into probe.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    andy-shev authored and davem330 committed Jul 21, 2021
  11. usb: hso: remove the bailout parameter

    There are two invocation sites of hso_free_net_device. After
    refactoring hso_create_net_device, this parameter is useless.
    Remove the bailout in the hso_free_net_device and change the invocation
    sites of this function.
    
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    mudongliang authored and davem330 committed Jul 21, 2021
  12. usb: hso: fix error handling code of hso_create_net_device

    The current error handling code of hso_create_net_device is
    hso_free_net_device, no matter which errors lead to. For example,
    WARNING in hso_free_net_device [1].
    
    Fix this by refactoring the error handling code of
    hso_create_net_device by handling different errors by different code.
    
    [1] https://syzkaller.appspot.com/bug?id=66eff8d49af1b28370ad342787413e35bbe76efe
    
    Reported-by: syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com
    Fixes: 5fcfb6d ("hso: fix bailout in error case of probe")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    mudongliang authored and davem330 committed Jul 21, 2021
  13. i40e: add support for PTP external synchronization clock

    Add support for external synchronization clock via GPIOs.
    1PPS signals are handled via the dedicated 3 GPIOs: SDP3_2,
    SDP3_3 and GPIO_4.
    Previously it was not possible to use the external PTP
    synchronization clock.
    All possible HW configurations are supported.
    	SDP3_2,	SDP3_3,	GPIO_4
    	off,	off,	off
    	off,	in_A,	off
    	off,	out_A,	off
    	off,	in_B,	off
    	off,	out_B,	off
    	in_A,	off,	off
    	in_A,	in_B,	off
    	in_A,	out_B,	off
    	out_A,	off,	off
    	out_A,	in_B,	off
    	in_B,	off,	off
    	in_B,	in_A,	off
    	in_B,	out_A,	off
    	out_B,	off,	off
    	out_B,	in_A,	off
    	off,	off,	in_A
    	off,	out_A,	in_A
    	off,	in_B,	in_A
    	off,	out_B,	in_A
    	out_A,	off,	in_A
    	out_A,	in_B,	in_A
    	in_B,	off,	in_A
    	in_B,	out_A,	in_A
    	out_B,	off,	in_A
    	off,	off,	out_A
    	off,	in_A,	out_A
    	off,	in_B,	out_A
    	off,	out_B,	out_A
    	in_A,	off,	out_A
    	in_A,	in_B,	out_A
    	in_A,	out_B,	out_A
    	in_B,	off,	out_A
    	in_B,	in_A,	out_A
    	out_B,	off,	out_A
    	out_B,	in_A,	out_A
    	off,	off,	in_B
    	off,	in_A,	in_B
    	off,	out_A,	in_B
    	off,	out_B,	in_B
    	in_A,	off,	in_B
    	in_A,	out_B,	in_B
    	out_A,	off,	in_B
    	out_B,	off,	in_B
    	out_B,	in_A,	in_B
    	off,	off,	out_B
    	off,	in_A,	out_B
    	off,	out_A,	out_B
    	off,	in_B,	out_B
    	in_A,	off,	out_B
    	in_A,	in_B,	out_B
    	out_A,	off,	out_B
    	out_A,	in_B,	out_B
    	in_B,	off,	out_B
    	in_B,	in_A,	out_B
    	in_B,	out_A,	out_B
    
    Tested with oscilloscope, 1PPS generator and ts2phc.
    
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
    Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
    Tested-by: Ashish K <ashishx.k@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    pkwapuli authored and davem330 committed Jul 21, 2021
  14. net: ipv4: Consolidate ipv4_mtu and ip_dst_mtu_maybe_forward

    Consolidate IPv4 MTU code the same way it is done in IPv6 to have code
    aligned in both address families
    
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vvfedorenko authored and davem330 committed Jul 21, 2021
  15. net: ipv6: introduce ip6_dst_mtu_maybe_forward

    Replace ip6_dst_mtu_forward with ip6_dst_mtu_maybe_forward and
    reuse this code in ip6_mtu. Actually these two functions were
    almost duplicates, this change will simplify the maintaince of
    mtu calculation code.
    
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vvfedorenko authored and davem330 committed Jul 21, 2021
  16. Merge branch 'ipv6-ioam'

    Justin Iurman says:
    
    ====================
    Support for the IOAM Pre-allocated Trace with IPv6
    
    v5:
     - Refine types, min/max and default values for new sysctls
     - Introduce a "_wide" sysctl for each "ioam6_id" sysctl
     - Add more validation on headers before processing data
     - RCU for sc <> ns pointers + appropriate accessors
     - Generic Netlink policies are now per op, not per family anymore
     - Address other comments/remarks from Jakub (thanks again)
     - Revert "__packed" to "__attribute__((packed))" for uapi headers
     - Add tests to cover the functionality added, as requested by David Ahern
    
    v4:
     - Address warnings from checkpatch (ignore errors related to unnamed bitfields
       in the first patch)
     - Use of hweight32 (thanks Jakub)
     - Remove inline keyword from static functions in C files and let the compiler
       decide what to do (thanks Jakub)
    
    v3:
     - Fix warning "unused label 'out_unregister_genl'" by adding conditional macro
     - Fix lwtunnel output redirect bug: dst cache useless in this case, use
       orig_output instead
    
    v2:
     - Fix warning with static for __ioam6_fill_trace_data
     - Fix sparse warning with __force when casting __be64 to __be32
     - Fix unchecked dereference when removing IOAM namespaces or schemas
     - exthdrs.c: Don't drop by default (now: ignore) to match the act bits "00"
     - Add control plane support for the inline insertion (lwtunnel)
     - Provide uapi structures
     - Use __net_timestamp if skb->tstamp is empty
     - Add note about the temporary IANA allocation
     - Remove support for "removable" TLVs
     - Remove support for virtual/anonymous tunnel decapsulation
    
    In-situ Operations, Administration, and Maintenance (IOAM) records
    operational and telemetry information in a packet while it traverses
    a path between two points in an IOAM domain. It is defined in
    draft-ietf-ippm-ioam-data [1]. IOAM data fields can be encapsulated
    into a variety of protocols. The IPv6 encapsulation is defined in
    draft-ietf-ippm-ioam-ipv6-options [2], via extension headers. IOAM
    can be used to complement OAM mechanisms based on e.g. ICMP or other
    types of probe packets.
    
    This patchset implements support for the Pre-allocated Trace, carried
    by a Hop-by-Hop. Therefore, a new IPv6 Hop-by-Hop TLV option is
    introduced, see IANA [3]. The three other IOAM options are not included
    in this patchset (Incremental Trace, Proof-of-Transit and Edge-to-Edge).
    The main idea behind the IOAM Pre-allocated Trace is that a node
    pre-allocates some room in packets for IOAM data. Then, each IOAM node
    on the path will insert its data. There exist several interesting use-
    cases, e.g. Fast failure detection/isolation or Smart service selection.
    Another killer use-case is what we have called Cross-Layer Telemetry,
    see the demo video on its repository [4], that aims to make the entire
    stack (L2/L3 -> L7) visible for distributed tracing tools (e.g. Jaeger),
    instead of the current L5 -> L7 limited view. So, basically, this is a
    nice feature for the Linux Kernel.
    
    This patchset also provides support for the control plane part, but only for the
    inline insertion (host-to-host use case), through lightweight tunnels. Indeed,
    for in-transit traffic, the solution is to have an IPv6-in-IPv6 encapsulation,
    which brings some difficulties and still requires a little bit of work and
    discussion (ie anonymous tunnel decapsulation and multi egress resolution).
    
    - Patch 1: IPv6 IOAM headers definition
    - Patch 2: Data plane support for Pre-allocated Trace
    - Patch 3: IOAM Generic Netlink API
    - Patch 4: Support for IOAM injection with lwtunnels
    - Patch 5: Documentation for new IOAM sysctls
    - Patch 6: Test for the IOAM insertion with IPv6
    
      [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-data
      [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options
      [3] https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-2
      [4] https://github.com/iurmanj/cross-layer-telemetry
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jul 21, 2021
  17. selftests: net: Test for the IOAM insertion with IPv6

    This test evaluates the IOAM insertion for IPv6 by checking the IOAM data
    integrity on the receiver.
    
    The topology is formed by 3 nodes: Alpha (sender), Beta (router in-between)
    and Gamma (receiver). An IOAM domain is configured from Alpha to Gamma only,
    which means not on the reverse path. When Gamma is the destination, Alpha
    adds an IOAM option (Pre-allocated Trace) inside a Hop-by-hop and fills the
    trace with its own IOAM data. Beta and Gamma also fill the trace. The IOAM
    data integrity is checked on Gamma, by comparing with the pre-defined IOAM
    configuration (see below).
    
        +-------------------+            +-------------------+
        |                   |            |                   |
        |    alpha netns    |            |    gamma netns    |
        |                   |            |                   |
        |  +-------------+  |            |  +-------------+  |
        |  |    veth0    |  |            |  |    veth0    |  |
        |  |  db01::2/64 |  |            |  |  db02::2/64 |  |
        |  +-------------+  |            |  +-------------+  |
        |         .         |            |         .         |
        +-------------------+            +-------------------+
                  .                                .
                  .                                .
                  .                                .
        +----------------------------------------------------+
        |         .                                .         |
        |  +-------------+                  +-------------+  |
        |  |    veth0    |                  |    veth1    |  |
        |  |  db01::1/64 | ................ |  db02::1/64 |  |
        |  +-------------+                  +-------------+  |
        |                                                    |
        |                      beta netns                    |
        |                                                    |
        +--------------------------+-------------------------+
    
    ~~~~~~~~~~~~~~~~~~~~~~
    | IOAM configuration |
    ~~~~~~~~~~~~~~~~~~~~~~
    
    Alpha
    +-----------------------------------------------------------+
    | Type                | Value                               |
    +-----------------------------------------------------------+
    | Node ID             | 1                                   |
    +-----------------------------------------------------------+
    | Node Wide ID        | 11111111                            |
    +-----------------------------------------------------------+
    | Ingress ID          | 0xffff (default value)              |
    +-----------------------------------------------------------+
    | Ingress Wide ID     | 0xffffffff (default value)          |
    +-----------------------------------------------------------+
    | Egress ID           | 101                                 |
    +-----------------------------------------------------------+
    | Egress Wide ID      | 101101                              |
    +-----------------------------------------------------------+
    | Namespace Data      | 0xdeadbee0                          |
    +-----------------------------------------------------------+
    | Namespace Wide Data | 0xcafec0caf00dc0de                  |
    +-----------------------------------------------------------+
    | Schema ID           | 777                                 |
    +-----------------------------------------------------------+
    | Schema Data         | something that will be 4n-aligned   |
    +-----------------------------------------------------------+
    
    Note: When Gamma is the destination, Alpha adds an IOAM Pre-allocated Trace
          option inside a Hop-by-hop, where 164 bytes are pre-allocated for the
          trace, with 123 as the IOAM-Namespace and with 0xfff00200 as the trace
          type (= all available options at this time). As a result, and based on
          IOAM configurations here, only both Alpha and Beta should be capable of
          inserting their IOAM data while Gamma won't have enough space and will
          set the overflow bit.
    
    Beta
    +-----------------------------------------------------------+
    | Type                | Value                               |
    +-----------------------------------------------------------+
    | Node ID             | 2                                   |
    +-----------------------------------------------------------+
    | Node Wide ID        | 22222222                            |
    +-----------------------------------------------------------+
    | Ingress ID          | 201                                 |
    +-----------------------------------------------------------+
    | Ingress Wide ID     | 201201                              |
    +-----------------------------------------------------------+
    | Egress ID           | 202                                 |
    +-----------------------------------------------------------+
    | Egress Wide ID      | 202202                              |
    +-----------------------------------------------------------+
    | Namespace Data      | 0xdeadbee1                          |
    +-----------------------------------------------------------+
    | Namespace Wide Data | 0xcafec0caf11dc0de                  |
    +-----------------------------------------------------------+
    | Schema ID           | 0xffffff (= None)                   |
    +-----------------------------------------------------------+
    | Schema Data         |                                     |
    +-----------------------------------------------------------+
    
    Gamma
    +-----------------------------------------------------------+
    | Type                | Value                               |
    +-----------------------------------------------------------+
    | Node ID             | 3                                   |
    +-----------------------------------------------------------+
    | Node Wide ID        | 3333333                            |
    +-----------------------------------------------------------+
    | Ingress ID          | 301                                 |
    +-----------------------------------------------------------+
    | Ingress Wide ID     | 301301                              |
    +-----------------------------------------------------------+
    | Egress ID           | 0xffff (default value)              |
    +-----------------------------------------------------------+
    | Egress Wide ID      | 0xffffffff (default value)          |
    +-----------------------------------------------------------+
    | Namespace Data      | 0xdeadbee2                          |
    +-----------------------------------------------------------+
    | Namespace Wide Data | 0xcafec0caf22dc0de                  |
    +-----------------------------------------------------------+
    | Schema ID           | 0xffffff (= None)                   |
    +-----------------------------------------------------------+
    | Schema Data         |                                     |
    +-----------------------------------------------------------+
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  18. ipv6: ioam: Documentation for new IOAM sysctls

    Add documentation for new IOAM sysctls:
     - ioam6_id and ioam6_id_wide: two per-namespace sysctls
     - ioam6_enabled, ioam6_id and ioam6_id_wide: three per-interface sysctls
    
    Example of IOAM configuration based on the following simple topology:
    
     _____              _____              _____
    |     | eth0  eth0 |     | eth1  eth0 |     |
    |  A  |.----------.|  B  |.----------.|  C  |
    |_____|            |_____|            |_____|
    
    1) Node and interface IDs can be configured for IOAM:
    
      # IOAM ID of A = 1, IOAM ID of A.eth0 = 11
      (A) sysctl -w net.ipv6.ioam6_id=1
      (A) sysctl -w net.ipv6.conf.eth0.ioam6_id=11
    
      # IOAM ID of B = 2, IOAM ID of B.eth0 = 21, IOAM ID of B.eth1 = 22
      (B) sysctl -w net.ipv6.ioam6_id=2
      (B) sysctl -w net.ipv6.conf.eth0.ioam6_id=21
      (B) sysctl -w net.ipv6.conf.eth1.ioam6_id=22
    
      # IOAM ID of C = 3, IOAM ID of C.eth0 = 31
      (C) sysctl -w net.ipv6.ioam6_id=3
      (C) sysctl -w net.ipv6.conf.eth0.ioam6_id=31
    
      Note that "_wide" IDs equivalents can be configured the same way.
    
    2) Each node can be configured to form an IOAM domain. For instance,
       we allow IOAM from A to C only (not the reverse path), i.e. enable
       IOAM on ingress for B.eth0 and C.eth0:
    
      (B) sysctl -w net.ipv6.conf.eth0.ioam6_enabled=1
      (C) sysctl -w net.ipv6.conf.eth0.ioam6_enabled=1
    
    3) An IOAM domain (e.g. ID=123) is defined and made known to each node:
    
      (A) ip ioam namespace add 123
      (B) ip ioam namespace add 123
      (C) ip ioam namespace add 123
    
    4) Finally, an IOAM Pre-allocated Trace can be inserted in traffic sent
       by A when C (e.g. db02::2) is the destination:
    
      (A) ip -6 route add db02::2/128 encap ioam6 trace type 0x800000 ns 123
          size 12 dev eth0
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  19. ipv6: ioam: Support for IOAM injection with lwtunnels

    Add support for the IOAM inline insertion (only for the host-to-host use case)
    which is per-route configured with lightweight tunnels. The target is iproute2
    and the patch is ready. It will be posted as soon as this patchset is merged.
    Here is an overview:
    
    $ ip -6 ro ad fc00::1/128 encap ioam6 trace type 0x800000 ns 1 size 12 dev eth0
    
    This example configures an IOAM Pre-allocated Trace option attached to the
    fc00::1/128 prefix. The IOAM namespace (ns) is 1, the size of the pre-allocated
    trace data block is 12 octets (size) and only the first IOAM data (bit 0:
    hop_limit + node id) is included in the trace (type) represented as a bitfield.
    
    The reason why the in-transit (IPv6-in-IPv6 encapsulation) use case is not
    implemented is explained on the patchset cover.
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  20. ipv6: ioam: IOAM Generic Netlink API

    Add Generic Netlink commands to allow userspace to configure IOAM
    namespaces and schemas. The target is iproute2 and the patch is ready.
    It will be posted as soon as this patchset is merged. Here is an overview:
    
    $ ip ioam
    Usage:	ip ioam { COMMAND | help }
    	ip ioam namespace show
    	ip ioam namespace add ID [ data DATA32 ] [ wide DATA64 ]
    	ip ioam namespace del ID
    	ip ioam schema show
    	ip ioam schema add ID DATA
    	ip ioam schema del ID
    	ip ioam namespace set ID schema { ID | none }
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  21. ipv6: ioam: Data plane support for Pre-allocated Trace

    Implement support for processing the IOAM Pre-allocated Trace with IPv6,
    see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option, see IANA [3].
    
    A new per-interface sysctl is introduced. The value is a boolean to accept (=1)
    or ignore (=0, by default) IPv6 IOAM options on ingress for an interface:
     - net.ipv6.conf.XXX.ioam6_enabled
    
    Two other sysctls are introduced to define IOAM IDs, represented by an integer.
    They are respectively per-namespace and per-interface:
     - net.ipv6.ioam6_id
     - net.ipv6.conf.XXX.ioam6_id
    
    The value of the first one represents the IOAM ID of the node itself (u32; max
    and default value = U32_MAX>>8, due to hop limit concatenation) while the other
    represents the IOAM ID of an interface (u16; max and default value = U16_MAX).
    
    Each "ioam6_id" sysctl has a "_wide" equivalent:
     - net.ipv6.ioam6_id_wide
     - net.ipv6.conf.XXX.ioam6_id_wide
    
    The value of the first one represents the wide IOAM ID of the node itself (u64;
    max and default value = U64_MAX>>8, due to hop limit concatenation) while the
    other represents the wide IOAM ID of an interface (u32; max and default value
    = U32_MAX).
    
    The use of short and wide equivalents is not exclusive, a deployment could
    choose to leverage both. For example, net.ipv6.conf.XXX.ioam6_id (short format)
    could be an identifier for a physical interface, whereas
    net.ipv6.conf.XXX.ioam6_id_wide (wide format) could be an identifier for a
    logical sub-interface. Documentation about new sysctls is provided at the end
    of this patchset.
    
    Two relativistic hash tables are used: one for IOAM namespaces, the other for
    IOAM schemas. A namespace can only have a single active schema and a schema
    can only be attached to a single namespace (1:1 relationship).
    
      [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options
      [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-data
      [3] https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-2
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  22. uapi: IPv6 IOAM headers definition

    This patch provides the IPv6 IOAM option header [1] as well as the IOAM
    Trace header [2]. An IOAM option must be 4n-aligned. Here is an overview of
    a Hop-by-Hop with an IOAM Trace option:
    
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next header  |  Hdr Ext Len  |    Padding    |    Padding    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Option Type  |  Opt Data Len |    Reserved   |   IOAM Type   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Namespace-ID          | NodeLen | Flags | RemainingLen|
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                IOAM-Trace-Type                |    Reserved   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
    |                                                               |  |
    |                         node data [n]                         |  |
    |                                                               |  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  D
    |                                                               |  a
    |                         node data [n-1]                       |  t
    |                                                               |  a
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ~                             ...                               ~  S
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  p
    |                                                               |  a
    |                         node data [1]                         |  c
    |                                                               |  e
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
    |                                                               |  |
    |                         node data [0]                         |  |
    |                                                               |  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
    
    The IOAM option header starts at "Option Type" and ends after "IOAM
    Type". The IOAM Trace header starts at "Namespace-ID" and ends after
    "IOAM-Trace-Type/Reserved".
    
    IOAM Type: either Pre-allocated Trace (=0), Incremental Trace (=1),
    Proof-of-Transit (=2) or Edge-to-Edge (=3). Note that both the
    Pre-allocated Trace and the Incremental Trace look the same. The two
    others are not implemented.
    
    Namespace-ID: IOAM namespace identifier, not to be confused with network
    namespaces. It adds further context to IOAM options and associated data,
    and allows devices which are IOAM capable to determine whether IOAM
    options must be processed or ignored. It can also be used by an operator
    to distinguish different operational domains or to identify different
    sets of devices.
    
    NodeLen: Length of data added by each node. It depends on the Trace
    Type.
    
    Flags: Only the Overflow (O) flag for now. The O flag is set by a
    transit node when there are not enough octets left to record its data.
    
    RemainingLen: Remaining free space to record data.
    
    IOAM-Trace-Type: Bit field where each bit corresponds to a specific kind
    of IOAM data. See [2] for a detailed list.
    
      [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options
      [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-data
    
    Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IurmanJ authored and davem330 committed Jul 21, 2021
  23. net: switchdev: recurse into __switchdev_handle_fdb_del_to_device

    The difference between __switchdev_handle_fdb_del_to_device and
    switchdev_handle_del_to_device is that the former takes an extra
    orig_dev argument, while the latter starts with dev == orig_dev.
    
    We should recurse into the variant that does not lose the orig_dev along
    the way. This is relevant when deleting FDB entries pointing towards a
    bridge (dev changes to the lower interfaces, but orig_dev shouldn't).
    
    The addition helper already recurses properly, just the deletion one
    doesn't.
    
    Fixes: 8ca0717 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vladimiroltean authored and davem330 committed Jul 21, 2021
  24. net: switchdev: remove stray semicolon in switchdev_handle_fdb_del_to…

    …_device shim
    
    With the semicolon at the end, the compiler sees the shim function as a
    declaration and not as a definition, and warns:
    
    'switchdev_handle_fdb_del_to_device' declared 'static' but never defined
    
    Reported-by: kernel test robot <lkp@intel.com>
    Fixes: 8ca0717 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vladimiroltean authored and davem330 committed Jul 21, 2021
  25. net: phy: at803x: finish the phy id checking simplification

    The blamed commit was probably not tested on net-next, since it did not
    refactor the extra phy id check introduced in commit b856150 ("net:
    phy: at803x: mask 1000 Base-X link mode").
    
    Fixes: 8887ca5 ("net: phy: at803x: simplify custom phy id matching")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vladimiroltean authored and davem330 committed Jul 21, 2021
  26. net: phylink: cleanup ksettings_set

    We only need to fiddle about with the supported mask after we have
    validated the user's requested parameters. Simplify and streamline the
    code by moving the linkmode copy and update of the autoneg bit after
    validating the user's request.
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Jul 21, 2021

Commits on Jul 20, 2021

  1. Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/…

    …tnguy/next-queue
    
    Tony Nguyen says:
    
    ====================
    1GbE Intel Wired LAN Driver Updates 2021-07-20
    
    This series contains updates to e1000e and igc drivers.
    
    Sasha adds initial S0ix support for devices with CSME and adds polling
    for exiting of DPG. He sets the PHY to low power idle when in S0ix. He
    also adds support for new device IDs for and adds a space to debug
    messaging to help with readability for e1000e.
    
    For igc, he ensures that q_vector array is not accessed beyond its
    bounds and removes unneeded PHY related checks.
    
    Tree Davies corrects a spelling mistake in e1000e.
    
    Muhammad corrects the value written when there is no TSN offloading
    and adjusts timeout value to avoid possible Tx hang for igc.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jul 20, 2021
  2. arm64: dts: imx8mp: change interrupt order per dt-binding

    This patch changs interrupt order which found by dtbs_check.
    
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
    arch/arm64/boot/dts/freescale/imx8mp-evk.dt.yaml: ethernet@30bf0000: interrupt-names:0: 'macirq' was expected
    arch/arm64/boot/dts/freescale/imx8mp-evk.dt.yaml: ethernet@30bf0000: interrupt-names:1: 'eth_wake_irq' was expected
    
    According to Documentation/devicetree/bindings/net/snps,dwmac.yaml, we
    should list interrupt in it's order.
    
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Jul 20, 2021
  3. dt-bindings: net: imx-dwmac: convert imx-dwmac bindings to yaml

    In order to automate the verification of DT nodes covert imx-dwmac to
    nxp,dwmac-imx.yaml, and pass below checking.
    
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
    
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Jul 20, 2021
  4. dt-bindings: net: snps,dwmac: add missing DWMAC IP version

    Add missing DWMAC IP version in snps,dwmac.yaml which found by below
    command, as NXP i.MX8 families support SNPS DWMAC 5.10a IP.
    
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
    Documentation/devicetree/bindings/net/nxp,dwmac-imx.example.dt.yaml:
    ethernet@30bf0000: compatible: None of ['nxp,imx8mp-dwmac-eqos', 'snps,dwmac-5.10a'] are valid under the given schema
    
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Jul 20, 2021
  5. igc: Increase timeout value for Speed 100/1000/2500

    As the cycle time is set to maximum of 1s, the TX Hang timeout need to
    be increase to avoid possible TX Hang.
    
    There is no dedicated number specific in data sheet for the timeout factor.
    Timeout factor was determined during the debugging to solve the "Tx Hang"
    issues that happen in some cases mainly during ETF(Earliest TxTime First).
    
    This can be test by using TSN Schedule Tx Tools udp_tai sample application.
    
    Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
    Acked-by: Sasha Neftin <sasha.neftin@intel.com>
    Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    zulkifl3 authored and anguy11 committed Jul 20, 2021
  6. igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling

    According to datasheet section 8.12.19, when there's no TSN offloading
    Shadow_QbvCycle bit[29:0] must be set to zero for basic scheduling.
    
    Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
    Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    zulkifl3 authored and anguy11 committed Jul 20, 2021
Older