1. 07 11月, 2019 4 次提交
    • Z
      net: forcedeth: add xmit_more support · 5d8876e2
      Zhu Yanjun 提交于
      This change adds support for xmit_more based on the igb commit 6f19e12f
      ("igb: flush when in xmit_more mode and under descriptor pressure") and
      commit 6b16f9ee ("net: move skb->xmit_more hint to softnet data") that
      were made to igb to support this feature. The function netif_xmit_stopped
      is called to check whether transmit queue on device is currently unable to
      send to determine whether we must write the tail because we can add no
      further buffers.
      
      When normal packets and/or xmit_more packets fill up tx_desc, it is
      necessary to trigger NIC tx reg.
      
      Following the advice from David Miller and Jakub Kicinski, after the
      xmit_more feature is added, the following scenario will occur.
      
               |
         xmit_more packets
               |
         DMA_MAPPING
               |
         DMA_MAPPING error check
               |
         xmit_more packets already in HW xmit queue
               |
      
      In the above scenario, if DMA_MAPPING error occurrs, the xmit_more packets
      already in HW xmit queue will also be dropped. This is different from the
      behavior before xmit_more feature. So it is necessary to trigger NIC HW tx
      reg in the above scenario.
      
      To the non-xmit_more packets, the above scenario will not occur.
      
      Tested:
        - pktgen (xmit_more packets) SMP x86_64 ->
          Test command:
          ./pktgen_sample03_burst_single_flow.sh ... -b 8 -n 1000000
          Test results:
          Params:
          ...
          burst: 8
          ...
          Result: OK: 12194004(c12188996+d5007) usec, 1000001 (1500byte,0frags)
          82007pps 984Mb/sec (984084000bps) errors: 0
      
        - iperf (normal packets) SMP x86_64 ->
          Test command:
          Server: iperf -s
          Client: iperf -c serverip
          Result:
          TCP window size: 85.0 KByte (default)
          ------------------------------------------------------------
          [ ID] Interval       Transfer     Bandwidth
          [  3]  0.0-10.0 sec  1.10 GBytes   942 Mbits/sec
      
      CC: Joe Jin <joe.jin@oracle.com>
      CC: JUNXIAO_BI <junxiao.bi@oracle.com>
      Reported-and-tested-by: NNan san <nan.1986san@gmail.com>
      Signed-off-by: NZhu Yanjun <yanjun.zhu@oracle.com>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d8876e2
    • D
      Merge branch 'netdevsim-fix-tests-and-netdevsim' · fb90ab6b
      David S. Miller 提交于
      Jakub Kicinski says:
      
      ====================
      netdevsim: fix tests and netdevsim
      
      The first patch fixes a merge which brought back some dead
      code. Next a tiny re-write of the main test using netdevsim
      aims to ease debugging.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb90ab6b
    • J
      selftests: bpf: log direct file writes · acceca8d
      Jakub Kicinski 提交于
      Recent changes to netdevsim moved creating and destroying
      devices from netlink to sysfs. The sysfs writes have been
      implemented as direct writes, without shelling out. This
      is faster, but leaves no trace in the logs. Add explicit
      logs to make debugging possible.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acceca8d
    • J
      netdevsim: drop code duplicated by a merge · bfcccfe7
      Jakub Kicinski 提交于
      Looks like the port adding loop makes a re-appearance on net-next
      after net was merged back into it (even though it doesn't feature
      in the merge diff).
      
      The ports are already added in nsim_dev_create() so when we try
      to add them again get EEXIST, and see:
      
      netdevsim: probe of netdevsim0 failed with error -17
      
      in the logs. When we remove the loop again the nsim_dev_probe()
      and nsim_dev_remove() become a wrapper of nsim_dev_create() and
      nsim_dev_destroy(). Remove this layer of indirection.
      
      Fixes: d31e9558 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfcccfe7
  2. 06 11月, 2019 36 次提交