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 3320342B22; Tue, 16 May 2023 13:04:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBCC840A8B; Tue, 16 May 2023 13:04:05 +0200 (CEST) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id C8BD34068E; Tue, 16 May 2023 13:04:04 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3075e802738so12838575f8f.1; Tue, 16 May 2023 04:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684235044; x=1686827044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lpz7yaEyLLNS1dJvXe880kIp/TWgDicMFSfwZlwlDkQ=; b=DjWFM+7+2VvSXFgX9CK6lR0kepFSdoGYbSaX4FsqtCTqgyLrXiiBXKBuO85P2Lq16E UOyPFnhjRU4agLDHKorpWNAyVHjevWs1MJchHPgTMHmSrTY+zrlpuPbdLV2vCjkefDhW p1U+u/WeLRP56KnpG5icPcNIWs8sVDneEVtaAWa6wh1hnvswloSjtTs2lmJcTwdr/Yvv 2VdViTDghmeEzmYmxi9FsIKOY20ZEo4AsQqgnK6CE9rT/grPGQVoSlP7T/xALeJgT15B 9L4xunBI5I5eHJM8b7A8TvIgG5FoZ7la7ogA3yV2wbmx1Vesk79Sv7X+IlQfYL/6+ZKB /Tcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684235044; x=1686827044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lpz7yaEyLLNS1dJvXe880kIp/TWgDicMFSfwZlwlDkQ=; b=GMIPMiUK97mOr2s+Gk2RIlj2sGbrgKu5dQQQajixtKbmUx/f6QnJ5WPWua3C+J6FoC 2Nqkc5jdSETBdqZfGuyAu1qT3w5C7PepUX5H7rNLpTn9Hlj73sLWJyc/ydwRz64h+Q8q A082W9wr0QwkTVgvcrYBkxxyTrsyKadJr0gPmbTpq3blXL2h8MrLTU0YHvUk8PXFKN7z 0GyqwzcCcJmpJbJN+NCpYjtwnMkGH+YuH03k+lzgwBt2KnTeceVfc+zNyHeq4v4KgC42 5XMq+l8hwauWVxEWZznMmz62VgOFCyNA0xcKp9L5c2RB1FtNB5TJ0fwPnhEcEeHoHer4 OpPg== X-Gm-Message-State: AC+VfDxRI7BgcZuCPnpkmbitRxdrl4igFGTVKiv6qnCQzM/IfDKHyLUs PJmgt4cyRMMYoP5IIrTuocdgIFFkDnI= X-Google-Smtp-Source: ACHHUZ67cZ2/vzcbLlLpQEiIq3zt+fBX9JKU98mEUsr6JDcat+sGtqj1Msj8EsJMisRW8uHQLOyycQ== X-Received: by 2002:adf:f492:0:b0:307:a36b:e7b1 with SMTP id l18-20020adff492000000b00307a36be7b1mr21195277wro.5.1684235043833; Tue, 16 May 2023 04:04:03 -0700 (PDT) Received: from spgw-dpdk.epc.mnc001.mcc001.3gppnetwork.org ([176.236.170.162]) by smtp.gmail.com with ESMTPSA id t1-20020a5d5341000000b002ff2c39d072sm2221245wrv.104.2023.05.16.04.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 04:04:03 -0700 (PDT) From: Yasin CANER To: dev@dpdk.org Cc: stable@dpdk.org, stephen@networkplumber.org Subject: [PATCH v2] lib/kni : coding style is fixed Date: Tue, 16 May 2023 11:03:59 +0000 Message-Id: <20230516110359.479441-1-yasinncaner@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230516104853.479297-1-yasinncaner@gmail.com> References: <20230516104853.479297-1-yasinncaner@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Coverity issue: Bugzilla ID: 1227 Fixes: Cc: stable@dpdk.org Cc: stephen@networkplumber.org Coding style is fixed --- lib/kni/rte_kni.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index 2244892aae..703333c2da 100644 --- a/lib/kni/rte_kni.c +++ b/lib/kni/rte_kni.c @@ -683,20 +683,21 @@ kni_allocate_mbufs(struct rte_kni *kni) RTE_LOG(ERR, KNI, "No valid mempool for allocating mbufs\n"); return; } - /* First, getting allocation count from alloc_q. alloc_q is allocated in this function - * and/or kni_alloc function from mempool. - * If alloc_q is completely removed, it shall be allocated again. - * */ + + /* First, getting allocation count from alloc_q. alloc_q is allocated in this function*/ + /* and/or kni_alloc function from mempool.*/ + /* If alloc_q is completely removed, it shall be allocated again.*/ + allocq = kni_fifo_count(kni->alloc_q); /* How many free allocation is possible from mempool. */ allocq_free = kni_fifo_free_count(kni->alloc_q); /* Allocated alloc_q count shall be max MAX_MBUF_BURST_NUM. */ allocq_count = MAX_MBUF_BURST_NUM - (int)allocq; /* Try to figure out how many allocation is possible. allocq_free is max possible.*/ - allocq_free = (allocq_free > MAX_MBUF_BURST_NUM )? MAX_MBUF_BURST_NUM : allocq_free; + allocq_free = (allocq_free > MAX_MBUF_BURST_NUM) ? MAX_MBUF_BURST_NUM : allocq_free; /* Buffer is not removed so no need re-allocate*/ - if(!allocq_count) { + if (!allocq_count) { /* Buffer is not removed so no need re-allocation*/ return; } else if (allocq_free > allocq_count) { -- 2.25.1