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 6867BA0352 for ; Sat, 5 Feb 2022 18:04:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38EE340143; Sat, 5 Feb 2022 18:04:26 +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 9066F40143 for ; Sat, 5 Feb 2022 18:04:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644080664; 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: in-reply-to:in-reply-to:references:references; bh=HSXMCfjcrgZA4AzZpfGxjGFU8Glrtv/WgnJbS6uzGoc=; b=Me1zCjzDWpYQgVz2zEZORk3DWqux4AWXi1Vz8DJ+Jzv4K+D6aIAzDz/tyOn4pZazK+cEGF VAyyUWvUm8zlNzDQWPzwjjxG4atxHx8JXpvrfwIAg8O11z5ll+rqZeUlkrC7oxSjxW7/5T NAwbYI25wQx9YA8sNb90G+7BljD9tRs= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-296-lYs7T623PY2BEwClbsD-ag-1; Sat, 05 Feb 2022 12:04:23 -0500 X-MC-Unique: lYs7T623PY2BEwClbsD-ag-1 Received: by mail-lj1-f200.google.com with SMTP id p10-20020a2ea4ca000000b0023c8545494fso2348117ljm.2 for ; Sat, 05 Feb 2022 09:04:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HSXMCfjcrgZA4AzZpfGxjGFU8Glrtv/WgnJbS6uzGoc=; b=FpT048nAuU8MzIbvgUJmSnzasi73dw42NAjr1SlAoI78cxjyWB3GhVznqCkecajDf5 KMNetYlH9mDMBIGLgvd/Ovgmsc6725t848jIg6psSts3fk2Fo7tX+bAEC5Qq6Elk4WNj w/ZhTDNG881eEhWajNlI5DL3fJ/mb2eIanTgela/sWcsIeLtabQ0VnYUoffZndwPUW2p 2dPGbLfTPyho+I2d+/ZnCUoOJYbcmuh6+gdT/jRq9inKmhjc8h8zt7a3dEaSsJWuA88b HYULAtmKgts/NKHgWePiBfQgoQrYeG/JuTQNGgtrGdGtpccQQ10duN04dgu5Re5kVS95 N7pw== X-Gm-Message-State: AOAM5325mP76mUCv34cJViCFXlwrbhZdjo88M+i7pqi/iJuPgYEK+cRw 0Vewjdd4y7notN7UUM+Ue99PmKckZ8PjZu8VN54K++EJ66PkjQ6536rqBTAaf//biLeUUBmzv4z fZJMf9q3JDdb5rU64g2Cat2E= X-Received: by 2002:a2e:a811:: with SMTP id l17mr3173592ljq.81.1644080661467; Sat, 05 Feb 2022 09:04:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuVRhiIhvhNl17oNCTpqahi13WSd6YHSHGKx2YTGta0vfBSO58F+Z7eWlfAhjRkX95RxvcYFU/qrpNaIEf7L4= X-Received: by 2002:a2e:a811:: with SMTP id l17mr3173577ljq.81.1644080661277; Sat, 05 Feb 2022 09:04:21 -0800 (PST) MIME-Version: 1.0 References: <6d7c9da7eb47cb236710a870d91219f1c3ca4684.1641785123.git.wangyunjian@huawei.com> In-Reply-To: From: David Marchand Date: Sat, 5 Feb 2022 18:04:09 +0100 Message-ID: Subject: Re: [dpdk-dev] [PATCH] ring: fix error return value when creating ring To: Yunjian Wang Cc: "dev@dpdk.org" , "Ananyev, Konstantin" , "honnappa.nagarahalli@arm.com" , "dingxiaoxiong@huawei.com" , "xudingke@huawei.com" , "stable@dpdk.org" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Mon, Jan 10, 2022 at 3:15 PM Ananyev, Konstantin wrote: > > > The error value returned by rte_ring_create_elem() should be positive > > integers. However, if the rte_ring_get_memsize_elem() function fails, > > a negative number is returned and is directly used as the return value. > > As a result, this will cause the external call to check the return > > value to fail(like called by rte_mempool_create()). > > > > Fixes: a182620042aa ("ring: get size in memory") > > Cc: stable@dpdk.org > > > > Reported-by: Nan Zhou > > Signed-off-by: Yunjian Wang > Acked-by: Konstantin Ananyev Applied, thanks. -- David Marchand