• Brett Creeley's avatar
    ice: Fix virtchnl_queue_select bitmap validation · 24e2e2a0
    Brett Creeley authored
    Currently in ice_vc_ena_qs_msg() we are incorrectly validating the
    virtchnl queue select bitmaps. The virtchnl_queue_select rx_queues and
    tx_queue bitmap is being compared against ICE_MAX_BASE_QS_PER_VF, but
    the problem is that these bitmaps can have a value greater than
    ICE_MAX_BASE_QS_PER_VF. Fix this by comparing the bitmaps against
    BIT(ICE_MAX_BASE_QS_PER_VF).
    
    Also, add the function ice_vc_validate_vqs_bitmaps() that checks to see
    if both virtchnl_queue_select bitmaps are empty along with checking that
    the bitmaps only have valid bits set. This function can then be used in
    both the queue enable and disable flows.
    
    Arkady Gilinksky's patch on the intel-wired-lan mailing list
    ("i40e/iavf: Fix msg interface between VF and PF") made me
    aware of this issue.
    Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    24e2e2a0
ice_virtchnl_pf.c 94.6 KB