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 CDAD1A0093; Wed, 9 Mar 2022 02:26:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2D6C40687; Wed, 9 Mar 2022 02:26:40 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 5014340395 for ; Wed, 9 Mar 2022 02:26:39 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id k5-20020a17090a3cc500b001befa0d3102so2958798pjd.1 for ; Tue, 08 Mar 2022 17:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M8tu32a6fMxIOGF5SXy3qhFcOb2yKWRYNi528Jz8RlM=; b=RgfcvN0Vz+rLtTeUSbPUp5EGNUb8x2dtFngo/ronq6HRgNl87OuMH5Se2LruX60mou r+wOJtCJFNd9fFgXMau7nLYBMz2WvZcKZeqUDXSJXFqEJEqhCvPzw1MBMgEAZF/y8Cza 7O9bZeIMzN/D/CGeDMrLdU2rZynmbEuDug9lTj8qczRQqdYMjLdyS6DKwmE65wAiH9aV 0nlNsrDQJNhp4Pr9Z1pe3vpcYsIehXk+cRkW/p71x/9GDxlnTegNdTbSuidOL3tk/8nj gEzQDs7zRHHEqh75fn1yHxiwpjkQFgdyKYkp+UWhn1Thw0PqdZ8reP76/3Xgb1kvbwsg Uerw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M8tu32a6fMxIOGF5SXy3qhFcOb2yKWRYNi528Jz8RlM=; b=LCXr0qWbaOT4yKmROGQ0X62TNQRGJuQa/ZOuiSy/HPhwiN64fY3bHleNumKtc3QY7M bCaFR2tbLE1PJdLFWOGs2wuZesGWPTr7Qr6JgmuP+c+YkeJ2qWfgfBKqCKJN5hA3/Go3 S5lULufx7I7dZN3qIDcZM6/nO6patrGVVFsIdbQcgjM+8er/j7EckMOltWXPy0UMKJIi Qj2aId8CLVEJ2O5iAiEsD8BojjesT/zX94ATd4KTyG96j+8oZz6bPxIwP8y0FTKPLvY3 2xvTVMe9m6KHSTX4NmkFewl60QhtrGbqSdmlgIWkeFnEF242FMg4s3F7Y/poWcfdYNTr fyGg== X-Gm-Message-State: AOAM530W+xIMrtW6IFa2KQIz9dnrRmrtxT7rRXP2buXMYB+mMyOyu8yI rpSxggDb0muy4zRNodB7MellNg== X-Google-Smtp-Source: ABdhPJycBTnKGul2/hz0W95bzw6A82fMZh8lJdnzx1GThEe/sb6Eytp8ShiRMygw2OPV+NnZLV8f2w== X-Received: by 2002:a17:903:188:b0:151:ec83:4a88 with SMTP id z8-20020a170903018800b00151ec834a88mr12762222plg.89.1646789198535; Tue, 08 Mar 2022 17:26:38 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id m17-20020a17090a7f9100b001b9e4d62ed0sm4069842pjl.13.2022.03.08.17.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 17:26:38 -0800 (PST) Date: Tue, 8 Mar 2022 17:26:36 -0800 From: Stephen Hemminger To: Gaoxiang Liu Cc: chas3@att.com, humin29@huawei.com, dev@dpdk.org, liugaoxiang@huawei.com Subject: Re: [PATCH v4] net/bonding: another fix to LACP mempool size Message-ID: <20220308172636.0890f0ee@hermes.local> In-Reply-To: <20220308142402.2455-1-gaoxiangliu0@163.com> References: <20220305070922.308-1-gaoxiangliu0@163.com> <20220308142402.2455-1-gaoxiangliu0@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Tue, 8 Mar 2022 22:24:02 +0800 Gaoxiang Liu wrote: > + cache_size = RTE_MEMPOOL_CACHE_MAX_SIZE >= 32 ? > + 32 : RTE_MEMPOOL_CACHE_MAX_SIZE; No need to open code a min(). cache_size = RTE_MIN(RTE_MEMPOOL_CACHE_SIZE, 32);