lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 087/154] iavf: Fix for setting queues to 0
    Date
    From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>

    [ Upstream commit 9a6e9e483a9684a34573fd9f9e30ecfb047cb8cb ]

    Now setting combine to 0 will be rejected with the
    appropriate error code.
    This has been implemented by adding a condition that checks
    the value of combine equal to zero.
    Without this patch, when the user requested it, no error was
    returned and combine was set to the default value for VF.

    Fixes: 5520deb15326 ("iavf: Enable support for up to 16 queues")
    Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
    Tested-by: Tony Brelinski <tony.brelinski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
    index 5508ccbf9f57b..ea85b06857fa2 100644
    --- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
    +++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
    @@ -903,7 +903,7 @@ static int iavf_set_channels(struct net_device *netdev,
    /* All of these should have already been checked by ethtool before this
    * even gets to us, but just to be sure.
    */
    - if (num_req > adapter->vsi_res->num_queue_pairs)
    + if (num_req == 0 || num_req > adapter->vsi_res->num_queue_pairs)
    return -EINVAL;

    if (num_req == adapter->num_active_queues)
    --
    2.33.0


    \
     
     \ /
      Last update: 2021-11-24 14:35    [W:4.415 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site