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 D2B8DA0093; Tue, 10 May 2022 16:36:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73CFC42836; Tue, 10 May 2022 16:36:11 +0200 (CEST) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by mails.dpdk.org (Postfix) with ESMTP id 697CD4069D; Tue, 10 May 2022 16:36:09 +0200 (CEST) Received: by mail-io1-f44.google.com with SMTP id i20so18743403ion.0; Tue, 10 May 2022 07:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j+tJXky5mNV1DdjTPFlTFSFeFGj2Fa5K2p/WVPALAJQ=; b=Lu3bwaQy7jZB+TsMhNWr3pD+xPyv7zcittSUc2M89owO3cMKMDvhcDWy6Ad0dgw38H AZFKHQVcTyBWHljYaZtwY/xm2MncZX9lj/bw+SEq6eZX/+Gwh480HVrr+ODPBn5BKypo FBGNxgdaC+y3ZgZCq+pw9WuL7kjVDAIWAUZM0Fzls/0Gg05fKQh71G4+yrl7X0FjABt5 V5oWwRj9co/PP532DOA++g8d3qbKHPtqR8hBbUbtMoZe5it0mGMZxiPPGXBmlZ8O+hno XJlubozplpJUkdI1Wh7VjNWJtbZYFkD0iq9Ctr0kIY4yOv16egMgjQ9LZZJzQiEvoZsY ZM5w== 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=j+tJXky5mNV1DdjTPFlTFSFeFGj2Fa5K2p/WVPALAJQ=; b=3s73CvGnETUul0IxBWu0bqDLb1jLghA0VNtQZ+dl3inRzSGMEZwVNQbGuncSHaa0Zd yk/Hmc10sJCEMIt7tiD07ijiT1u+gNg9iZwVjsb47XEi0ZHJT0fA43nf4TVd/gHCHkVi MkFah9VswDSPA68IiIdMWFJjrkYsCJYK93NsG+nSXu6//nWWvvEJuKqDBrtQ+zrAt3+n GlSkjLh48vHD4YgiD2T/R3670NJK16ZKipTbJYTfiAHgheX8ebzF9boqkXqW42uXNCJy 4GF/2AdnvJLHN+1qNcPI5d3M9+MqUq5gPD4u0L7y8x1VDdfkOIjbt3bovQfuPkq1Qpqq VxJA== X-Gm-Message-State: AOAM532MNBYFcoaVexxM5nXLqv28t/RhZpXpeyV7y2RtrjfA4DIxXBcN 9UtbPWtdBY+tAutJfswPb6X00EntRY/BnHXu+hs= X-Google-Smtp-Source: ABdhPJxJGbriHjg118VrtbO9LK5huiMNVMn1UcJotoaHjOcVQ9UPFSbcxQ7kfQLIeoVxrFUIu59CIsaCSNvxQ+rR+HQ= X-Received: by 2002:a02:b899:0:b0:328:522b:9417 with SMTP id p25-20020a02b899000000b00328522b9417mr10165612jam.79.1652193368692; Tue, 10 May 2022 07:36:08 -0700 (PDT) MIME-Version: 1.0 References: <20220324152830.28155-1-david.marchand@redhat.com> In-Reply-To: From: Jerin Jacob Date: Tue, 10 May 2022 20:05:42 +0530 Message-ID: Subject: Re: [PATCH] eventdev: fix telemetry Rx adapters stats reset To: "Jayatheerthan, Jay" Cc: David Marchand , "dev@dpdk.org" , "stable@dpdk.org" , Jerin Jacob , "Naga Harish K, S V" , "Kundapura, Ganapati" 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 Fri, Mar 25, 2022 at 3:02 PM Jayatheerthan, Jay wrote: > > Looks good, thanks for posting this change. > > Acked-by: Jay Jayatheerthan Changed the subject as: ventdev/eth_rx: fix telemetry Rx adapters stats reset and Applied to dpdk-next-eventdev/for-main. Thanks. > > -Jay > > > > > -----Original Message----- > > From: David Marchand > > Sent: Thursday, March 24, 2022 8:59 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Jayatheerthan, Jay ; Jerin Jacob ; Naga Harish K, S V > > ; Kundapura, Ganapati > > Subject: [PATCH] eventdev: fix telemetry Rx adapters stats reset > > > > Caught by covscan: > > > > 1. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: > > logical_vs_bitwise: "~(*__ctype_b_loc()[(int)*params] & 2048 /* > > (unsigned short)_ISdigit */)" is always 1/true regardless of the values > > of its operand. This occurs as the logical second operand of "||". > > 2. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: remediation: > > Did you intend to use "!" rather than "~"? > > > > While isdigit return value should be compared as an int to 0, > > prefer ! since all of this file uses this convention. > > > > Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry") > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > > --- > > lib/eventdev/rte_event_eth_rx_adapter.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c > > index ff83ce8b67..bf8741d2ea 100644 > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > @@ -3334,7 +3334,7 @@ handle_rxa_stats_reset(const char *cmd __rte_unused, > > { > > uint8_t rx_adapter_id; > > > > - if (params == NULL || strlen(params) == 0 || ~isdigit(*params)) > > + if (params == NULL || strlen(params) == 0 || !isdigit(*params)) > > return -1; > > > > /* Get Rx adapter ID from parameter string */ > > -- > > 2.23.0 >