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 64127A00C5; Wed, 20 Jul 2022 19:33:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEAF740A87; Wed, 20 Jul 2022 19:33:00 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id EA6F640A7A for ; Wed, 20 Jul 2022 19:32:58 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id c139so10781736pfc.2 for ; Wed, 20 Jul 2022 10:32:58 -0700 (PDT) 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=9gH0kB6qa8r9tQiozP0PM8M65tbbQi7cq2Wp2hYbWjA=; b=Wi2WYSfJ2imZitwcCfQWKRu/2l6/bFIMvIBWCb0w9XKqX4eTnhao+RRWqN1PKhKzE7 IQIPqSeeS4rWTyRw/bZngianyTUOuX+JQRNDKYl6KGAUgFsgC7xq2eGIq+/3l0vqJ49L dHLwIbC6EndfZxcIZEt4zeBL2dx7ulo+hTZJTNNqYtkZVtT1KTlJgSqTuDoo8so9RTCK 3mURaYbDW7Ey8kdRwohcSadH87ifnEjby0wqWd6l6S1pTjifRuRcXqLKl04nYPNjb6hr ezpUxYlC/BjKVgsHkTltyrH0CtswA4MDvulpIHZB4uZVfmCNgrIokd7prD/x/Vz8/aYr olvQ== 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=9gH0kB6qa8r9tQiozP0PM8M65tbbQi7cq2Wp2hYbWjA=; b=Qa4q0i4ew38ooAihdWouRb5FFKtSWgzJ+QdtEKJ0Xjm12kDNfYqIhjuhMcmmUTsDc5 apAE0CSl0DpdPYfXZqBdjiwnNmd5qyuYUFqDMhZch+PH+wWp9VMvPjnsG72hH2W59UMo gnks18RyTwfHS58RqTPfzBqGw8MJZQ0QjbH/CTgI8lRrhYjDVJmebDUOhAm+SAwE127G a4TlwTlMiMMs/cY/dbGuu0+8HDJLvMZPW6tJN39tOzrrSeZPdTs2HYaf+lQtpZIPmmQc 5lJKwJU6ml0V4RB7hukKWWXGWx4T9atUflFnwrlP5qZq6PvE+yhJU+TgKZHK6ENC7toj 4tQA== X-Gm-Message-State: AJIora98py+nMXMnEb4lToZY8USo2P3pJfONxpyW9PXsUs82oHs+S2BT PSDE8g29Dg6CQ0XbEbTPRDc5jg== X-Google-Smtp-Source: AGRyM1v0bqT5zkMnizRF3DFXpQqGGLsYkKkSPRTsLuAl6z+qGsMPhfLqx1jwilQXEby1KNa3Uj6Q5g== X-Received: by 2002:a05:6a00:1386:b0:52a:d2cb:4054 with SMTP id t6-20020a056a00138600b0052ad2cb4054mr40040259pfg.54.1658338377888; Wed, 20 Jul 2022 10:32:57 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id i5-20020a17090a4b8500b001f0097c2fb2sm1990665pjh.28.2022.07.20.10.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 10:32:57 -0700 (PDT) Date: Wed, 20 Jul 2022 10:32:54 -0700 From: Stephen Hemminger To: Rahul Bhansali Cc: , Bruce Richardson , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH] examples/l2fwd: add check of Rx packets count Message-ID: <20220720103254.0a7a0c4e@hermes.local> In-Reply-To: <20220525091327.4006824-1-rbhansali@marvell.com> References: <20220525091327.4006824-1-rbhansali@marvell.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 Wed, 25 May 2022 14:43:27 +0530 Rahul Bhansali wrote: > An additional check is added to avoid extra processing if > receive packets are 0. > > Performance impact: with Marvell OCTEON TX2 platform, observed an > improvement by ~14%. > > Signed-off-by: Rahul Bhansali This makes sense. Could drop the unlikely() since in general unlikely should be reserved for error cases. But doubt it matters at all. Did a quick check the other examples do similar thing already. Acked-by: Stephen Hemminger