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 3F215A0093; Thu, 9 Dec 2021 13:33:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B392940F35; Thu, 9 Dec 2021 13:33:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5464640151 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=1639053200; 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=Cd1TgHNSJAqqtgOaE7FGZEGmwIYZ6pexSJANJjgKuBNMdEMaAY2ztJMoA/7YPdLTxw+qKI kI9d77KeDkCPTiCit5wfye/06d5tzs0E4E+rFw3gR04lO42L7wpwk5LobTLM0h+ctI8Lei 8/M6au/1NMOZAwcxEFuLLTsnu44b8Ts= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-305-Rdcpma70MWK8oNhpnKjxwg-1; Thu, 09 Dec 2021 07:33:19 -0500 X-MC-Unique: Rdcpma70MWK8oNhpnKjxwg-1 Received: by mail-wm1-f71.google.com with SMTP id 205-20020a1c00d6000000b003335d1384f1so4806714wma.3 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=nG/O4MyLyaYCb5CQYVxZDweWI/8G+pBafYZ90SasxV+BgBYx+pDzNTniXOa5EyoVnP exRddQisalTwQTwncZa+wPRXpHwCkO2J3vqbtTZ3AMCv/ttDdQpM3mohcXIhR15Drr1d y8/F9MoKOqf9EKxAUe0haW2jGDsZhN04f68JgIctDHohq8VZzqFb7BpsdCPNupueMJ0B FMbEo3G/4RhO2vPGsly2v9sp/hG63/hxxB1M6F+IB7ty5KEie4zPD7sALFeKXK+AnvUj rvGEHiHuBj3jiC/j69jiYD6oIin6cIobi6izN5toF1rTotxcvfg3hP2XOqXVmsDOcdP9 E8pg== X-Gm-Message-State: AOAM533jG1/r23o4ISF8ap3EB9YKGRnOJB2NtYRIB1S7E2ZhCAnl1R5U IoI8J01XcSP1NBNBAubkXLvxWF3F0hyYsfuKgLpH8V6mwjpGQrR5Q5AXlxnblB73TmcNGoHi9Us JITE= X-Received: by 2002:a5d:64c6:: with SMTP id f6mr6097038wri.568.1639053197702; 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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 >>>>> --- >>> >