1. 01 9月, 2018 12 次提交
  2. 31 8月, 2018 15 次提交
  3. 30 8月, 2018 13 次提交
    • B
      xsk: include XDP meta data in AF_XDP frames · 18baed26
      Björn Töpel 提交于
      Previously, the AF_XDP (XDP_DRV/XDP_SKB copy-mode) ingress logic did
      not include XDP meta data in the data buffers copied out to the user
      application.
      
      In this commit, we check if meta data is available, and if so, it is
      prepended to the frame.
      Signed-off-by: NBjörn Töpel <bjorn.topel@intel.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      18baed26
    • D
      Merge branch 'bpf-bpffs-bpftool-dump-with-btf' · 56b48c6a
      Daniel Borkmann 提交于
      Yonghong Song says:
      
      ====================
      Commit a26ca7c9 ("bpf: btf: Add pretty print support to the
      basic arraymap") and Commit 699c86d6 ("bpf: btf: add pretty print
      for hash/lru_hash maps") added bpffs pretty print for array, hash and
      lru hash maps. The pretty print gives users a structurally formatted
      dump for keys/values which much easy to understand than raw bytes.
      
      This patch set implemented bpffs pretty print support for
      percpu arraymap, percpu hashmap and percpu lru hashmap.
      For complex key/value types, the pretty print here is even more useful
      due to:
      
        . large volumne of data making it even harder to correlate bytes
          to a particular field in a particular cpu.
        . kernel rounds the value size for each cpu to multiple of 8.
          User has to be aware of this otherwise wrong value may be
          derived from cpu 1/2/...
      
      For example, we may have a bpffs pretty print like below:
         43602: {
              cpu0: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
              cpu1: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
              cpu2: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
              cpu3: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
         }
      for a percpu map.
      
      This patch also added percpu formatted print on bpftool. For example,
      bpftool may print like below:
          {
              "key": 0,
              "values": [{
                      "cpu": 0,
                      "value": {
                          "ui32": 0,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 1,
                      "value": {
                          "ui32": 1,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 2,
                      "value": {
                          "ui32": 2,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 3,
                      "value": {
                          "ui32": 3,
                          "ui16": 0,
                      }
                  }
              ]
          }
      
      Patch #1 implemented bpffs pretty print for percpu arraymap/hash/lru_hash
      in kernel. Patch #2 added the test case in tools bpf selftest test_btf.
      Patch #3 added percpu map btf based dump.
      ====================
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      56b48c6a
    • Y
      tools/bpf: bpftool: add btf percpu map formated dump · 1a86ad89
      Yonghong Song 提交于
      The btf pretty print is added to percpu arraymap,
      percpu hashmap and percpu lru hashmap.
      For each <key, value> pair, the following will be
      added to plain/json output:
      
         {
             "key": <pretty_print_key>,
             "values": [{
                   "cpu": 0,
                   "value": <pretty_print_value_on_cpu0>
                },{
                   "cpu": 1,
                   "value": <pretty_print_value_on_cpu1>
                },{
                ....
                },{
                   "cpu": n,
                   "value": <pretty_print_value_on_cpun>
                }
             ]
         }
      
      For example, the following could be part of plain or json formatted
      output:
          {
              "key": 0,
              "values": [{
                      "cpu": 0,
                      "value": {
                          "ui32": 0,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 1,
                      "value": {
                          "ui32": 1,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 2,
                      "value": {
                          "ui32": 2,
                          "ui16": 0,
                      }
                  },{
                      "cpu": 3,
                      "value": {
                          "ui32": 3,
                          "ui16": 0,
                      }
                  }
              ]
          }
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      1a86ad89
    • Y
      tools/bpf: add bpffs percpu map pretty print tests in test_btf · 6493ebf7
      Yonghong Song 提交于
      The bpf selftest test_btf is extended to test bpffs
      percpu map pretty print for percpu array, percpu hash and
      percpu lru hash.
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      6493ebf7
    • Y
      bpf: add bpffs pretty print for percpu arraymap/hash/lru_hash · c7b27c37
      Yonghong Song 提交于
      Added bpffs pretty print for percpu arraymap, percpu hashmap
      and percpu lru hashmap.
      
      For each map <key, value> pair, the format is:
         <key_value>: {
      	cpu0: <value_on_cpu0>
      	cpu1: <value_on_cpu1>
      	...
      	cpun: <value_on_cpun>
         }
      
      For example, on my VM, there are 4 cpus, and
      for test_btf test in the next patch:
         cat /sys/fs/bpf/pprint_test_percpu_hash
      
      You may get:
         ...
         43602: {
      	cpu0: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu1: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu2: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu3: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
         }
         72847: {
      	cpu0: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu1: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu2: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu3: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
         }
         ...
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      c7b27c37
    • D
      Merge tag 'mac80211-next-for-davem-2018-08-29' of... · f0259b6a
      David S. Miller 提交于
      Merge tag 'mac80211-next-for-davem-2018-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      Only a few changes at this point:
       * new channels in 60 GHz
       * clarify (average) ACK signal reporting API
       * expose ieee80211_send_layer2_update() for all drivers
       * start/stop mac80211's TXQs properly when required
       * avoid regulatory restore with IE ignoring
       * spelling: contidion -> condition
       * fully implement WFA Multi-AP backhaul
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0259b6a
    • L
      vxlan: reduce dirty cache line in vxlan_find_mac · 016f3d18
      Li RongQing 提交于
      vxlan_find_mac() unconditionally set f->used for every packet,
      this causes a cache miss for every packet, since remote, hlist
      and used of vxlan_fdb share the same cache line, which are
      accessed when send every packets.
      
      so f->used is set only if not equal to jiffies, to reduce dirty
      cache line times, this gives 3% speed-up with small packets.
      Signed-off-by: NZhang Yu <zhangyu31@baidu.com>
      Signed-off-by: NLi RongQing <lirongqing@baidu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      016f3d18
    • D
      Merge branch 'liquidio-improve-soft-command-response-handling' · 920767a9
      David S. Miller 提交于
      Weilin Chang says:
      
      ====================
      liquidio: improve soft command/response handling
      
      Change soft command handling to fix the possible race condition when the
      process handles a response of a soft command that was already freed by an
      application which got timeout for this request.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      920767a9
    • F
      liquidio: remove obsolete functions and data structures · 64fecd3e
      Felix Manlunas 提交于
      1. Remove unused functions and data structures.
      2. Change the sending of the remaining soft commands to synchronous.
      Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64fecd3e
    • F
      liquidio: change octnic_ctrl_pkt to do synchronous soft commands · edd572d7
      Felix Manlunas 提交于
      1. Change struct octnic_ctrl_pkt to support synchronous operation.
      2. Change code which use structure octnic_ctrl_pkt to send sc's
         synchronously.
      Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edd572d7
    • F
      liquidio: make soft command calls synchronous · 6870957e
      Felix Manlunas 提交于
      1. Add wait_for_sc_completion_timeout() for waiting the response and
         handling common response errors
      2. Send sc's synchronously: remove unused callback function,
         and context structure; use wait_for_sc_completion_timeout() to wait
         its response.
      Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6870957e
    • F
      liquidio: improve soft command handling · c9aec052
      Felix Manlunas 提交于
      1. Set LIO_SC_MAX_TMO_MS as the maximum timeout value for a soft command
         (sc).  All sc's use this value as a hard timeout value. Add expiry_time
         in struct octeon_soft_command to keep the hard timeout value. The field
         wait_time and timeout in struct octeon_soft_command will be obsoleted in
         the last patch of this patch series.
      2. Add processing a synchronous sc in sc response thread
         lio_process_ordered_list. The memory allocated for a synchronous sc will
         be freed by lio_process_ordered_list() to the sc pool.
      3. Add two response lists for lio_process_ordered_list to process the
         storage allocated for sc's:
         OCTEON_DONE_SC_LIST response list keeps all sc's which will be freed to
         the pool after their requestors have finished processing the responses.
         OCTEON_ZOMBIE_SC_LIST response list keeps all sc's which have got
         LIO_SC_MAX_TMO_MS timeout.
         When an sc gets a hard timeout, lio_process_order_list() will recheck
         its status 1 ms later. If the status has not updated by the firmware at
         that time, the sc will be removed from OCTEON_DONE_SC_LIST response list
         to OCTEON_ZOMBIE_SC_LIST response list. The sc's in the
         OCTEON_ZOMBIE_SC_LIST response list will be freed when the driver is
         unloaded.
      Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9aec052
    • D
      net/tls: Calculate nsg for zerocopy path without skb_cow_data. · 0927f71d
      Doron Roberts-Kedes 提交于
      decrypt_skb fails if the number of sg elements required to map it
      is greater than MAX_SKB_FRAGS. nsg must always be calculated, but
      skb_cow_data adds unnecessary memcpy's for the zerocopy case.
      
      The new function skb_nsg calculates the number of scatterlist elements
      required to map the skb without the extra overhead of skb_cow_data.
      This patch reduces memcpy by 50% on my encrypted NBD benchmarks.
      Reported-by: NVakul Garg <Vakul.garg@nxp.com>
      Reviewed-by: NVakul Garg <Vakul.garg@nxp.com>
      Tested-by: NVakul Garg <Vakul.garg@nxp.com>
      Signed-off-by: NDoron Roberts-Kedes <doronrk@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0927f71d