1. 27 2月, 2018 2 次提交
  2. 15 2月, 2018 4 次提交
    • A
      i40e: Add and delete cloud filter · e284fc28
      Avinash Dayanand 提交于
      This patch provides support to add or delete cloud filter for queue
      channels created for ADq on VF.
      We are using the HW's cloud filter feature and programming it to act
      as a TC filter applied to a group of queues.
      
      There are two possible modes for a VF when applying a cloud filter
      1. Basic Mode:	Intended to apply filters that don't need a VF to be
      		Trusted. This would include the following
      		  Dest MAC + L4 port
      		  Dest MAC + VLAN + L4 port
      2. Advanced Mode: This mode is only for filters with combination that
      		  requires VF to be Trusted.
      		  Dest IP + L4 port
      
      When cloud filters are applied on a trusted VF and for some reason
      the same VF is later made as untrusted then all cloud filters
      will be deleted. All cloud filters has to be re-applied in
      such a case.
      Cloud filters are also deleted when queue channel is deleted.
      
      Testing-Hints:
      =============
      1. Adding Basic Mode filter should be possible on a VF in
         Non-Trusted mode.
      2. In Advanced mode all filters should be able to be created.
      
      Steps:
      ======
      1. Enable ADq and create TCs using TC mqprio command
      2. Apply cloud filter.
      3. Turn-off the spoof check.
      4. Pass traffic.
      
      Example:
      ========
      1. tc qdisc add dev enp4s2 root mqprio num_tc 4 map 0 0 0 0 1 2 2 3\
      	queues 2@0 2@2 1@4 1@5 hw 1 mode channel
      2. tc qdisc add dev enp4s2 ingress
      3. ethtool -K enp4s2 hw-tc-offload on
      4. ip link set ens261f0 vf 0 spoofchk off
      5. tc filter add dev enp4s2 protocol ip parent ffff: prio 1 flower\
      	dst_ip 192.168.3.5/32 ip_proto udp dst_port 25 skip_sw hw_tc 2
      Signed-off-by: NAvinash Dayanand <avinash.dayanand@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e284fc28
    • A
      i40e: Service request to configure bandwidth for ADq on a VF · 0c483bd4
      Avinash Dayanand 提交于
      This patch handles the request from ADq enabled VF to allocate
      bandwidth to each traffic class which means for each VSI.
      Signed-off-by: NAvinash Dayanand <avinash.dayanand@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      0c483bd4
    • A
      i40e: Delete queue channel for ADq on VF · c4998aa3
      Avinash Dayanand 提交于
      This patch takes care of freeing up all the VSIs, queues and
      other ADq related software and hardware resources, when a user
      requests for deletion of ADq on VF.
      
      Example command:
      tc qdisc del dev eth0 root
      Signed-off-by: NAvinash Dayanand <avinash.dayanand@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c4998aa3
    • A
      i40e: Enable ADq and create queue channel/s on VF · c27eac48
      Avinash Dayanand 提交于
      This patch enables ADq and creates queue channels on a VF. An ADq
      enabled VF can have up to 4 VSIs and each one of them represents
      a traffic class and this is termed as a queue channel. Each of these
      VSIs can have up to 4 queues. This patch services the request for
      enabling ADq and adds queue channel based on the TC mqprio info
      provided by the user in the VF.
      
      Initially a check is made to see if spoof check is OFF, if not ADq
      will not be enabled. PF notifies VF for a reset in order to complete
      the creation of ADq resources i.e. creation of additional VSIs and
      allocation of queues as per TC information, all in the reset path.
      
      Steps:
      ======
      1. Turn off the spoof check
      2. Enable ADq using tc mqprio command with or without rate limit.
      3. Pass traffic.
      
      Example:
      ========
      % ip link set dev eth0 vf 0 spoofchk off
      % tc qdisc add dev $iface root mqprio num_tc 4 map\
      	0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 queues\
      	4@0 4@4 4@8 4@8 hw 1 mode channel
      
      Expected results:
      =================
      1. Total number of queues for the VF should be sum of queues of all TCs.
      2. Traffic flow should be normal without errors.
      Signed-off-by: NAvinash Dayanand <avinash.dayanand@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c27eac48
  3. 11 1月, 2018 2 次提交
    • J
      i40e: add helper conversion function for link_speed · 5b643479
      Jacob Keller 提交于
      We introduced the virtchnl interface in order to have an interface for
      talking to a virtual device driver which was host-driver agnostic. This
      interface has its own definitions, including one for link speed.
      
      The host driver has to talk to the virtchnl interface using these new
      definitions in order to remain compatible. Today, the i40e link_speed
      enumerations are value-exact matches for the virtchnl interface, so it
      was originally decided to simply use a typecast.
      
      However, this is unsafe, and makes it easier for future drivers to
      continue this unsafe practice. There is nothing guaranteeing these
      values are exact, and the type-cast would hide any compiler warning
      which indicates the problem.
      
      Rather than rely on this type cast, introduce a helper function which
      can convert the AdminQ link speed definition into a virtchnl
      definition. This can then be used by host driver implementations in
      order to safely convert to the interface recognized by the virtual
      functions.
      
      If the link speed is not able to be represented by the virtchnl
      definitions we'll report UNKNOWN which is the safest result.
      
      This will ensure that should the driver specific link_speeds actual bit
      definitions change, we do not report them incorrectly according to the
      VF.
      
      Additionally, this provides a better pattern for future drivers to copy,
      as it is more likely a future device may not use the exact same bit-wise
      definition as the current virtchnl interface.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5b643479
    • J
      i40e: update VFs of link state after GET_VF_RESOURCES · d3d657a9
      Jacob Keller 提交于
      We currently notify a VF of the link state after ENABLE_QUEUES, which is
      the last thing a VF does after being configured. Guests may not actually
      ENABLE_QUEUES until they get configured, and thus between driver load
      and device configuration the VF may show inaccurate link status.
      
      Fix this by also sending the link state after GET_VF_RESOURCES. Although
      we could remove the message following ENABLE_QUEUES, it's not that
      significant of a loss, so this patch just keeps both to ensure maximum
      compatibility with guests on various OSes.
      
      Specifically, without this patch guests running FreeBSD will display
      inaccurate link state until the device is brought up. This is mostly
      a cosmetic issue but can be confusing to system administrators.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d3d657a9
  4. 28 11月, 2017 1 次提交
  5. 22 11月, 2017 1 次提交
  6. 14 10月, 2017 3 次提交
  7. 10 10月, 2017 5 次提交
  8. 03 10月, 2017 8 次提交
  9. 30 9月, 2017 1 次提交
    • A
      i40e: Enable VF to negotiate number of allocated queues · a3f5aa90
      Alan Brady 提交于
      Currently the PF allocates a default number of queues for each VF and
      cannot be changed.  This patch enables the VF to request a different
      number of queues allocated to it.  This patch also adds a new virtchnl
      op and capability flag to facilitate this negotiation.
      
      After the PF receives a request message, it will set a requested number
      of queues for that VF.  Then when the VF resets, its VSI will get a new
      number of queues allocated to it.
      
      This is a best effort request and since we only allocate a guaranteed
      default number, if the VF tries to ask for more than the guaranteed
      number, there may not be enough in HW to accommodate it unless other
      queues for other VFs are freed. It should also be noted decreasing the
      number queues allocated to a VF to below the default will NOT enable the
      allocation of more than 32 VFs per PF and will not free queues guaranteed
      to each VF by default.
      Signed-off-by: NAlan Brady <alan.brady@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a3f5aa90
  10. 28 8月, 2017 2 次提交
  11. 26 8月, 2017 2 次提交
    • S
      i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource · fbb113f7
      Stefan Assmann 提交于
      The current name of vf_offload_flags indicates that the bitmap is
      limited to offload related features. Make this more generic by renaming
      it to vf_cap_flags, which allows for other capabilities besides
      offloading to be added.
      Signed-off-by: NStefan Assmann <sassmann@kpanic.de>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fbb113f7
    • J
      i40e: separate hw_features from runtime changing flags · d36e41dc
      Jacob Keller 提交于
      The number of flags found in pf->flags has grown quite large, and there
      are a lot of different types of flags. Most of the flags are simply
      hardware features which are enabled on some firmware or some MAC types.
      Other flags are dynamic run-time flags which enable or disable certain
      features of the driver.
      
      Separate these two types of flags into pf->hw_features and pf->flags.
      The hw_features list will contain a set of features which are enabled at
      init time. This will not contain toggles or otherwise dynamically
      changing features. These flags should not need atomic protections, as
      they will be set once during init and then be essentially read only.
      
      Everything else will remain in the flags variable. These flags may be
      modified at any time during run time. A future patch may wish to convert
      these flags into set_bit/clear_bit/test_bit or similar approach to
      ensure atomic correctness.
      
      The I40E_FLAG_MFP_ENABLED flag may be a good fit for hw_features but
      currently is used by ethtool in the private flags settings, and thus has
      been left as part of flags.
      
      Additionally, I40E_FLAG_DCB_CAPABLE may be a good fit for the
      hw_features but this patch has not tried to untangle it yet.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d36e41dc
  12. 26 7月, 2017 3 次提交
  13. 15 6月, 2017 1 次提交
  14. 02 6月, 2017 5 次提交