1. 26 9月, 2018 3 次提交
  2. 31 8月, 2018 2 次提交
  3. 01 5月, 2018 2 次提交
  4. 28 4月, 2018 1 次提交
  5. 24 3月, 2018 1 次提交
  6. 15 3月, 2018 2 次提交
    • F
      i40e: Fix permission check for VF MAC filters · 03ce7b1d
      Filip Sadowski 提交于
      When VF requests adding of MAC filters the checking is done against number
      of already present MAC filters not adding them at the same time. It makes
      it possible to add a bunch of filters at once possibly exceeding
      acceptable limit of I40E_VC_MAX_MAC_ADDR_PER_VF filters.
      
      This happens because when checking vf->num_mac, we do not check how many
      filters are being requested at once. Modify the check function to ensure
      that it knows how many filters are being requested. This allows the
      check to ensure that the total number of filters in a single request
      does not cause us to go over the limit.
      
      Additionally, move the check to within the lock to ensure that the
      vf->num_mac is checked while holding the lock to maintain consistency.
      We could have simply moved the call to i40e_vf_check_permission to
      within the loop, but this could cause a request to be non-atomic, and
      add some but not all the addresses, while reporting an error code. We
      want to avoid this behavior so that users are not confused about which
      filters have or have not been added.
      Signed-off-by: NFilip Sadowski <filip.sadowski@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      03ce7b1d
    • P
      i40e: Fix attach VF to VM issue · 028daf80
      Paweł Jabłoński 提交于
      Fix for "Resource temporarily unavailable" problem when virsh is
      trying to attach a device to VM. When the VF driver is loaded on
      host and virsh is trying to attach it to the VM and set a MAC
      address, it ends with a race condition between i40e_reset_vf and
      i40e_ndo_set_vf_mac functions. The bug is fixed by adding polling
      in i40e_ndo_set_vf_mac function For when the VF is in Reset mode.
      Signed-off-by: NPaweł Jabłoński <pawel.jablonski@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      028daf80
  7. 27 2月, 2018 2 次提交
  8. 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
  9. 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
  10. 28 11月, 2017 1 次提交
  11. 22 11月, 2017 1 次提交
  12. 14 10月, 2017 3 次提交
  13. 10 10月, 2017 5 次提交
  14. 03 10月, 2017 8 次提交
  15. 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
  16. 28 8月, 2017 2 次提交