1. 23 May, 2020 4 commits
    • Henry Tieman's avatar
      ice: Support IPv4 Flow Director filters · cac2a27c
      Henry Tieman authored
      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: default avatarHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cac2a27c
    • Henry Tieman's avatar
      ice: Support displaying ntuple rules · 4ab95646
      Henry Tieman authored
      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: default avatarHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4ab95646
    • Henry Tieman's avatar
      ice: Initialize Flow Director resources · 148beb61
      Henry Tieman authored
      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: default avatarHenry Tieman <henry.w.tieman@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      148beb61
    • Geert Uytterhoeven's avatar
      virtchnl: Add missing explicit padding to structures · 65ece6de
      Geert Uytterhoeven authored
      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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      65ece6de
  2. 22 May, 2020 24 commits
  3. 21 May, 2020 12 commits