1. 23 5月, 2020 7 次提交
    • H
      ice: Restore filters following reset · 83af0039
      Henry Tieman 提交于
      Following a reset, Flow Director filters are cleared from the hardware.
      Rebuild the filters using the software structures containing the filter
      rules.
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      83af0039
    • H
      ice: Enable flex-bytes support · 2c57ffcb
      Henry Tieman 提交于
      Flex-bytes allows for packet matching based on an offset and value. This
      is supported via the ethtool user-def option.  It is specified by providing
      an offset followed by a 2 byte match value. Offset is measured from the
      start of the MAC address.
      
      The following restrictions apply to flex-bytes. The specified offset must
      be an even number and be smaller than 0x1fe.
      
      Example usage:
      
      ethtool -N eth0 flow-type tcp4 src-ip 192.168.0.55 dst-ip 172.16.0.55 \
      src-port 12 dst-port 13 user-def 0x10ffff action 32
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2c57ffcb
    • H
      ice: Support IPv6 Flow Director filters · 165d80d6
      Henry Tieman 提交于
      Extend supported filters to allow for IPv6 filters.
      
      Supported fields are: src-ip, dst-ip, src-port, and dst-port
      Supported flow-types are: tcp6, udp6, sctp6, ip6
      
      Example usage:
      
      ethtool -N eth0 flow-type tcp6 src-port 12 dst-port 13 \
      src-ip fce0::1:34 dst-ip fce0::1:35 action 32
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      165d80d6
    • H
      ice: Support IPv4 Flow Director filters · cac2a27c
      Henry Tieman 提交于
      Support the addition and deletion of IPv4 filters.
      
      Supported fields are: src-ip, dst-ip, src-port, and dst-port
      Supported flow-types are: tcp4, udp4, sctp4, ip4
      
      Example usage:
      
      ethtool -N eth0 flow-type tcp4 src-ip 192.168.0.55 dst-ip 172.16.0.55 \
      src-port 16 dst-port 12 action 32
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cac2a27c
    • H
      ice: Support displaying ntuple rules · 4ab95646
      Henry Tieman 提交于
      Add functionality for ethtool --show-ntuple, allowing for filters to be
      displayed when set functionality is added. Add statistics related to
      Flow Director matches and status.
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4ab95646
    • H
      ice: Initialize Flow Director resources · 148beb61
      Henry Tieman 提交于
      Flow Director allows for redirection based on ntuple rules. Rules are
      programmed using the ethtool set-ntuple interface. Supported actions are
      redirect to queue and drop.
      
      Setup the initial framework to process Flow Director filters. Create and
      allocate resources to manage and program filters to the hardware. Filters
      are processed via a sideband interface; a control VSI is created to manage
      communication and process requests through the sideband. Upon allocation of
      resources, update the hardware tables to accept perfect filters.
      Signed-off-by: NHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      148beb61
    • G
      virtchnl: Add missing explicit padding to structures · 65ece6de
      Geert Uytterhoeven 提交于
      On e.g. m68k, the alignment of 32-bit values is only 2 bytes, leading
      to the following:
      
          ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      					^
          ./include/linux/avf/virtchnl.h:577:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
           VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:577:32: error: enumerator value for ‘virtchnl_static_assert_virtchnl_filter’ is not an integer constant
           VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
      				    ^~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      							 ^
          ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      					^
          ./include/linux/avf/virtchnl.h:619:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
           VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:619:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_pf_event’ is not an integer constant
           VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);
      				   ^~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      							 ^
          ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      					^
          ./include/linux/avf/virtchnl.h:640:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
           VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:640:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qv_info’ is not an integer constant
           VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
      				   ^~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      							 ^
          ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      					^
          ./include/linux/avf/virtchnl.h:647:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
           VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:647:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qvlist_info’ is not an integer constant
           VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);
      				   ^~~~~~~~~~~~~~~~~~~~~~~~~~
          ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
            { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      							 ^
      
      Fix this by adding explicit padding to structures with holes.
      
      Reported-by: <noreply@ellerman.id.au>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      65ece6de
  2. 22 5月, 2020 24 次提交
  3. 21 5月, 2020 9 次提交