1. 18 4月, 2019 31 次提交
    • D
      net ipv6: Prevent neighbor add if protocol is disabled on device · b8fb1ab4
      David Ahern 提交于
      Disabling IPv6 on an interface removes existing entries but nothing prevents
      new entries from being manually added. To that end, add a new neigh_table
      operation, allow_add, that is called on RTM_NEWNEIGH to see if neighbor
      entries are allowed on a given device. If IPv6 is disabled on the device,
      allow_add returns false and passes a message back to the user via extack.
      
        $ echo 1 > /proc/sys/net/ipv6/conf/eth1/disable_ipv6
        $ ip -6 neigh add fe80::4c88:bff:fe21:2704 dev eth1 lladdr de:ad:be:ef:01:01
        Error: IPv6 is disabled on this device.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8fb1ab4
    • D
      Merge branch 'ipv6-Use-fib6_result-for-fib_lookups' · cea29a70
      David S. Miller 提交于
      David Ahern says:
      
      ====================
      ipv6: Use fib6_result for fib_lookups
      
      Add fib6_result as a single data structure to hold results from a fib
      lookup. IPv6 currently has everything in 1 data structure - a fib6_info,
      but with nexthop objects the fib6_nh can be in a nexthop or a nexthop
      can be a blackhole which affects the fib6_type and flags (REJECT).
      
      v2
      - fixed 2 bugs in patch12:
        i. checking return from fib6_table_lookup in fib6_lookup
        ii. call to fib6_rule_saddr in fib6_rule_action_alt should use res->nh
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cea29a70
    • D
      ipv6: Add fib6_type and fib6_flags to fib6_result · 7d21fec9
      David Ahern 提交于
      Add the fib6_flags and fib6_type to fib6_result. Update the lookup helpers
      to set them and update post fib lookup users to use the version from the
      result.
      
      This allows nexthop objects to have blackhole nexthop.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d21fec9
    • D
      ipv6: Pass fib6_result to fib lookups · effda4dd
      David Ahern 提交于
      Change fib6_lookup and fib6_table_lookup to take a fib6_result and set
      f6i and nh rather than returning a fib6_info. For now both always
      return 0.
      
      A later patch set can make these more like the IPv4 counterparts and
      return EINVAL, EACCESS, etc based on fib6_type.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      effda4dd
    • D
      ipv6: Pass fib6_result to fib6_table_lookup tracepoint · 8ff2e5b2
      David Ahern 提交于
      Change fib6_table_lookup tracepoint to take the fib6_result and use
      the fib6_info and fib6_nh from it.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ff2e5b2
    • D
      ipv6: Pass fib6_result to rt6_select and find_rr_leaf · b7bc4b6a
      David Ahern 提交于
      Pass fib6_result to rt6_select. Instead of returning the fib entry, it
      will set f6i and nh based on the lookup.
      
      find_rr_leaf is changed to remove the match option in favor of taking
      fib6_result and having __find_rr_leaf set f6i in the result.
      
      In the process, update fib6_info references in __find_rr_leaf to f6i names.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7bc4b6a
    • D
      ipv6: Pass fib6_result to rt6_device_match · 75ef7389
      David Ahern 提交于
      Pass fib6_result to rt6_device_match with f6i set. rt6_device_match
      updates f6i in the result if it finds a better match and sets nh.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75ef7389
    • D
      ipv6: Pass fib6_result to ip6_mtu_from_fib6 and fib6_mtu · b748f260
      David Ahern 提交于
      Change ip6_mtu_from_fib6 and fib6_mtu to take a fib6_result over a
      fib6_info. Update both to use the fib6_nh from fib6_result.
      
      Since the signature of ip6_mtu_from_fib6 is already changing, add const
      to daddr and saddr.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b748f260
    • D
      ipv6: Pass fib6_result to rt6_insert_exception · 5012f0a5
      David Ahern 提交于
      Update rt6_insert_exception to take a fib6_result over a fib6_info.
      Change ort to f6i from the fib6_result and rename to better reflect
      what it references (a fib6_info).
      
      Since this function is already getting changed, update the comments
      to reference fib6_info variables rather than the older rt6_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5012f0a5
    • D
      ipv6: Pass fib6_result to ip6_rt_get_dev_rcu and ip6_rt_copy_init · 0d161581
      David Ahern 提交于
      Now that all callers are update to have a fib6_result, pass it down
      to ip6_rt_get_dev_rcu, ip6_rt_copy_init, and ip6_rt_init_dst.
      
      In the process, change ort to f6i in ip6_rt_copy_init to make it
      clear it is a reference to a fib6_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d161581
    • D
      ipv6: Pass fib6_result to pcpu route functions · db3fedee
      David Ahern 提交于
      Update ip6_rt_pcpu_alloc, rt6_get_pcpu_route and rt6_make_pcpu_route
      to a fib6_result over a fib6_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db3fedee
    • D
      ipv6: Pass fib6_result to ip6_create_rt_rcu · 9b6b35ab
      David Ahern 提交于
      Change ip6_create_rt_rcu to take fib6_result over a fib6_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b6b35ab
    • D
      ipv6: Pass fib6_result to ip6_rt_cache_alloc · 85bd05de
      David Ahern 提交于
      Change ip6_rt_cache_alloc to take a fib6_result over a fib6_info.
      
      Since ip6_rt_cache_alloc is only the caller, update the
      rt6_is_gw_or_nonexthop helper to take fib6_result.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85bd05de
    • D
      ipv6: Pass fib6_result to rt6_find_cached_rt · 7e4b5128
      David Ahern 提交于
      Simplify rt6_find_cached_rt for the fast path cases and pass fib6_result
      to rt6_find_cached_rt. Rename the local return variable to ret to maintain
      consisting with fib6_result name.
      
      Update the comment in rt6_find_cached_rt to reference the new names in
      a fib6_info vs the old name when fib entries were an rt6_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e4b5128
    • D
      ipv6: Rename fib6_multipath_select and pass fib6_result · b1d40991
      David Ahern 提交于
      Add 'struct fib6_result' to hold the fib entry and fib6_nh from a fib
      lookup as separate entries, similar to what IPv4 now has with fib_result.
      
      Rename fib6_multipath_select to fib6_select_path, pass fib6_result to
      it, and set f6i and nh in the result once a path selection is done.
      Call fib6_select_path unconditionally for path selection which means
      moving the sibling and oif check to fib6_select_path. To handle the two
      different call paths (2 only call multipath_select if flowi6_oif == 0 and
      the other always calls it), add a new have_oif_match that controls the
      sibling walk if relevant.
      
      Update callers of fib6_multipath_select accordingly and have them use the
      fib6_info and fib6_nh from the result.
      
      This is needed for multipath nexthop objects where a single f6i can
      point to multiple fib6_nh (similar to IPv4).
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1d40991
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6b0a7f84
      David S. Miller 提交于
      Conflict resolution of af_smc.c from Stephen Rothwell.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b0a7f84
    • D
      Merge branch 's390-next' · cea0aa9c
      David S. Miller 提交于
      Julian Wiedmann says:
      
      ====================
      s390/qeth: updates 2019-04-17
      
      please apply some additional qeth patches to net-next. This patchset
      converts the driver to use the kernel's multiqueue model.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cea0aa9c
    • J
      s390/qeth: stop/wake TX queues based on their fill level · 54a50941
      Julian Wiedmann 提交于
      Current xmit code only stops the txq after attempting to fill an
      IO buffer that hasn't been TX-completed yet. In many-connection
      scenarios, this can result in frequent rejected TX attempts, requeuing
      of skbs with NETDEV_TX_BUSY and extra overhead.
      
      Now that we have a proper 1-to-1 relation between stack-side txqs and
      our HW Queues, overhaul the stop/wake logic so that the xmit code
      stops the txq as needed.
      Given that we might map multiple skbs into a single buffer, it's crucial
      to ensure that the queue always provides an _entirely_ empty IO buffer.
      Otherwise large skbs (eg TSO) might not fit into the last available
      buffer. So whenever qeth_do_send_packet() first utilizes an _empty_
      buffer, it updates & checks the used_buffers count.
      
      This now ensures that an skb passed to qeth_xmit() can always be mapped
      into an IO buffer, so remove all of the -EBUSY roll-back handling in the
      TX path. We preserve the minimal safety-checks ("Is this IO buffer
      really available?"), just in case some nasty future bug ever attempts to
      corrupt an in-use buffer.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54a50941
    • J
      s390/qeth: simplify QoS code · e6c15b5f
      Julian Wiedmann 提交于
      qeth_get_priority_queue() is no longer used for IQD devices, remove the
      special-casing of their mcast queue.
      
      This effectively reverts
      commit 70deb016 ("qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets").
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6c15b5f
    • J
      s390/qeth: add TX multiqueue support for OSA devices · 73dc2daf
      Julian Wiedmann 提交于
      This adds trivial support for multiple TX queues on OSA-style devices
      (both real HW and z/VM NICs). For now we expose the driver's existing
      QoS mechanism via .ndo_select_queue, and adjust the number of available
      TX queues when qeth_update_from_chp_desc() detects that the
      HW configuration has changed.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73dc2daf
    • J
      s390/qeth: add TX multiqueue support for IQD devices · 3a18d754
      Julian Wiedmann 提交于
      qeth has been supporting multiple HW Output Queues for a long time. But
      rather than exposing those queues to the stack, it uses its own queue
      selection logic in .ndo_start_xmit... with all the drawbacks that
      entails.
      Start off by switching IQD devices over to a proper mqs net_device,
      and converting all the netdev_queue management code.
      
      One oddity with IQD devices is the requirement to place all mcast
      traffic on the _highest_ established HW queue. Doing so via
      .ndo_select_queue seems straight-forward - but that won't work if only
      some of the HW queues are active
      (ie. when dev->real_num_tx_queues < dev->num_tx_queues), since
      netdev_cap_txqueue() will not allow us to put skbs on the higher queues.
      
      To make this work, we
      1. let .ndo_select_queue() map all mcast traffic to netdev_queue 0, and
      2. later re-map the netdev_queue and HW queue indices in
         .ndo_start_xmit and the TX completion handler.
      
      With this patch we default to a fixed set of 1 ucast and 1 mcast queue.
      Support for dynamic reconfiguration is added at a later time.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a18d754
    • J
      s390/qeth: don't keep statistics for tx timeout · 333ef9d1
      Julian Wiedmann 提交于
      struct netdev_queue contains a counter for tx timeouts, which gets
      updated by dev_watchdog(). So let's not attempt to maintain our own
      statistics, in particular not by overloading the skb-error counter.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      333ef9d1
    • J
      s390/qeth: don't bother updating the last-tx time · fdd1a530
      Julian Wiedmann 提交于
      As the documentation for netif_trans_update() says, netdev_start_xmit()
      already updates the last-tx time after every good xmit. So don't
      duplicate that effort.
      
      One odd case is that qeth_flush_buffers() also gets called from our
      TX completion handler, to flush out any partially filled buffer when
      we switch the queue to non-packing mode. But as the TX completion
      handler will _always_ wake the txq, we don't have to worry about
      the TX watchdog there.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fdd1a530
    • J
      s390/qeth: handle error from qeth_update_from_chp_desc() · a4cdc9ba
      Julian Wiedmann 提交于
      Subsequent code relies on the values that qeth_update_from_chp_desc()
      reads from the CHP descriptor. Rather than dealing with weird errors
      later on, just handle it properly here.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4cdc9ba
    • J
      s390/qeth: clarify naming for some QDIO helpers · 41c47da3
      Julian Wiedmann 提交于
      The naming of several QDIO helpers doesn't match their actual
      functionality, or the structures they operate on. Clean this up.
      
      s/qeth_alloc_qdio_buffers/qeth_alloc_qdio_queues
      s/qeth_free_qdio_buffers/qeth_free_qdio_queues
      s/qeth_alloc_qdio_out_buf/qeth_alloc_output_queue
      s/qeth_clear_outq_buffers/qeth_drain_output_queue
      s/qeth_clear_qdio_buffers/qeth_drain_output_queues
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41c47da3
    • D
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 3a6f7892
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2019-04-16
      
      This series contains updates to i40e driver only.
      
      Adam fixes i40e so that queues can be restored to its original value if
      configuring queue channels fails.  Bumped the maximum API version
      supported and added the API version to error messages to clarify
      supported firmware API versions.  Fixed the problem with the driver
      being able to add only 7 multicast MAC address filters instead of 16.
      
      Aleksandr adds support for Dynamic Device Personalization (DDP) which
      allows loading profiles that change the way internal parser interprets
      processed frames.
      
      Nick fixes an issue where if we modify the VLAN stripping options when a
      port VLAN is configured, it will break traffic for the VSI, so prevent
      changes from being made.
      
      Jake fixes an issue where a device reset can mess up the clock time
      because we reset the clock time based on the kernel time every reset.
      This causes us to potentially completely reset the PTP time, and can
      cause unexpected behavior in programs like ptp4l.
      
      Piotr fixes an LED blink issue with the 'ethtool -p' command, so that
      identification blinking will work on all hardware.
      
      Chinh fixed the error returned to correctly reflect the current state
      when LLDP or DCBx is not in an operational state.
      
      Grzegorz cleans up a misleading error message when untrusted VF tries to
      exceed addresses beyond the NIC limit.
      
      Carolyn fixes the error return code to correctly reflect the error case.
      
      v2: updated the URL provided in the DDP patch (#2)
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a6f7892
    • L
      Merge tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi · fe5cdef2
      Linus Torvalds 提交于
      Pull IPMI fixes from Corey Minyard:
       "Fixes for some bugs cause by recent changes. One crash if you feed bad
        data to the module parameters, one BUG that sometimes occurs when a
        user closes the connection, and one bug that cause the driver to not
        work if the configuration information only comes in from SMBIOS"
      
      * tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi:
        ipmi: fix sleep-in-atomic in free_user at cleanup SRCU user->release_barrier
        ipmi: ipmi_si_hardcode.c: init si_type array to fix a crash
        ipmi: Fix failure on SMBIOS specified devices
      fe5cdef2
    • D
      Merge branch 'stmmac-Enable-Flow-Control' · e77b8ba6
      David S. Miller 提交于
      Jose Abreu says:
      
      ====================
      net: stmmac: Enable Flow Control
      
      I don't know of any specific reason why Flow Control is off by default but
      do let me know if there is any.
      
      Tested in B2B between XGMAC2 and GMAC5.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e77b8ba6
    • J
      net: stmmac: Set Flow Control to automatic mode in the driver · e9989339
      Jose Abreu 提交于
      By default Flow Control feature is not being enabled in stmmac.
      
      This is a useful feature that can prevent loss of packets and now that
      XGMAC already supports it (along with GMAC and QoS) it makes sense to
      activate it.
      
      Switch the module parameter to FLOW_AUTO so that Flow Control is
      activated.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9989339
    • J
      net: stmmac: dwxgmac: Finish the Flow Control implementation · ff82cfc7
      Jose Abreu 提交于
      Finish the implementation of Flow Control feature. In order for it to
      work correctly we need to set EHFC bit and the correct threshold values
      for activating and deactivating it.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff82cfc7
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2a3a028f
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Handle init flow failures properly in iwlwifi driver, from Shahar S
          Matityahu.
      
       2) mac80211 TXQs need to be unscheduled on powersave start, from Felix
          Fietkau.
      
       3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau.
      
       4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed.
      
       5) Avoid checksum complete with XDP in mlx5, also from Saeed.
      
       6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon.
      
       7) Partial sent TLS record leak fix from Jakub Kicinski.
      
       8) Reject zero size iova range in vhost, from Jason Wang.
      
       9) Allow pending work to complete before clcsock release from Karsten
          Graul.
      
      10) Fix XDP handling max MTU in thunderx, from Matteo Croce.
      
      11) A lot of protocols look at the sa_family field of a sockaddr before
          validating it's length is large enough, from Tetsuo Handa.
      
      12) Don't write to free'd pointer in qede ptp error path, from Colin Ian
          King.
      
      13) Have to recompile IP options in ipv4_link_failure because it can be
          invoked from ARP, from Stephen Suryaputra.
      
      14) Doorbell handling fixes in qed from Denis Bolotin.
      
      15) Revert net-sysfs kobject register leak fix, it causes new problems.
          From Wang Hai.
      
      16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva.
      
      17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay
          Aleksandrov.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits)
        socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW
        tcp: tcp_grow_window() needs to respect tcp_space()
        ocelot: Clean up stats update deferred work
        ocelot: Don't sleep in atomic context (irqs_disabled())
        net: bridge: fix netlink export of vlan_stats_per_port option
        qed: fix spelling mistake "faspath" -> "fastpath"
        tipc: set sysctl_tipc_rmem and named_timeout right range
        tipc: fix link established but not in session
        net: Fix missing meta data in skb with vlan packet
        net: atm: Fix potential Spectre v1 vulnerabilities
        net/core: work around section mismatch warning for ptp_classifier
        net: bridge: fix per-port af_packet sockets
        bnx2x: fix spelling mistake "dicline" -> "decline"
        route: Avoid crash from dereferencing NULL rt->from
        MAINTAINERS: normalize Woojung Huh's email address
        bonding: fix event handling for stacked bonds
        Revert "net-sysfs: Fix memory leak in netdev_register_kobject"
        rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check
        qed: Fix the DORQ's attentions handling
        qed: Fix missing DORQ attentions
        ...
      2a3a028f
  2. 17 4月, 2019 9 次提交