1. 08 1月, 2018 5 次提交
    • I
      ipv6: Export sernum update function · 4a8e56ee
      Ido Schimmel 提交于
      We are going to allow dead routes to stay in the FIB tree (e.g., when
      they are part of a multipath route, directly connected route with no
      carrier) and revive them when their nexthop device gains carrier or when
      it is put administratively up.
      
      This is equivalent to the addition of the route to the FIB tree and we
      should therefore take care of updating the sernum of all the parent
      nodes of the node where the route is stored. Otherwise, we risk sockets
      caching and using sub-optimal dst entries.
      
      Export the function that performs the above, so that it could be invoked
      from fib6_ifup() later on.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a8e56ee
    • I
      ipv6: Add explicit flush indication to routes · a2c554d3
      Ido Schimmel 提交于
      When routes that are a part of a multipath route are evaluated by
      fib6_ifdown() in response to NETDEV_DOWN and NETDEV_UNREGISTER events
      the state of their sibling routes is not considered.
      
      This will change in subsequent patches in order to align IPv6 with
      IPv4's behavior. For example, when the last sibling in a multipath route
      becomes dead, the entire multipath route needs to be removed.
      
      To prevent the tree walker from re-evaluating all the sibling routes
      each time, we can simply evaluate them once - when the first sibling is
      traversed.
      
      If we determine the entire multipath route needs to be removed, then the
      'should_flush' bit is set in all the siblings, which will cause the
      walker to flush them when it traverses them.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2c554d3
    • I
      ipv6: Set nexthop flags upon carrier change · 27c6fa73
      Ido Schimmel 提交于
      Similar to IPv4, when the carrier of a netdev changes we should toggle
      the 'linkdown' flag on all the nexthops using it as their nexthop
      device.
      
      This will later allow us to test for the presence of this flag during
      route lookup and dump.
      
      Up until commit 4832c30d ("net: ipv6: put host and anycast routes on
      device with address") host and anycast routes used the loopback netdev
      as their nexthop device and thus were not marked with the 'linkdown'
      flag. The patch preserves this behavior and allows one to ping the local
      address even when the nexthop device does not have a carrier and the
      'ignore_routes_with_linkdown' sysctl is set.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27c6fa73
    • I
      ipv6: Prepare to handle multiple netdev events · 4c981e28
      Ido Schimmel 提交于
      To make IPv6 more in line with IPv4 we need to be able to respond
      differently to different netdev events. For example, when a netdev is
      unregistered all the routes using it as their nexthop device should be
      flushed, whereas when the netdev's carrier changes only the 'linkdown'
      flag should be toggled.
      
      Currently, this is not possible, as the function that traverses the
      routing tables is not aware of the triggering event.
      
      Propagate the triggering event down, so that it could be used in later
      patches.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4c981e28
    • I
      ipv6: Clear nexthop flags upon netdev up · 2127d95a
      Ido Schimmel 提交于
      Previous patch marked nexthops with the 'dead' and 'linkdown' flags.
      Clear these flags when the netdev comes back up.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2127d95a
  2. 06 1月, 2018 3 次提交
    • J
      xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg · c0124f32
      Jesper Dangaard Brouer 提交于
      The driver code qede_free_fp_array() depend on kfree() can be called
      with a NULL pointer. This stems from the qede_alloc_fp_array()
      function which either (kz)alloc memory for fp->txq or fp->rxq.
      This also simplifies error handling code in case of memory allocation
      failures, but xdp_rxq_info_unreg need to know the difference.
      
      Introduce xdp_rxq_info_is_reg() to handle if a memory allocation fails
      and detect this is the failure path by seeing that xdp_rxq_info was
      not registred yet, which first happens after successful alloaction in
      qede_init_fp().
      
      Driver hook points for xdp_rxq_info:
       * reg  : qede_init_fp
       * unreg: qede_free_fp_array
      
      Tested on actual hardware with samples/bpf program.
      
      V2: Driver have no proper error path for failed XDP RX-queue info reg, as
      qede_init_fp() is a void function.
      
      Cc: everest-linux-l2@cavium.com
      Cc: Ariel Elior <Ariel.Elior@cavium.com>
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      c0124f32
    • J
      xdp: base API for new XDP rx-queue info concept · aecd67b6
      Jesper Dangaard Brouer 提交于
      This patch only introduce the core data structures and API functions.
      All XDP enabled drivers must use the API before this info can used.
      
      There is a need for XDP to know more about the RX-queue a given XDP
      frames have arrived on.  For both the XDP bpf-prog and kernel side.
      
      Instead of extending xdp_buff each time new info is needed, the patch
      creates a separate read-mostly struct xdp_rxq_info, that contains this
      info.  We stress this data/cache-line is for read-only info.  This is
      NOT for dynamic per packet info, use the data_meta for such use-cases.
      
      The performance advantage is this info can be setup at RX-ring init
      time, instead of updating N-members in xdp_buff.  A possible (driver
      level) micro optimization is that xdp_buff->rxq assignment could be
      done once per XDP/NAPI loop.  The extra pointer deref only happens for
      program needing access to this info (thus, no slowdown to existing
      use-cases).
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      aecd67b6
    • Q
      net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set · 33c30a8b
      Quentin Monnet 提交于
      The definition of functions tcf_block_get() and tcf_block_get_ext()
      depends of CONFIG_NET_CLS being set. When those functions gained extack
      support, only one version of the declaration of those functions was
      updated. Function tcf_block_get() was later fixed with commit
      3c149091 ("net: sch: api: fix tcf_block_get").
      
      Change arguments of tcf_block_get_ext() for the case when CONFIG_NET_CLS
      is not set.
      
      Fixes: 8d1a77f9 ("net: sch: api: add extack support in tcf_block_get")
      Signed-off-by: NQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33c30a8b
  3. 29 12月, 2017 1 次提交
  4. 28 12月, 2017 1 次提交
  5. 22 12月, 2017 9 次提交
  6. 21 12月, 2017 4 次提交
  7. 20 12月, 2017 3 次提交
  8. 19 12月, 2017 8 次提交
  9. 16 12月, 2017 6 次提交