1. 02 8月, 2018 6 次提交
  2. 01 8月, 2018 3 次提交
  3. 31 7月, 2018 9 次提交
    • Y
      fib_rules: NULL check before kfree is not needed · 778c4d5c
      YueHaibing 提交于
      kfree(NULL) is safe,so this removes NULL check before freeing the mem
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      778c4d5c
    • V
      net/tls: Use socket data_ready callback on record availability · ad13acce
      Vakul Garg 提交于
      On receipt of a complete tls record, use socket's saved data_ready
      callback instead of state_change callback. In function tls_queue(),
      the TLS record is queued in encrypted state. But the decryption
      happen inline when tls_sw_recvmsg() or tls_sw_splice_read() get invoked.
      So it should be ok to notify the waiting context about the availability
      of data as soon as we could collect a full TLS record. For new data
      availability notification, sk_data_ready callback is more appropriate.
      It points to sock_def_readable() which wakes up specifically for EPOLLIN
      event. This is in contrast to the socket callback sk_state_change which
      points to sock_def_wakeup() which issues a wakeup unconditionally
      (without event mask).
      Signed-off-by: NVakul Garg <vakul.garg@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad13acce
    • P
      act_mirred: use TC_ACT_REINSERT when possible · e5cf1baf
      Paolo Abeni 提交于
      When mirred is invoked from the ingress path, and it wants to redirect
      the processed packet, it can now use the TC_ACT_REINSERT action,
      filling the tcf_result accordingly, and avoiding a per packet
      skb_clone().
      
      Overall this gives a ~10% improvement in forwarding performance for the
      TC S/W data path and TC S/W performances are now comparable to the
      kernel openvswitch datapath.
      
      v1 -> v2: use ACT_MIRRED instead of ACT_REDIRECT
      v2 -> v3: updated after action rename, fixed typo into the commit
      	message
      v3 -> v4: updated again after action rename, added more comments to
      	the code (JiriP), skip the optimization if the control action
      	need to touch the tcf_result (Paolo)
      v4 -> v5: fix sparse warning (kbuild bot)
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5cf1baf
    • P
      net/tc: introduce TC_ACT_REINSERT. · cd11b164
      Paolo Abeni 提交于
      This is similar TC_ACT_REDIRECT, but with a slightly different
      semantic:
      - on ingress the mirred skbs are passed to the target device
      network stack without any additional check not scrubbing.
      - the rcu-protected stats provided via the tcf_result struct
        are updated on error conditions.
      
      This new tcfa_action value is not exposed to the user-space
      and can be used only internally by clsact.
      
      v1 -> v2: do not touch TC_ACT_REDIRECT code path, introduce
       a new action type instead
      v2 -> v3:
       - rename the new action value TC_ACT_REINJECT, update the
         helper accordingly
       - take care of uncloned reinjected packets in XDP generic
         hook
      v3 -> v4:
       - renamed again the new action value (JiriP)
      v4 -> v5:
       - fix build error with !NET_CLS_ACT (kbuild bot)
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd11b164
    • P
      tc/act: remove unneeded RCU lock in action callback · 7fd4b288
      Paolo Abeni 提交于
      Each lockless action currently does its own RCU locking in ->act().
      This allows using plain RCU accessor, even if the context
      is really RCU BH.
      
      This change drops the per action RCU lock, replace the accessors
      with the _bh variant, cleans up a bit the surrounding code and
      documents the RCU status in the relevant header.
      No functional nor performance change is intended.
      
      The goal of this patch is clarifying that the RCU critical section
      used by the tc actions extends up to the classifier's caller.
      
      v1 -> v2:
       - preserve rcu lock in act_bpf: it's needed by eBPF helpers,
         as pointed out by Daniel
      
      v3 -> v4:
       - fixed some typos in the commit message (JiriP)
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fd4b288
    • P
      net/sched: user-space can't set unknown tcfa_action values · 802bfb19
      Paolo Abeni 提交于
      Currently, when initializing an action, the user-space can specify
      and use arbitrary values for the tcfa_action field. If the value
      is unknown by the kernel, is implicitly threaded as TC_ACT_UNSPEC.
      
      This change explicitly checks for unknown values at action creation
      time, and explicitly convert them to TC_ACT_UNSPEC. No functional
      changes are introduced, but this will allow introducing tcfa_action
      values not exposed to user-space in a later patch.
      
      Note: we can't use the above to hide TC_ACT_REDIRECT from user-space,
      as the latter is already part of uAPI.
      
      v3 -> v4:
       - use an helper to check for action validity (JiriP)
       - emit an extack for invalid actions (JiriP)
      v4 -> v5:
       - keep messages on a single line, drop net_warn (Marcelo)
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      802bfb19
    • C
      net: remove sock_poll_busy_flag · a331de3b
      Christoph Hellwig 提交于
      Fold it into the only caller to make the code simpler and easier to read.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a331de3b
    • C
      net: remove sock_poll_busy_loop · f641f13b
      Christoph Hellwig 提交于
      There is no point in hiding this logic in a helper.  Also remove the
      useless events != 0 check and only busy loop once we know we actually
      have a poll method.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f641f13b
    • C
      net: simplify sock_poll_wait · dd979b4d
      Christoph Hellwig 提交于
      The wait_address argument is always directly derived from the filp
      argument, so remove it.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd979b4d
  4. 30 7月, 2018 7 次提交
  5. 29 7月, 2018 2 次提交
  6. 28 7月, 2018 11 次提交
  7. 27 7月, 2018 2 次提交