• Kiran Patil's avatar
    ice: enable ndo_setup_tc support for mqprio_qdisc · fbc7b27a
    Kiran Patil authored
    Add support in driver for TC_QDISC_SETUP_MQPRIO. This support
    enables instantiation of channels in HW using existing MQPRIO
    infrastructure which is extended to be offloadable. This
    provides a mechanism to configure dedicated set of queues for
    each TC.
    
    Configuring channels using "tc mqprio":
    --------------------------------------
    tc qdisc add dev <ethX> root mqprio num_tc 3 map 0 1 2 \
    	queues 4@0 4@4 4@8  hw 1 mode channel
    
    Above command configures 3 TCs having 4 queues each. "hw 1 mode channel"
    implies offload of channel configuration to HW. When driver processes
    configuration received via "ndo_setup_tc: QDISC_SETUP_MQPRIO", each
    TC maps to HW VSI with specified queues.
    
    User can optionally specify bandwidth min and max rate limit per TC
    (see example below). If shaper params like min and/or max bandwidth
    rate limit are specified, driver configures VSI specific rate limiter
    in HW.
    
    Configuring channels and bandwidth shaper parameters using "tc mqprio":
    ----------------------------------------------------------------
    tc qdisc add dev <ethX> root mqprio \
    	num_tc 4 map 0 1 2 3 queues 4@0 4@4 4@8 4@12 hw 1 mode channel \
    	shaper bw_rlimit min_rate 1Gbit 2Gbit 3Gbit 4Gbit \
    	max_rate 4Gbit 5Gbit 6Gbit 7Gbit
    
    Command to view configured TCs:
    -----------------------------
    tc qdisc show dev <ethX>
    
    Deleting TCs:
    ------------
    tc qdisc del dev <ethX> root mqprio
    Signed-off-by: default avatarKiran Patil <kiran.patil@intel.com>
    Signed-off-by: default avatarAmritha Nambiar <amritha.nambiar@intel.com>
    Signed-off-by: default avatarSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
    Tested-by: default avatarBharathi Sreenivas <bharathi.sreenivas@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    fbc7b27a
ice_lib.c 110 KB