Skip to content

Commit c27eac4

Browse files
Avinash DayanandJeff Kirsher
authored andcommitted
i40e: Enable ADq and create queue channel/s on VF
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: Avinash Dayanand <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent d5b33d0 commit c27eac4

File tree

3 files changed

+379
-69
lines changed

3 files changed

+379
-69
lines changed

drivers/net/ethernet/intel/i40e/i40e_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define I40E_MASK(mask, shift) ((u32)(mask) << (shift))
4040

4141
#define I40E_MAX_VSI_QP 16
42-
#define I40E_MAX_VF_VSI 3
42+
#define I40E_MAX_VF_VSI 4
4343
#define I40E_MAX_CHAINED_RX_BUFFERS 5
4444
#define I40E_MAX_PF_UDP_OFFLOAD_PORTS 16
4545

0 commit comments

Comments
 (0)