1. 06 11月, 2019 7 次提交
    • M
      icmp: remove duplicate code · 54074f1d
      Matteo Croce 提交于
      The same code which recognizes ICMP error packets is duplicated several
      times. Use the icmp_is_err() and icmpv6_is_err() helpers instead, which
      do the same thing.
      
      ip_multipath_l3_keys() and tcf_nat_act() didn't check for all the error types,
      assume that they should instead.
      Signed-off-by: NMatteo Croce <mcroce@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54074f1d
    • M
      icmp: add helpers to recognize ICMP error packets · 15122464
      Matteo Croce 提交于
      Add two helper functions, one for IPv4 and one for IPv6, to recognize
      the ICMP packets which are error responses.
      This packets are special because they have as payload the original
      header of the packet which generated it (RFC 792 says at least 8 bytes,
      but Linux actually includes much more than that).
      Signed-off-by: NMatteo Croce <mcroce@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15122464
    • D
      Merge branch 'netvsc-RSS-related-patches' · b8fed591
      David S. Miller 提交于
      Stephen Hemminger says:
      
      ====================
      netvsc: RSS related patches
      
      Address a couple of issues related to recording RSS hash
      value in skb. These were found by reviewing RSS support.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8fed591
    • S
      hv_netvsc: record hardware hash in skb · 1fac7ca4
      Stephen Hemminger 提交于
      Since RSS hash is available from the host, record it in
      the skb.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1fac7ca4
    • S
      hv_netvsc: flag software created hash value · df9f540c
      Stephen Hemminger 提交于
      When the driver needs to create a hash value because it
      was not done at higher level, then the hash should be marked
      as a software not hardware hash.
      
      Fixes: f72860af ("hv_netvsc: Exclude non-TCP port numbers from vRSS hashing")
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df9f540c
    • D
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 39069faa
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2019-11-04
      
      This series contains updates to the ice driver only.
      
      Anirudh refactors the code to reduce the kernel configuration flags and
      introduces ice_base.c file.
      
      Maciej does additional refactoring on the configuring of transmit
      rings so that we are not configuring per each traffic class flow.
      Added support for XDP in the ice driver.  Provides additional
      re-organizing of the code in preparation for adding build_skb() support
      in the driver.  Adjusted the computational padding logic for headroom
      and tailroom to better support build_skb(), which also aligns with the
      logic in other Intel LAN drivers.  Added build_skb support and make use
      of the XDP's data_meta.
      
      Krzysztof refactors the driver to prepare for AF_XDP support in the
      driver and then adds support for AF_XDP.
      
      v2: Updated patch 3 of the series based on community feedback with the
          following changes...
          - return -EOPNOTSUPP instead of ENOTSUPP for too large MTU which makes
            it impossible to attach XDP prog
          - don't check for case when there's no XDP prog currently on interface
            and ice_xdp() is called with NULL bpf_prog; this happens when user
            does "ip link set eth0 xdp off" and no prog is present on VSI; no need
            for that as it is handled by higher layer
          - drop the extack message for unknown xdp->command
          - use the smp_processor_id() for accessing the XDP Tx ring for XDP_TX
            action
          - don't leave the interface in downed state in case of any failure
            during the XDP Tx resources handling
          - undo rename of ice_build_ctob
          The above changes caused a ripple effect in patches 4 & 5 to update
          references to ice_build_ctob() which are now build_ctob()
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39069faa
    • D
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · eeb2045b
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      10GbE Intel Wired LAN Driver Updates 2019-11-04
      
      This series contains old Halloween candy updates, yet still sweet, to
      fm10k, ixgbe and i40e.
      
      Jake adds the missing initializers for a couple of the TLV attribute
      macros.  Added support for capturing and reporting statistics for all of
      the VFs in a given PF.  Lastly, bump the version of the fm10k driver to
      reflect the recent changes.
      
      Alex addresses locality issues in the ixgbe driver when it is loaded on
      a system supporting multiple NUMA nodes.
      
      Manjunath Patil provides changes to the ixgbe driver, similar to those
      made to igb, to prevent transmit packets to request a hardware timestamp
      when the NIC has not been setup via the SIOCSHWTSTAMP ioctl.
      
      Alice adds support for x710 by adding the missing device id's in the
      appropriate places to ensure all the features are enabled in i40e.
      
      Jesse adds support for VF stats gathering in the i40e via the kernel
      via ndo_get_vf_stats function.
      
      v2: Fixed up commit id references in patch 5's description to align with
          how commit id's should be referenced.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eeb2045b
  2. 05 11月, 2019 26 次提交
  3. 04 11月, 2019 7 次提交
    • D
      Merge tag 'mlx5-updates-2019-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 1574cf83
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2019-11-01
      
      Misc updates for mlx5 netdev and core driver
      
      1) Steering Core: Replace CRC32 internal implementation with standard
         kernel lib.
      2) Steering Core: Support IPv4 and IPv6 mixed matcher.
      3) Steering Core: Lockless FTE read lookups
      4) TC: Bit sized fields rewrite support.
      5) FPGA: Standalone FPGA support.
      6) SRIOV: Reset VF parameters configurations on SRIOV disable.
      7) netdev: Dump WQs wqe descriptors on CQE with error events.
      8) MISC Cleanups.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1574cf83
    • Y
      mISDN: remove unused variable 'faxmodulation_s' · a37ac8ae
      YueHaibing 提交于
      drivers/isdn/hardware/mISDN/mISDNisar.c:30:17:
       warning: faxmodulation_s defined but not used [-Wunused-const-variable=]
      
      It is never used, so can be removed.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a37ac8ae
    • V
      ptp: Add a ptp clock driver for IDT ClockMatrix. · 3a6ba7dc
      Vincent Cheng 提交于
      The IDT ClockMatrix (TM) family includes integrated devices that provide
      eight PLL channels.  Each PLL channel can be independently configured as a
      frequency synthesizer, jitter attenuator, digitally controlled
      oscillator (DCO), or a digital phase lock loop (DPLL).  Typically
      these devices are used as timing references and clock sources for PTP
      applications.  This patch adds support for the device.
      Co-developed-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NVincent Cheng <vincent.cheng.xh@renesas.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a6ba7dc
    • V
      dt-bindings: ptp: Add device tree binding for IDT ClockMatrix based PTP clock · 5c5e7aac
      Vincent Cheng 提交于
      Add device tree binding doc for the IDT ClockMatrix PTP clock.
      Signed-off-by: NVincent Cheng <vincent.cheng.xh@renesas.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c5e7aac
    • F
      net: icmp6: provide input address for traceroute6 · fac6fce9
      Francesco Ruggeri 提交于
      traceroute6 output can be confusing, in that it shows the address
      that a router would use to reach the sender, rather than the address
      the packet used to reach the router.
      Consider this case:
      
              ------------------------ N2
               |                    |
             ------              ------  N3  ----
             | R1 |              | R2 |------|H2|
             ------              ------      ----
               |                    |
              ------------------------ N1
                        |
                       ----
                       |H1|
                       ----
      
      where H1's default route is through R1, and R1's default route is
      through R2 over N2.
      traceroute6 from H1 to H2 shows R2's address on N1 rather than on N2.
      
      The script below can be used to reproduce this scenario.
      
      traceroute6 output without this patch:
      
      traceroute to 2000:103::4 (2000:103::4), 30 hops max, 80 byte packets
       1  2000:101::1 (2000:101::1)  0.036 ms  0.008 ms  0.006 ms
       2  2000:101::2 (2000:101::2)  0.011 ms  0.008 ms  0.007 ms
       3  2000:103::4 (2000:103::4)  0.013 ms  0.010 ms  0.009 ms
      
      traceroute6 output with this patch:
      
      traceroute to 2000:103::4 (2000:103::4), 30 hops max, 80 byte packets
       1  2000:101::1 (2000:101::1)  0.056 ms  0.019 ms  0.006 ms
       2  2000:102::2 (2000:102::2)  0.013 ms  0.008 ms  0.008 ms
       3  2000:103::4 (2000:103::4)  0.013 ms  0.009 ms  0.009 ms
      
      #!/bin/bash
      #
      #        ------------------------ N2
      #         |                    |
      #       ------              ------  N3  ----
      #       | R1 |              | R2 |------|H2|
      #       ------              ------      ----
      #         |                    |
      #        ------------------------ N1
      #                  |
      #                 ----
      #                 |H1|
      #                 ----
      #
      # N1: 2000:101::/64
      # N2: 2000:102::/64
      # N3: 2000:103::/64
      #
      # R1's host part of address: 1
      # R2's host part of address: 2
      # H1's host part of address: 3
      # H2's host part of address: 4
      #
      # For example:
      # the IPv6 address of R1's interface on N2 is 2000:102::1/64
      #
      # Nets are implemented by macvlan interfaces (bridge mode) over
      # dummy interfaces.
      #
      
      # Create net namespaces
      ip netns add host1
      ip netns add host2
      ip netns add rtr1
      ip netns add rtr2
      
      # Create nets
      ip link add net1 type dummy; ip link set net1 up
      ip link add net2 type dummy; ip link set net2 up
      ip link add net3 type dummy; ip link set net3 up
      
      # Add interfaces to net1, move them to their nemaspaces
      ip link add link net1 dev host1net1 type macvlan mode bridge
      ip link set host1net1 netns host1
      ip link add link net1 dev rtr1net1 type macvlan mode bridge
      ip link set rtr1net1 netns rtr1
      ip link add link net1 dev rtr2net1 type macvlan mode bridge
      ip link set rtr2net1 netns rtr2
      
      # Add interfaces to net2, move them to their nemaspaces
      ip link add link net2 dev rtr1net2 type macvlan mode bridge
      ip link set rtr1net2 netns rtr1
      ip link add link net2 dev rtr2net2 type macvlan mode bridge
      ip link set rtr2net2 netns rtr2
      
      # Add interfaces to net3, move them to their nemaspaces
      ip link add link net3 dev rtr2net3 type macvlan mode bridge
      ip link set rtr2net3 netns rtr2
      ip link add link net3 dev host2net3 type macvlan mode bridge
      ip link set host2net3 netns host2
      
      # Configure interfaces and routes in host1
      ip netns exec host1 ip link set lo up
      ip netns exec host1 ip link set host1net1 up
      ip netns exec host1 ip -6 addr add 2000:101::3/64 dev host1net1
      ip netns exec host1 ip -6 route add default via 2000:101::1
      
      # Configure interfaces and routes in rtr1
      ip netns exec rtr1 ip link set lo up
      ip netns exec rtr1 ip link set rtr1net1 up
      ip netns exec rtr1 ip -6 addr add 2000:101::1/64 dev rtr1net1
      ip netns exec rtr1 ip link set rtr1net2 up
      ip netns exec rtr1 ip -6 addr add 2000:102::1/64 dev rtr1net2
      ip netns exec rtr1 ip -6 route add default via 2000:102::2
      ip netns exec rtr1 sysctl net.ipv6.conf.all.forwarding=1
      
      # Configure interfaces and routes in rtr2
      ip netns exec rtr2 ip link set lo up
      ip netns exec rtr2 ip link set rtr2net1 up
      ip netns exec rtr2 ip -6 addr add 2000:101::2/64 dev rtr2net1
      ip netns exec rtr2 ip link set rtr2net2 up
      ip netns exec rtr2 ip -6 addr add 2000:102::2/64 dev rtr2net2
      ip netns exec rtr2 ip link set rtr2net3 up
      ip netns exec rtr2 ip -6 addr add 2000:103::2/64 dev rtr2net3
      ip netns exec rtr2 sysctl net.ipv6.conf.all.forwarding=1
      
      # Configure interfaces and routes in host2
      ip netns exec host2 ip link set lo up
      ip netns exec host2 ip link set host2net3 up
      ip netns exec host2 ip -6 addr add 2000:103::4/64 dev host2net3
      ip netns exec host2 ip -6 route add default via 2000:103::2
      
      # Ping host2 from host1
      ip netns exec host1 ping6 -c5 2000:103::4
      
      # Traceroute host2 from host1
      ip netns exec host1 traceroute6 2000:103::4
      
      # Delete nets
      ip link del net3
      ip link del net2
      ip link del net1
      
      # Delete namespaces
      ip netns del rtr2
      ip netns del rtr1
      ip netns del host2
      ip netns del host1
      Signed-off-by: NFrancesco Ruggeri <fruggeri@arista.com>
      Original-patch-by: NHonggang Xu <hxu@arista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fac6fce9
    • T
      tipc: improve message bundling algorithm · 06e7c70c
      Tuong Lien 提交于
      As mentioned in commit e95584a8 ("tipc: fix unlimited bundling of
      small messages"), the current message bundling algorithm is inefficient
      that can generate bundles of only one payload message, that causes
      unnecessary overheads for both the sender and receiver.
      
      This commit re-designs the 'tipc_msg_make_bundle()' function (now named
      as 'tipc_msg_try_bundle()'), so that when a message comes at the first
      place, we will just check & keep a reference to it if the message is
      suitable for bundling. The message buffer will be put into the link
      backlog queue and processed as normal. Later on, when another one comes
      we will make a bundle with the first message if possible and so on...
      This way, a bundle if really needed will always consist of at least two
      payload messages. Otherwise, we let the first buffer go its way without
      any need of bundling, so reduce the overheads to zero.
      
      Moreover, since now we have both the messages in hand, we can even
      optimize the 'tipc_msg_bundle()' function, make bundle of a very large
      (size ~ MSS) and small messages which is not with the current algorithm
      e.g. [1400-byte message] + [10-byte message] (MTU = 1500).
      Acked-by: NYing Xue <ying.xue@windreiver.com>
      Acked-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06e7c70c
    • F
      net: icmp: use input address in traceroute · 2adf81c0
      Francesco Ruggeri 提交于
      Even with icmp_errors_use_inbound_ifaddr set, traceroute returns the
      primary address of the interface the packet was received on, even if
      the path goes through a secondary address. In the example:
      
                          1.0.3.1/24
       ---- 1.0.1.3/24    1.0.1.1/24 ---- 1.0.2.1/24    1.0.2.4/24 ----
       |H1|--------------------------|R1|--------------------------|H2|
       ----            N1            ----            N2            ----
      
      where 1.0.3.1/24 is R1's primary address on N1, traceroute from
      H1 to H2 returns:
      
      traceroute to 1.0.2.4 (1.0.2.4), 30 hops max, 60 byte packets
       1  1.0.3.1 (1.0.3.1)  0.018 ms  0.006 ms  0.006 ms
       2  1.0.2.4 (1.0.2.4)  0.021 ms  0.007 ms  0.007 ms
      
      After applying this patch, it returns:
      
      traceroute to 1.0.2.4 (1.0.2.4), 30 hops max, 60 byte packets
       1  1.0.1.1 (1.0.1.1)  0.033 ms  0.007 ms  0.006 ms
       2  1.0.2.4 (1.0.2.4)  0.011 ms  0.007 ms  0.007 ms
      Original-patch-by: NBill Fenner <fenner@arista.com>
      Signed-off-by: NFrancesco Ruggeri <fruggeri@arista.com>
      Reviewed-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2adf81c0