From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76709A0093 for ; Thu, 9 Dec 2021 13:33:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9020A41142; Thu, 9 Dec 2021 13:33:23 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B5E6240151 for ; Thu, 9 Dec 2021 13:33:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639053201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oNR5qMiCRDoLoQgWxbEJ6G/2YDHgFGMqh0BDiYA4EB0=; b=S3uLRAY71E84suvu1P93zJqKwBvCjRiEXXgeNlZ4Z63dk1FmUsyPQxx8l6PtuYhzpFIBvZ CF+ty0xeT+T3+t2UwRY1pr/+zspft8cxTJydnp7OFatgNu5MZIW2oR7SevsP+v5NyUyRuj DsGSwBS5tLRG6YEZBdOBqXmVnoGc2sI= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-wRDTpDrWNi2oGJ_yHnAmcQ-1; Thu, 09 Dec 2021 07:33:18 -0500 X-MC-Unique: wRDTpDrWNi2oGJ_yHnAmcQ-1 Received: by mail-wr1-f70.google.com with SMTP id v18-20020a5d5912000000b001815910d2c0so1357171wrd.1 for ; Thu, 09 Dec 2021 04:33:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from:to :cc:references:content-language:subject:in-reply-to :content-transfer-encoding; bh=oNR5qMiCRDoLoQgWxbEJ6G/2YDHgFGMqh0BDiYA4EB0=; b=0tPaFRPM8nc7YNcT33OAdl9l8dBySNZb155663NqqmH7ZKQ9fYBXbz+2rmyrNRys47 Nv73UQFcHqHYd28cbOMMKZs76QYBgM8lDLZ02PQuSjrItzG8a7FyKiMn43ABXAaMTi4c /KwpnkRKagqy/Qy7nRZzQGC17nXypkH6EoJj6ETo4ng9PZAjDzJkS9k8T9vKlnm8K1eQ OItcF/VBjPQ02e5k963EHchZVLHKMx0rYOD5p99SIKnkFrGqP+PqmK+Llvbs8gy3ehoX nDocMCz9dBaj33+8S28A0wk0xUDbz6z3lTbp/bJdSaOOXAU+tzL8YMgIgno2iU4wn/am huuQ== X-Gm-Message-State: AOAM533wrVJVhCOAjvDkjVLPiH4x3XHr7EAJc2eYN0K3hrGeqBGYZf9D f66guZdgUfQ3/0FH3SQBsnAei3J6nXYAOAdipaGKyco5kEOGmccLzi0RgLpxYi3GnCOaYUP2O3+ 0vfKSRjE= X-Received: by 2002:a5d:64c6:: with SMTP id f6mr6097022wri.568.1639053197658; Thu, 09 Dec 2021 04:33:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJFLspXMpP2KB/fDRUvDe96Wy9rywePWx3SuvMEWy9BHxWWiQmceLMY5cj4ECdbqPUfii/sA== X-Received: by 2002:a5d:64c6:: with SMTP id f6mr6096999wri.568.1639053197381; Thu, 09 Dec 2021 04:33:17 -0800 (PST) Received: from [192.168.0.36] ([78.19.108.41]) by smtp.gmail.com with ESMTPSA id p14sm8230960wms.29.2021.12.09.04.33.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Dec 2021 04:33:16 -0800 (PST) Message-ID: <807b31a4-c40c-0c23-7022-caee2c9b49e9@redhat.com> Date: Thu, 9 Dec 2021 12:33:15 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 From: Kevin Traynor To: Matan Azrad , Ferruh Yigit , Michael Baum , "dev@dpdk.org" , Luca Boccassi , Christian Ehrhardt Cc: Raslan Darawsheh , Slava Ovsiienko , "stable@dpdk.org" References: <20211123183805.2905792-1-michaelba@nvidia.com> <20211123183805.2905792-4-michaelba@nvidia.com> <6493448f-e5a3-8834-3fea-cd1036aa097c@intel.com> Subject: Re: [PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 08/12/2021 15:40, Matan Azrad wrote: > Hi Ferruh > > Thanks for the review. > > Please see inside some clarifications. > > From: Ferruh Yigit >> On 12/8/2021 12:52 PM, Michael Baum wrote: >>> >>> On 12/07/2021 3:41 PM, ferruh.yigit@intel.com wrote: >>>> >>>> On 11/23/2021 6:38 PM, michaelba@nvidia.com wrote: >>>>> From: Michael Baum >>>>> >>>>> In Multy-Packet RQ creation, the user can choose the number of >>>>> strides >>>> >>>> Multi-Packet ? >>> >>> Yes, you're right. It should have been Multi-Packet, thank you for that. >>> >>>> >>>>> and their size in bytes. The user updates it using specific devargs >>>>> for both of these parameters. >>>>> The above two parameters determine the size of the WQE which is >>>>> actually their product of multiplication. >>>>> >>>>> If the user selects values that are not in the supported range, the >>>>> PMD changes them to default values. However, apart from the range >>>>> limitations for each parameter individually there is also a minimum >>>>> value on their multiplication. When the user selects values that >>>>> their multiplication are lower than minimum value, no adjustment is >>>>> made and the creation of the WQE fails. >>>>>> This patch adds an adjustment in these cases as well. When the user >>>>> selects values whose multiplication is lower than the minimum, they >>>>> are replaced with the default values. >>>>> >>>>> Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride >>>>> size") Cc:stable@dpdk.org >>>>> >>>> >>>> Again, not sure if we can backport this patch, this looks a behavior >>>> change more than a fix. >>>> >>>> Previously if the user provided values ends up being invalid, PMD >>>> seems returning error. >>>> With this patch, instead of returning error PMD prefers to use >>>> default values and doesn't return error. >>> >>> It isn't behavior change. >>> It existed before, except that it is concentrated into one function. >>> >>>> >>>> I am not sure if it is correct thing to ignore (adjust) user provided >>>> values, but that can be up to the PMD as long as the behavior is >> documented. >>> >>> Adjustment is the likely thing to do because the range depends on the >> device and the user does not necessarily know it. >>> This behavior is documented here >>> https://doc.dpdk.org/guides/nics/mlx5.html#run-time-configuration >>> (Run-time configuration -> Driver options -> mprq_log_stride_num/size) >>> >> >> It is documented that adjustments will be done if any specific argument is >> not in the range of the device capability. >> >> It is not clear what will happen if the calculated value from both variables are >> not valid. > > The driver should adjust it to a legal value. > >> If it is not documented before, and previously it was returning error, now >> adjusting values to make it work looks like behavior change to me. > > The driver should not return an error - the driver should adjust to a legal value in case of illegal values by the user. > It is documented in the devargs description. > > Not behavior change but a bug fix; previously, the adjustment may return an error(which is a bug) or cause unexpected behavior in the HW(which is an old FW bug). > Now, no error, no unexpected behavior - bug should be fixed for any FW version. > I can understand both arguments. It is a behaviour change as the user will see a different behaviour for a given set of values. However, each parameter is already validated and defaults are provided as backup. The combination not being checked could be seen a piece of missed validation for those values and a bug. In this case, given it is unlikely any user would be happy with the WQE creation failure, i think it is ok to backport the missing validation/adjustment. >> This is more of a process question, than technical detail in the driver, so >> @Luca, @Kevin, @Christian, can you please comment? I will follow your >> suggestion. >> Thanks for raising it Ferruh. Kevin. >> >>>> >>>> But I think it is wrong to backport the behavior change. >>>> >>>>> Signed-off-by: Michael Baum >>>>> Acked-by: Matan Azrad >>>>> --- >>> >