1. 18 11月, 2018 1 次提交
  2. 17 11月, 2018 18 次提交
  3. 16 11月, 2018 4 次提交
    • L
      net: slightly optimize eth_type_trans · 45cf7959
      Li RongQing 提交于
      netperf udp stream shows that eth_type_trans takes certain cpu,
      so adjust the mac address check order, and firstly check if it
      is device address, and only check if it is multicast address
      only if not the device address.
      
      After this change:
      To unicast, and skb dst mac is device mac, this is most of time
      reduce a comparision
      To unicast, and skb dst mac is not device mac, nothing change
      To multicast, increase a comparision
      
      Before:
      1.03%  [kernel]          [k] eth_type_trans
      
      After:
      0.78%  [kernel]          [k] eth_type_trans
      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>
      45cf7959
    • L
      net: remove BUG_ON from __pskb_pull_tail · 982c17b9
      Li RongQing 提交于
      if list is NULL pointer, and the following access of list
      will trigger panic, which is same as BUG_ON
      Signed-off-by: NLi RongQing <lirongqing@baidu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      982c17b9
    • A
      net: sched: cls_flower: Classify packets using port ranges · 5c72299f
      Amritha Nambiar 提交于
      Added support in tc flower for filtering based on port ranges.
      
      Example:
      1. Match on a port range:
      -------------------------
      $ tc filter add dev enp4s0 protocol ip parent ffff:\
        prio 1 flower ip_proto tcp dst_port range 20-30 skip_hw\
        action drop
      
      $ tc -s filter show dev enp4s0 parent ffff:
      filter protocol ip pref 1 flower chain 0
      filter protocol ip pref 1 flower chain 0 handle 0x1
        eth_type ipv4
        ip_proto tcp
        dst_port range 20-30
        skip_hw
        not_in_hw
              action order 1: gact action drop
               random type none pass val 0
               index 1 ref 1 bind 1 installed 85 sec used 3 sec
              Action statistics:
              Sent 460 bytes 10 pkt (dropped 10, overlimits 0 requeues 0)
              backlog 0b 0p requeues 0
      
      2. Match on IP address and port range:
      --------------------------------------
      $ tc filter add dev enp4s0 protocol ip parent ffff:\
        prio 1 flower dst_ip 192.168.1.1 ip_proto tcp dst_port range 100-200\
        skip_hw action drop
      
      $ tc -s filter show dev enp4s0 parent ffff:
      filter protocol ip pref 1 flower chain 0 handle 0x2
        eth_type ipv4
        ip_proto tcp
        dst_ip 192.168.1.1
        dst_port range 100-200
        skip_hw
        not_in_hw
              action order 1: gact action drop
               random type none pass val 0
               index 2 ref 1 bind 1 installed 58 sec used 2 sec
              Action statistics:
              Sent 920 bytes 20 pkt (dropped 20, overlimits 0 requeues 0)
              backlog 0b 0p requeues 0
      
      v4:
      1. Added condition before setting port key.
      2. Organized setting and dumping port range keys into functions
         and added validation of input range.
      
      v3:
      1. Moved new fields in UAPI enum to the end of enum.
      2. Removed couple of empty lines.
      
      v2:
      Addressed Jiri's comments:
      1. Added separate functions for dst and src comparisons.
      2. Removed endpoint enum.
      3. Added new bit TCA_FLOWER_FLAGS_RANGE to decide normal/range
        lookup.
      4. Cleaned up fl_lookup function.
      Signed-off-by: NAmritha Nambiar <amritha.nambiar@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c72299f
    • C
      net: dump more useful information in netdev_rx_csum_fault() · 7fe50ac8
      Cong Wang 提交于
      Currently netdev_rx_csum_fault() only shows a device name,
      we need more information about the skb for debugging csum
      failures.
      
      Sample output:
      
       ens3: hw csum failure
       dev features: 0x0000000000014b89
       skb len=84 data_len=0 pkt_type=0 gso_size=0 gso_type=0 nr_frags=0 ip_summed=0 csum=0 csum_complete_sw=0 csum_valid=0 csum_level=0
      
      Note, I use pr_err() just to be consistent with the existing one.
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fe50ac8
  4. 15 11月, 2018 4 次提交
  5. 13 11月, 2018 3 次提交
  6. 12 11月, 2018 10 次提交