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 09F44A0352; Sat, 5 Feb 2022 18:04:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DA1340E09; 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 B2BAC4069D 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-14-dfhoX0mANOigN1H8YaPjmg-1; Sat, 05 Feb 2022 12:04:23 -0500 X-MC-Unique: dfhoX0mANOigN1H8YaPjmg-1 Received: by mail-lj1-f200.google.com with SMTP id a13-20020a2e88cd000000b002386c61ffe2so2366709ljk.7 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=VkIsfQ4v75lJRHRqxe65GIQwnDi8Wy1qMpoE17G1SKtxZoLMrpv3CtQdpXXh41yLXV 2fDXeKH6Wneo/DX9Ju6LY/dpqJyCk0TvMjcX+FI0/hDMZ9QtoellKKabqQ6BHYKES+mZ uuNGfbhPdsFkQAw7nToQ2jh2RdmqiGcYZABKsI+06ZM+Sw0cK99ETut67LqR0zYDBg48 cyJY/bTTg8Fv1wmR2pIMjwDmOFGJnTinVk6L6PtX4xdWNa1RWGsfkViCUtCmLxGgcHhi csNzvi1PjS2jsxmyltVsCzUGq6Deip8NJWA/DjRkN7Caw0CZfKW9UZaH5Ir3y3GGKtp/ dqTA== X-Gm-Message-State: AOAM533U9zUwXnpijTLloS51uKfoiad/ACkTftdI7yxkPEOdZ3ZUbgma oqYIWzSjn5Ou0ziGigADNPmtIkEs1ipZ4MjhI2gTTlyf1sbWhZFSQilVOpAbKraamr20+OI6K0q Y8y3oshFQr9XJpKS11OI= X-Received: by 2002:a2e:a811:: with SMTP id l17mr3173599ljq.81.1644080661625; 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: 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 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