From patchwork Wed Nov 9 19:53:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119652 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B53B6A034C; Wed, 9 Nov 2022 20:53:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE0BA40150; Wed, 9 Nov 2022 20:53:38 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 21516400D4 for ; Wed, 9 Nov 2022 20:53:37 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id f5-20020a17090a4a8500b002131bb59d61so4087764pjh.1 for ; Wed, 09 Nov 2022 11:53:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=yAXi9t9qXnDdLCvHb+CVQXhE0+9sAIZYsFecpV6ZpWc=; b=UX5m90O746couZGygvlZXwOn1+w4MQLzyRe4iv0PG5S3hPnhl3mxae++1/HAhw/K++ P8207XV3Xy7UgwA7+nBR8kZIgV/39imFQmP3KNeh21G9H5JKz15D1ANODJiZ5+iC34lH 3V8d2aemTJ8MuVfHj9vFMHFBKObhhudzyGrPcieZ2Uxw7HFFEBt+g6/2EO2ttBt7ncWs +w+vT/fJ21L8aeyP9U7teKrx5CjTb/UyVfBR1/fKET5WD8wrPEdDkzDObPUojLc5Hkha MLnS+/FIBmUV0z2UmqgrbPTPctKyVt/+pw1DOjCAMU+x1JILJsKOnN8F4Jb0WqGdd+cT c9eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=yAXi9t9qXnDdLCvHb+CVQXhE0+9sAIZYsFecpV6ZpWc=; b=Ha1iKxQqumDNUOeq6eKDNoZ9O0sObsSWSN86QPGVFgwpON+jzfPRxfM3wViTS6DP9O elWRsVM4BwZXAf4xvFzjgJwOY8s4D+LsSyfwAI8HCc9hmR5UFEPAtBqFBSNxSHfi/Ueb 8EZcpGQ3GQUadMQXxEOpHtHd6qjRpyJuWGmjnhN8K9mrDT6hk7fuCDHK8cNaQncfzE5+ wHIFRw+juSoQuEyGTJSvJHfUByS/5TtXJXCDTp7xUgyMk6MWhNC/rH4z3u+Jzm8fFiY4 I1eZ9WNK7jCTqILa1Lw4TatpBgeyN6TzD3iK1dSnLSNC3Jd+apJKpnr7OnDSr6wjy/r1 WtoQ== X-Gm-Message-State: ACrzQf2G0UaiejK45aXxb/gZ+AILiHpAURlMzjDrvI6D4GaY8BfjoMCd dyvgvk1pO/9OJVEKyPh28N2PDfrt3ECiBg== X-Google-Smtp-Source: AMsMyM5rhb23w9a6Whg/U8Dz+zHYge5pmmQ4kR8SKwW45lXJ7amLn4nFmoBjePuFc/mXCynCNzNyfg== X-Received: by 2002:a17:903:1d1:b0:187:3f0b:af76 with SMTP id e17-20020a17090301d100b001873f0baf76mr43582807plh.145.1668023615918; Wed, 09 Nov 2022 11:53:35 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harman Kalra Subject: [PATCH v2 01/14] eal: fix whitespace Date: Wed, 9 Nov 2022 11:53:18 -0800 Message-Id: <20221109195331.143473-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- lib/eal/linux/eal_hugepage_info.c | 6 +++--- lib/eal/linux/eal_interrupts.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c index a1b6cb31ff1a..b6d751a2ee97 100644 --- a/lib/eal/linux/eal_hugepage_info.c +++ b/lib/eal/linux/eal_hugepage_info.c @@ -180,8 +180,8 @@ get_default_hp_size(void) FILE *fd = fopen(proc_meminfo, "r"); if (fd == NULL) rte_panic("Cannot open %s\n", proc_meminfo); - while(fgets(buffer, sizeof(buffer), fd)){ - if (strncmp(buffer, str_hugepagesz, hugepagesz_len) == 0){ + while (fgets(buffer, sizeof(buffer), fd)) { + if (strncmp(buffer, str_hugepagesz, hugepagesz_len) == 0) { size = rte_str_to_size(&buffer[hugepagesz_len]); break; } @@ -231,7 +231,7 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len) if (default_size == 0) default_size = get_default_hp_size(); - while (fgets(buf, sizeof(buf), fd)){ + while (fgets(buf, sizeof(buf), fd)) { const char *pagesz_str; if (rte_strsplit(buf, sizeof(buf), splitstr, _FIELDNAME_MAX, diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c index d52ec8eb4cd7..3be1b090be9e 100644 --- a/lib/eal/linux/eal_interrupts.c +++ b/lib/eal/linux/eal_interrupts.c @@ -1073,7 +1073,7 @@ eal_intr_handle_interrupts(int pfd, unsigned totalfds) struct epoll_event events[totalfds]; int nfds = 0; - for(;;) { + for (;;) { nfds = epoll_wait(pfd, events, totalfds, EAL_INTR_EPOLL_WAIT_FOREVER); /* epoll_wait fail */ From patchwork Wed Nov 9 19:53:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119653 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BE0DBA034C; Wed, 9 Nov 2022 20:53:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D13D3410E7; Wed, 9 Nov 2022 20:53:39 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 942A540150 for ; Wed, 9 Nov 2022 20:53:38 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d20so17013798plr.10 for ; Wed, 09 Nov 2022 11:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=fkvice1uZC16ljXvnhDIqIejiYk/cI6wS7NVqtH4oMg=; b=qtviwTGr/dKYPoGG7eMMb5+A53IpA5CdWJypM2JshWwhqaAF3jqVz+ImZBe6ULt7EM 2O3Xtyt8P8baoC5wU7GeYOQPI9hiRJCBVPMu0jFKhLS9Clw+UhugWAxoGsg40xTN+gq4 Kf6lHElwXpWKRlBndsyD/KSgHr+2JRRKu9ImwREJGwn7USGzgU6Pjqr5mnrGJjWSuGG3 19HyfNfQy3pgdVBg4pcAU1rMWO075voUZxw5Ej1JavVuIwiIN/Z2TMGnVjPj4Q/8sUxr XQaa5EeavP+EYVUYJLxxRYUBG66y3GhvWhmmwOVa37E13aqlTEpYdCjuVZgtH4ucPQXa O+gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=fkvice1uZC16ljXvnhDIqIejiYk/cI6wS7NVqtH4oMg=; b=ce2+9P/tPaNZM5owhGzL8ffUVJYySRhAFvC+oXYflhEVxRr3lWZjYOTdPXJhme4s+5 q7yNLavf+VUNixBUGlQNrV07VxpzjKKGgFMYUJtvPG9WgW60VKwbYLku/EPFWt39dxdW dsfUvqwUhEn216WUdMuCKeoj2bzk96FBeeY7/5TxkJ+cq+3bN0vpG6Z0pYH+3dzBTXQn 5tCA9zzDcmIGFRWAVijjK/oKRpgu5856aoA7WS3ZY1wD0pOzsRngq0nxqAbWtvLIE68b ESLcS92hAOEQOl5MroJ9vo2uRog1LJBkLR7NE1/dcB4IYnvtTmIX0q5K+ctLQ1K3DDGC V9AA== X-Gm-Message-State: ACrzQf32gjlpMTF/Ga9dv0t9oY/vvmwrJo0QTekdEH9lxieO+D5svGEH C5zmcsponHxkaBPBbxHW9kYt9TYWH3PtfQ== X-Google-Smtp-Source: AMsMyM7dPmy0Lt+PVEkeA9RQxC6RC6BEVMyOLcl0nCtxy3upfTFZyi1yHRQgnhWT5X3fo++6wveoXg== X-Received: by 2002:a17:903:2452:b0:186:99e0:672d with SMTP id l18-20020a170903245200b0018699e0672dmr62936966pls.95.1668023617459; Wed, 09 Nov 2022 11:53:37 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:36 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz Subject: [PATCH v2 02/14] cmdline: fix whitespace Date: Wed, 9 Nov 2022 11:53:19 -0800 Message-Id: <20221109195331.143473-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Remove unnecessary spaces in if expressions. Signed-off-by: Stephen Hemminger --- lib/cmdline/cmdline_parse_string.c | 16 +++++++--------- lib/cmdline/cmdline_rdline.c | 12 ++++++------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/cmdline/cmdline_parse_string.c b/lib/cmdline/cmdline_parse_string.c index d756638905a2..ab1ef4b22e40 100644 --- a/lib/cmdline/cmdline_parse_string.c +++ b/lib/cmdline/cmdline_parse_string.c @@ -73,20 +73,18 @@ cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *buf, void *res, token_len = get_token_len(str); /* if token is too big... */ - if (token_len >= STR_TOKEN_SIZE - 1) { + if (token_len >= STR_TOKEN_SIZE - 1) continue; } - if ( strncmp(buf, str, token_len) ) { + if (strncmp(buf, str, token_len)) continue; - } - if ( !cmdline_isendoftoken(*(buf+token_len)) ) { + if (!cmdline_isendoftoken(*(buf+token_len))) continue; - } break; - } while ( (str = get_next_token(str)) != NULL ); + } while ((str = get_next_token(str)) != NULL); if (!str) return -1; @@ -108,7 +106,7 @@ cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *buf, void *res, /* unspecified string (unknown single token) */ else { token_len = 0; - while(!cmdline_isendoftoken(buf[token_len]) && + while (!cmdline_isendoftoken(buf[token_len]) && token_len < (STR_TOKEN_SIZE-1)) token_len++; @@ -149,9 +147,9 @@ int cmdline_complete_get_nb_string(cmdline_parse_token_hdr_t *tk) return 0; str = sd->str; - while( (str = get_next_token(str)) != NULL ) { + while ((str = get_next_token(str)) != NULL) ret++; - } + return ret; } diff --git a/lib/cmdline/cmdline_rdline.c b/lib/cmdline/cmdline_rdline.c index 5cf723a0126a..b5927879d48f 100644 --- a/lib/cmdline/cmdline_rdline.c +++ b/lib/cmdline/cmdline_rdline.c @@ -301,7 +301,7 @@ rdline_char_in(struct rdline *rdl, char c) /* delete 1 char from the left */ case CMDLINE_KEY_BKSPACE: case CMDLINE_KEY_BKSPACE2: - if(!cirbuf_del_tail_safe(&rdl->left)) { + if (!cirbuf_del_tail_safe(&rdl->left)) { rdline_puts(rdl, vt100_bs); display_right_buffer(rdl, 1); } @@ -354,7 +354,7 @@ rdline_char_in(struct rdline *rdl, char c) /* paste contents of kill buffer to the left side of caret */ case CMDLINE_KEY_CTRL_Y: i=0; - while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < + while (CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < RDLINE_BUF_SIZE && i < rdl->kill_size) { cirbuf_add_tail(&rdl->left, rdl->kill_buf[i]); @@ -403,10 +403,10 @@ rdline_char_in(struct rdline *rdl, char c) tmp_size = strnlen(tmp_buf, sizeof(tmp_buf)); /* add chars */ if (ret == RDLINE_RES_COMPLETE) { - i=0; - while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < - RDLINE_BUF_SIZE && - i < tmp_size) { + i = 0; + while (CIRBUF_GET_LEN(&rdl->right) + + CIRBUF_GET_LEN(&rdl->left) < + RDLINE_BUF_SIZE && i < tmp_size) { cirbuf_add_tail(&rdl->left, tmp_buf[i]); rdl->write_char(rdl, tmp_buf[i]); i++; From patchwork Wed Nov 9 19:53:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119654 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B78EA034C; Wed, 9 Nov 2022 20:53:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E2F041133; Wed, 9 Nov 2022 20:53:42 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 3A052410FB for ; Wed, 9 Nov 2022 20:53:40 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id b29so17652357pfp.13 for ; Wed, 09 Nov 2022 11:53:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=b1WcfSMTUpWNCO1EbJfT3lp8xDOEHidPF/QX2vmYEtI=; b=TidxOgyxk5Np3f6R1ixvD4x8noHl8q1Wqh2M5JuxUfepDvcrS4r7ZD/08IJUjQrYzN 93tj9BaD8nHzVZt5IkoikQmPv6upijJSgnprNawZXzN/q4SZoUXHh3WMqbt6ua+IP7xt raIKpWIWj1HnRemAIo9inuK/WhaxU0a7WKHlL3GqYFnwbSrke5qSIryRR4WQA/V/OH+m eQPACGUWGx7czSdxHhJmt7+xKpgs5O9LOMhpwXlfvbP8mug7SwOfkgwYAm6VfDsaKWb1 4FX2hKaMZ/2JsXKfIjH3v054MWCXDtBzlgpQHrJ4XkYaZbucdJ2of8KfJYAZV6Gx1SXE aibA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=b1WcfSMTUpWNCO1EbJfT3lp8xDOEHidPF/QX2vmYEtI=; b=XdV4N6uoCOi9JUkaPWyN376vV3vOEzfXz7FhhKmg8wE6g2P4G3zyZ8irrC92RLSkSt HJmkQxobR9hbpeAwnf2+sKE6fReXOz7oLzukIwEXdLi5nqaaT48V7oD7xPPol1SI1C2d x0TKxl4Cju+yn9SDaSOxIgksj/61+YeEv/E3p64OwCQVBk4919pj45PgCFP93DDv7e+t FaQf7zK3w+E5dQC1KPhRf/G+VFS9SMNY+p3UvE64rQOYFJ+4k3YVd4gEZaAmK0XS0dic G+K2QNMOqykV7YfIRcJSqd3jg7k6nVe+E13gSodZY2QXLN1YiOMuHjLSKK2f08UDjKmB FsXA== X-Gm-Message-State: ACrzQf38QfFKGhuPohe/1H2triEMgfYjA4+CbQXOr8EFMhqsmNj4vQBF Bxb5gRLG5RxfflBIKoNvWf7wQfim3uWFuw== X-Google-Smtp-Source: AMsMyM7nIbpPsZC2bWO3X+CFzuSrMwaPR/eR4FF8IUTgzKDh8+sks6SLDki3jFV1A9AUvuIkVdMKrw== X-Received: by 2002:a05:6a00:80d:b0:56d:93d8:f42f with SMTP id m13-20020a056a00080d00b0056d93d8f42fmr50168693pfk.14.1668023619062; Wed, 09 Nov 2022 11:53:39 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:38 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Erik Gabriel Carrillo Subject: [PATCH v2 03/14] timer: fix whitespace Date: Wed, 9 Nov 2022 11:53:20 -0800 Message-Id: <20221109195331.143473-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- lib/timer/rte_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c index 85d67573eb9e..9eb73f1fed13 100644 --- a/lib/timer/rte_timer.c +++ b/lib/timer/rte_timer.c @@ -350,7 +350,7 @@ timer_get_prev_entries(uint64_t time_val, unsigned tim_lcore, { unsigned lvl = priv_timer[tim_lcore].curr_skiplist_depth; prev[lvl] = &priv_timer[tim_lcore].pending_head; - while(lvl != 0) { + while (lvl != 0) { lvl--; prev[lvl] = prev[lvl+1]; while (prev[lvl]->sl_next[lvl] && From patchwork Wed Nov 9 19:53:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119655 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C38BA034C; Wed, 9 Nov 2022 20:53:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC7EB42D0D; Wed, 9 Nov 2022 20:53:42 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 1F15F4113D for ; Wed, 9 Nov 2022 20:53:42 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id u8-20020a17090a5e4800b002106dcdd4a0so2874177pji.1 for ; Wed, 09 Nov 2022 11:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=jJ0X6Dq1D/GY6I6E4pJhph+lV2hSiKEeD8AtC+fUPco=; b=44Qzh4rcVjYTUoitNbYkJTcR9WbuG3XK51V9VvyC7m36aGGvOKY7AEYK7lZIJT6MVZ +a7AlaYeElCfYUzgiaTyBAD4iU3buiM9NcHMHwrRTx8v+Ew7d/NK/kYYXf2BEs4lARJ6 YoK1VCY36Cy+w6Mg3gs0UI5TtJ8yl6inu8pFTxOG6t7RkYLyhBqGP4SjclB+H6QLL0Hl 6Y6mAZDrOPcz1umkFMSpvyf/zy20j29b7uvUFUjoSLameEbneOc8YKNniKf+cOnkPVUu Fp0OIHr9Wcsn3BQYc7ENp7IvMpRPJtwuQX+0/aTxGo82Kl5rDg/VdWfomqDQmvog16vd lVvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=jJ0X6Dq1D/GY6I6E4pJhph+lV2hSiKEeD8AtC+fUPco=; b=1aKfdXvhRSE2TUtJBBVZ9LRxHRYp5hekpfQC2ilJ6qxkeOw2zPdEfmXjcCQS+7ctSI kB/npwXRfAj31JJlwW1WyFO/LlacIKPl7Wzmw9OJb5Yp3+nb39RGvzmOaQdEcEPHc5vY QC99vOEsLyNtZErriC0/ED0yLsfQNKKqrDIfh/Uv44J+RKVmT1cecd82TbGd4O2nvejl TPwNBT0wNl53IzahAWlTQ29SVK+NnBtP8PP6z3WjR5QBWI8QHAwr9FhhRQov8JjkX/LE grAy1swbx2DwFQl019LpCMcFyTVtBXCeWR5MLPwnlRQsENnVUvRJphHAr/5DYiCUUUhQ fWMg== X-Gm-Message-State: ACrzQf0biD/f3q3baubHFGUc3FKhau3/pngb4sTSDRXqVa3/jxhY0Bz9 pw1v85h06e4tiAr/93U/A+4spuw4jmZrwA== X-Google-Smtp-Source: AMsMyM7aW1uPDGW7Q7/uWbCAAtwerT4bPhkl0Mh6vOEbc0HQtI3VRiR6ieR9HZDa05DfkE9aLO8mpQ== X-Received: by 2002:a17:902:7283:b0:188:612b:1d31 with SMTP id d3-20020a170902728300b00188612b1d31mr31931841pll.81.1668023621285; Wed, 09 Nov 2022 11:53:41 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:39 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev Subject: [PATCH v2 04/14] ip_frag: fix whitespace Date: Wed, 9 Nov 2022 11:53:21 -0800 Message-Id: <20221109195331.143473-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- lib/ip_frag/rte_ipv4_reassembly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ip_frag/rte_ipv4_reassembly.c b/lib/ip_frag/rte_ipv4_reassembly.c index 4a89a5f5365a..88ee0aa63f62 100644 --- a/lib/ip_frag/rte_ipv4_reassembly.c +++ b/lib/ip_frag/rte_ipv4_reassembly.c @@ -34,7 +34,7 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp) for (i = n; i != IP_FIRST_FRAG_IDX && ofs != first_len; i--) { /* previous fragment found. */ - if(fp->frags[i].ofs + fp->frags[i].len == ofs) { + if (fp->frags[i].ofs + fp->frags[i].len == ofs) { RTE_ASSERT(curr_idx != i); From patchwork Wed Nov 9 19:53:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119656 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2A2B2A034C; Wed, 9 Nov 2022 20:54:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 887C642D0C; Wed, 9 Nov 2022 20:53:45 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 1437842D23 for ; Wed, 9 Nov 2022 20:53:44 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id s196so17127619pgs.3 for ; Wed, 09 Nov 2022 11:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=oxp2qItKxyvIxvIPqZSW9JotSdGmvWXvGA1HWz5sGLE=; b=0Uea08r8LXNEmi/tqTRepvFTWdUSmodHM3fCcjTTuU8as/S25V06NVBbZuMU2G7+zH BAQmxjjKf3+oVQWp98nDJ+Wb887895+nvYdjI/hMgORTTAJTjFSrjJxv9K3M+VC9v2dz EIZ8QDKBsMOiPpqroTvcneReNZJ/7tSZ3qa+TmRxWjw7Ju3HWTS4XB5nksb0fAU3JhPB E0YayNO/E+Iei/wDQSW8Uqtl9dh0Kwr05f8tlI63zgEtE/1ADY7dyfzwsewK6CEPNVrK 0R8KfUf9ETj9oO00IV4Qd/x5C/R923WXHoz10j1CSiuUW4L3vjrXHSXd76PE8YTQp3VJ YeGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=oxp2qItKxyvIxvIPqZSW9JotSdGmvWXvGA1HWz5sGLE=; b=7b1soNIzgQiihjVMFBbyUpnHKz73BKxQOWqHk3xGIWbyO7ExLA2mo3wb/Wt7qmtldH o0tCvstDl9fqVGUvETnGLegdg9gvzTsYE+9/KMrMRnaE2ewOSRkGSp01MThlUBEwyUdT 4e9HvdZOiSgZxIQoQZuQlUEdoc2O9EhW5NHkGg9xcQ7QG+2/437NeHc/jqkC8GXV0ctd rM9Uuu/6WFeCfZ3gK0ZTV2FtUFPo+WZpvvxdmb6ih2B9XjCtv25xrLKa3pOUXLUGolDK CXFAzGjbw3iWoN0J3kYZcPTcAfbf6Y4CDjEICXdTU67hmeSGiq8GBOkso32skjjdzaQ0 rO2w== X-Gm-Message-State: ACrzQf3I0545xrOhxZzLOBsIHv9sPj5rGlFlQXyVemVGk+s06T0oMeQO A9lt0oI11jynfTTHGORGOMPy8o4mLSwRqg== X-Google-Smtp-Source: AMsMyM685DIlHlaIUq/8FRysDkLPgjqzoD3Rq6xZjojLEXCJAv+pCZ6BoBWkUTLd26RPZhxNbpfelw== X-Received: by 2002:a05:6a00:2187:b0:56d:4d02:5776 with SMTP id h7-20020a056a00218700b0056d4d025776mr56624053pfi.4.1668023622806; Wed, 09 Nov 2022 11:53:42 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:42 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Aman Singh , Yuying Zhang Subject: [PATCH v2 05/14] testpmd: fix whitespace Date: Wed, 9 Nov 2022 11:53:22 -0800 Message-Id: <20221109195331.143473-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- app/test-pmd/cmdline.c | 31 ++++++++++++++++--------------- app/test-pmd/parameters.c | 10 ++++++---- app/test-pmd/testpmd.c | 2 +- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 8dc60e938830..7721006cc310 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2730,11 +2730,12 @@ parse_reta_config(const char *str, while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -3242,15 +3243,15 @@ cmd_config_thresh_parsed(void *parsed_result, if (!strcmp(res->name, "txpt")) tx_pthresh = res->value; - else if(!strcmp(res->name, "txht")) + else if (!strcmp(res->name, "txht")) tx_hthresh = res->value; - else if(!strcmp(res->name, "txwt")) + else if (!strcmp(res->name, "txwt")) tx_wthresh = res->value; - else if(!strcmp(res->name, "rxpt")) + else if (!strcmp(res->name, "rxpt")) rx_pthresh = res->value; - else if(!strcmp(res->name, "rxht")) + else if (!strcmp(res->name, "rxht")) rx_hthresh = res->value; - else if(!strcmp(res->name, "rxwt")) + else if (!strcmp(res->name, "rxwt")) rx_wthresh = res->value; else { fprintf(stderr, "Unknown parameter\n"); @@ -4088,8 +4089,8 @@ cmd_vlan_offload_parsed(void *parsed_result, len = strnlen(str, STR_TOKEN_SIZE); i = 0; /* Get port_id first */ - while(i < len){ - if(str[i] == ',') + while (i < len) { + if (str[i] == ',') break; i++; @@ -4097,7 +4098,7 @@ cmd_vlan_offload_parsed(void *parsed_result, str[i]='\0'; tmp = strtoul(str, NULL, 0); /* If port_id greater that what portid_t can represent, return */ - if(tmp >= RTE_MAX_ETHPORTS) + if (tmp >= RTE_MAX_ETHPORTS) return; port_id = (portid_t)tmp; @@ -4108,17 +4109,17 @@ cmd_vlan_offload_parsed(void *parsed_result, if (!strcmp(res->what, "strip")) rx_vlan_strip_set(port_id, on); - else if(!strcmp(res->what, "stripq")){ + else if (!strcmp(res->what, "stripq")) { uint16_t queue_id = 0; /* No queue_id, return */ - if(i + 1 >= len) { + if (i + 1 >= len) { fprintf(stderr, "must specify (port,queue_id)\n"); return; } tmp = strtoul(str + i + 1, NULL, 0); /* If queue_id greater that what 16-bits can represent, return */ - if(tmp > 0xffff) + if (tmp > 0xffff) return; queue_id = (uint16_t)tmp; @@ -7207,7 +7208,7 @@ static void cmd_mac_addr_parsed(void *parsed_result, ret = rte_eth_dev_mac_addr_remove(res->port_num, &res->address); /* check the return value and print it if is < 0 */ - if(ret < 0) + if (ret < 0) fprintf(stderr, "mac_addr_cmd error: (%s)\n", strerror(-ret)); } @@ -7780,7 +7781,7 @@ static void cmd_vf_mac_addr_parsed(void *parsed_result, res->vf_num); #endif - if(ret < 0) + if (ret < 0) fprintf(stderr, "vf_mac_addr_cmd error: (%s)\n", strerror(-ret)); } diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index aed4cdcb8485..7fc6d91f0210 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -306,11 +306,12 @@ parse_portnuma_config(const char *q_arg) /* reset from value set at definition */ while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -366,11 +367,12 @@ parse_ringnuma_config(const char *q_arg) /* reset from value set at definition */ while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index aa7ea29f15ba..04b078a2938b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2406,7 +2406,7 @@ start_packet_forwarding(int with_tx_first) test_done = 0; - if(!no_flush_rx) + if (!no_flush_rx) flush_fwd_rx_queues(); rxtx_config_display(); From patchwork Wed Nov 9 19:53:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119657 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0F51A034C; Wed, 9 Nov 2022 20:54:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 814A142D2F; Wed, 9 Nov 2022 20:53:46 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 5D248410DE for ; Wed, 9 Nov 2022 20:53:45 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id f5-20020a17090a4a8500b002131bb59d61so4087964pjh.1 for ; Wed, 09 Nov 2022 11:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=pvf5DNL7l0QfwfyGig7DFSApyrhi9PfVXc+jMILl/O8=; b=oO8PnKSgFM2betsH7nTymS9+6m4tELA0AOp0gBjRLB5vOhsOKSl+bcH9aaOWO+VS1M t0oMqfT/9aSLHLFqmqeNuPq4blul14TmGCVQWb9wLQw+VKGYlCusfGvfC1wHtqTrMp6W yA+S04JbupfWz1vWk0ijicQsbVNJSbseAfsDcByMGBcSNK7XObm8MIIv9md/+Hd5nyXr cGMw83RxDYmh26LoS4wtGTaeZzChpVEsWOScI6qIuhd1nH5lrogiTVeOVtguhx7kSLFY 6z8HQsjIJXGX273D93I8H+6EcNfR7axECPS+K5Sg5CRXyDw6kH2zQLwUdktvE+A3VZmS MyWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=pvf5DNL7l0QfwfyGig7DFSApyrhi9PfVXc+jMILl/O8=; b=P87JAAU9mv4AdpfYOHxc1Z/uqr7ZyxDZwl5pehNt1jrLB7DLQ3fOcyT88aTalcKXpg pgeA2XSDpT1f6xrQZF78I+eJ8ITfFSO6NwI857uqC8BNc4Seqvi9792hpYiLYWRtDJTz pfS9IFoQRBV5pL80R5T+mewj1wxlyIaGu0m3CubndnZnSOWE9KpVVuCkEIrEHcELUzBt yyLgqM1r2r5DUarwoaL4CSSMB/ZOzZphdU/5ltdBSo65EJhFQW2SdcJZVbGOgQvyFnkE Nq5YtlFb9AUzE7K59GDxvcvlJ3J/T1cvjMG0JIiGedF3Fqtq4Tx8HpJcrVwCsHB1ghAv J01A== X-Gm-Message-State: ACrzQf15CtoQ6ue0yBS/M7R43IGYbSII/Nc3bbLt5qfUc9GF1V+yMLXN a2NFNcJ1vtafxVVZcS/IuNVyYZeEWQFj1Q== X-Google-Smtp-Source: AMsMyM5RWKJJc8GHLHsQXtcqzbuEyuh3ejnk2y9X7psDk9n7Pw74vuE++igP0AJk1+Pdp5QDyXLc7Q== X-Received: by 2002:a17:902:ecc1:b0:186:b57e:d229 with SMTP id a1-20020a170902ecc100b00186b57ed229mr63331995plh.167.1668023624529; Wed, 09 Nov 2022 11:53:44 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:43 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin , Anatoly Burakov Subject: [PATCH v2 06/14] test: fix whitespace Date: Wed, 9 Nov 2022 11:53:23 -0800 Message-Id: <20221109195331.143473-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- app/test/test_cmdline_cirbuf.c | 4 ++-- app/test/test_debug.c | 4 ++-- app/test/test_hash.c | 6 +++--- app/test/test_lpm6_perf.c | 2 +- app/test/test_malloc.c | 14 +++++++------- app/test/test_mbuf.c | 14 ++++++-------- app/test/test_spinlock.c | 2 +- 7 files changed, 22 insertions(+), 24 deletions(-) diff --git a/app/test/test_cmdline_cirbuf.c b/app/test/test_cmdline_cirbuf.c index 8ac326cb02e0..6f7aae6df59a 100644 --- a/app/test/test_cmdline_cirbuf.c +++ b/app/test/test_cmdline_cirbuf.c @@ -708,7 +708,7 @@ test_cirbuf_char_fill(void) return -1; } /* delete buffer from tail */ - for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++) + for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++) cirbuf_del_tail_safe(&cb); /* try to delete from an empty buffer */ if (cirbuf_del_tail_safe(&cb) >= 0) { @@ -737,7 +737,7 @@ test_cirbuf_char_fill(void) return -1; } /* delete buffer from head */ - for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++) + for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++) cirbuf_del_head_safe(&cb); /* try to delete from an empty buffer */ if (cirbuf_del_head_safe(&cb) >= 0) { diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 2704f5b92726..28fc2180e2b0 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -53,7 +53,7 @@ test_panic(void) return -1; } wait(&status); - if(status == 0){ + if (status == 0) { printf("Child process terminated normally!\n"); return -1; } else @@ -84,7 +84,7 @@ test_exit_val(int exit_val) } wait(&status); printf("Child process status: %d\n", status); - if(!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val){ + if (!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val) { printf("Child process terminated with incorrect status (expected = %d)!\n", exit_val); return -1; diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 3e45afaa67fc..35d9d8a62ef8 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -724,12 +724,12 @@ static int test_five_keys(void) } /* Lookup */ - for(i = 0; i < 5; i++) + for (i = 0; i < 5; i++) key_array[i] = &keys[i]; ret = rte_hash_lookup_bulk(handle, &key_array[0], 5, (int32_t *)pos); - if(ret == 0) - for(i = 0; i < 5; i++) { + if (ret == 0) + for (i = 0; i < 5; i++) { print_key_info("Lkp", key_array[i], pos[i]); RETURN_IF_ERROR(pos[i] != expected_pos[i], "failed to find key (pos[%u]=%d)", i, pos[i]); diff --git a/app/test/test_lpm6_perf.c b/app/test/test_lpm6_perf.c index aaf2773b6fac..2f9321345e4b 100644 --- a/app/test/test_lpm6_perf.c +++ b/app/test/test_lpm6_perf.c @@ -47,7 +47,7 @@ print_route_distribution(const struct rules_tbl_entry *table, uint32_t n) printf("--------------------------- \n"); /* Count depths. */ - for(i = 1; i <= 128; i++) { + for (i = 1; i <= 128; i++) { unsigned depth_counter = 0; double percent_hits; diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index de40e506113a..8d3750a3f1f0 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -86,8 +86,8 @@ test_align_overlap_per_lcore(__rte_unused void *arg) ret = -1; break; } - for(j = 0; j < 1000 ; j++) { - if( *(char *)p1 != 0) { + for (j = 0; j < 1000 ; j++) { + if (*(char *)p1 != 0) { printf("rte_zmalloc didn't zero the allocated memory\n"); ret = -1; } @@ -157,8 +157,8 @@ test_reordered_free_per_lcore(__rte_unused void *arg) ret = -1; break; } - for(j = 0; j < 1000 ; j++) { - if( *(char *)p1 != 0) { + for (j = 0; j < 1000 ; j++) { + if (*(char *)p1 != 0) { printf("rte_zmalloc didn't zero the allocated memory\n"); ret = -1; } @@ -331,12 +331,12 @@ test_multi_alloc_statistics(void) /* After freeing both allocations check stats return to original */ rte_malloc_get_socket_stats(socket, &post_stats); - if(second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) { + if (second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) { printf("Incorrect heap statistics: Total size \n"); return -1; } /* Check allocated size is equal to two additions plus overhead */ - if(second_stats.heap_allocsz_bytes != + if (second_stats.heap_allocsz_bytes != size + overhead + first_stats.heap_allocsz_bytes) { printf("Incorrect heap statistics: Allocated size \n"); return -1; @@ -495,7 +495,7 @@ test_realloc_socket(int socket) return -1; } /* calc an alignment we don't already have */ - while(RTE_PTR_ALIGN(ptr7, new_align) == ptr7) + while (RTE_PTR_ALIGN(ptr7, new_align) == ptr7) new_align *= 2; char *ptr8 = rte_realloc_socket(ptr7, size7, new_align, socket); if (!ptr8){ diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 53fe898a384c..fceacb8fead8 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -120,7 +120,7 @@ static unsigned refcnt_lcore[RTE_MAX_LCORE]; printf("mbuf test FAILED (l.%d): <" str ">\n", \ __LINE__, ##__VA_ARGS__); \ goto fail; \ -} while(0) +} while (0) /* * test data manipulation in mbuf with non-ascii data @@ -154,9 +154,7 @@ test_pktmbuf_with_non_ascii_data(struct rte_mempool *pktmbuf_pool) return 0; fail: - if(m) { - rte_pktmbuf_free(m); - } + rte_pktmbuf_free(m); return -1; } @@ -701,12 +699,12 @@ test_pktmbuf_pool(struct rte_mempool *pktmbuf_pool) } struct rte_mbuf *extra = NULL; extra = rte_pktmbuf_alloc(pktmbuf_pool); - if(extra != NULL) { + if (extra != NULL) { printf("Error pool not empty"); ret = -1; } extra = rte_pktmbuf_clone(m[0], pktmbuf_pool); - if(extra != NULL) { + if (extra != NULL) { printf("Error pool not empty"); ret = -1; } @@ -966,7 +964,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool) struct rte_mbuf *mb, *mt; mb = m[i]; - while(mb != NULL) { + while (mb != NULL) { mt = mb; mb = mb->next; rte_pktmbuf_free_seg(mt); @@ -1195,7 +1193,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf) return -1; } wait(&status); - if(status == 0) + if (status == 0) return -1; return 0; diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 3f59372300c3..3ee82fa963a5 100644 --- a/app/test/test_spinlock.c +++ b/app/test/test_spinlock.c @@ -237,7 +237,7 @@ test_spinlock(void) /* * Try to acquire a lock that we already own */ - if(!rte_spinlock_recursive_trylock(&slr)) { + if (!rte_spinlock_recursive_trylock(&slr)) { printf("rte_spinlock_recursive_trylock failed on a lock that " "we already own\n"); ret = -1; From patchwork Wed Nov 9 19:53:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119658 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 065BFA04FD; Wed, 9 Nov 2022 20:54:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30EB242D37; Wed, 9 Nov 2022 20:53:48 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 2C4E642D35 for ; Wed, 9 Nov 2022 20:53:47 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id q9so17684340pfg.5 for ; Wed, 09 Nov 2022 11:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=HsB70apY/1oE5usD8NnWNkKMyEbL/zNnBg6TNaVHUxw=; b=PkaB4fIvW2+OxN0IuStej3+QqnfvjRZBdDmmvM1PQGCRYZ77MxKCzlPpw1nym/Zs6I vxPWbV3145neLk848IRXVQFHmAfWOhLKp7F0KR6hPkyd9Ldcj4rkM1rSKjBqZoHD/Peb 3hLjrbJie58dGuoNVDzyR025Q4dxFSiz+z2qWy5yXWkQFIf/WHxjJsKsiALTCC8lhBxM qhlYY+HNDA+t3bqV+Hehzfx5DdKsvk1SQvZfi/gX8HX6t8DH9cwn1tzrCU94qghZEWhT 36F6qzF75NvoW/7aTxFhi6ITcQlTDPJN4hnEIM6zMUgP5a0iA9gRsnZcn+Bmmb4ddMuD Oyhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=HsB70apY/1oE5usD8NnWNkKMyEbL/zNnBg6TNaVHUxw=; b=HfBsCMV36iK0ZR6qx+Y9ddBtc7ydTZWKdz0EVvNHcuBITu6H5mBuptSMN8CHjX8DdK RzrXIT34tetks3VRhcUinZalqGspwcOv55MCqQiVhK9piqBNmVDYfs8ej5gVpaXFXI7m bYs9EnZqqzVUQEwCy8i2SZFGwSSoOmIDWoK8+G6f9VljTfIsFJyUAAWq+KulTFNvmsrW EVn+jsnRKweAfXT7c+ZBbSyuQsidxVyMGigIrGQaoiXE1m2ARgo27bsl1MhxewRBwt+c 5EcRhpYdZhoxEmFtExmikx3KfujzwS1wK9IAU5NpXzpkFYECFRuSxa6kfPypRLw+4rds uEVQ== X-Gm-Message-State: ACrzQf0hHeC2iILibIjj/pHSJFxiuZ5Py0co2hULzD9rv/3pursXVtqV 0M+SER7RFb8f1rB/N9HLGQI9vGd9XDd8iQ== X-Google-Smtp-Source: AMsMyM6D18hrP4VQbzoM0xN/58afBmf9lYQ/FxxRG1FU8P5ch/m+p6eiQTkfNSXXwif8pJ+G/oiazw== X-Received: by 2002:a05:6a00:3698:b0:56d:3180:e88f with SMTP id dw24-20020a056a00369800b0056d3180e88fmr59606361pfb.66.1668023626005; Wed, 09 Nov 2022 11:53:46 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:45 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v2 07/14] examples/qos_sched: fix whitespace Date: Wed, 9 Nov 2022 11:53:24 -0800 Message-Id: <20221109195331.143473-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- examples/qos_sched/app_thread.c | 6 +++--- examples/qos_sched/args.c | 2 +- examples/qos_sched/init.c | 2 +- examples/qos_sched/main.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index dbc878b55394..a49356fecf5f 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -79,7 +79,7 @@ app_rx_thread(struct thread_conf **confs) if (likely(nb_rx != 0)) { APP_STATS_ADD(conf->stat.nb_rx, nb_rx); - for(i = 0; i < nb_rx; i++) { + for (i = 0; i < nb_rx; i++) { get_pkt_sched(rx_mbufs[i], &subport, &pipe, &traffic_class, &queue, &color); rte_sched_port_pkt_write(conf->sched_port, @@ -91,7 +91,7 @@ app_rx_thread(struct thread_conf **confs) if (unlikely(rte_ring_sp_enqueue_bulk(conf->rx_ring, (void **)rx_mbufs, nb_rx, NULL) == 0)) { - for(i = 0; i < nb_rx; i++) { + for (i = 0; i < nb_rx; i++) { rte_pktmbuf_free(rx_mbufs[i]); APP_STATS_ADD(conf->stat.nb_drop, 1); @@ -137,7 +137,7 @@ app_send_packets(struct thread_conf *qconf, struct rte_mbuf **mbufs, uint32_t nb uint32_t i, len; len = qconf->n_mbufs; - for(i = 0; i < nb_pkt; i++) { + for (i = 0; i < nb_pkt; i++) { qconf->m_table[len] = mbufs[i]; len++; /* enough pkts to be sent */ diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index b2959499ae9a..b752eb221f7c 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -451,7 +451,7 @@ app_parse_args(int argc, char **argv) /* sanity check for cores assignment */ nb_lcores = app_cpu_core_count(); - for(i = 0; i < nb_pfc; i++) { + for (i = 0; i < nb_pfc; i++) { if (qos_conf[i].rx_core >= nb_lcores) { RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1, qos_conf[i].rx_core); diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index 0709aec10c31..41b46b296298 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -323,7 +323,7 @@ int app_init(void) rte_exit(EXIT_FAILURE, "Invalid configuration profile\n"); /* Initialize each active flow */ - for(i = 0; i < nb_pfc; i++) { + for (i = 0; i < nb_pfc; i++) { uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core); struct rte_ring *ring; diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index dc6a17a6464a..7b757df0eb02 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -152,7 +152,7 @@ app_stat(void) static struct rte_eth_stats tx_stats[MAX_DATA_STREAMS]; /* print statistics */ - for(i = 0; i < nb_pfc; i++) { + for (i = 0; i < nb_pfc; i++) { struct flow_conf *flow = &qos_conf[i]; rte_eth_stats_get(flow->rx_port, &stats); @@ -212,7 +212,7 @@ main(int argc, char **argv) } else { /* print statistics every second */ - while(1) { + while (1) { sleep(1); app_stat(); } From patchwork Wed Nov 9 19:53:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119659 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 10F41A034C; Wed, 9 Nov 2022 20:54:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01F4F42D28; Wed, 9 Nov 2022 20:53:50 +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 A658442D3B for ; Wed, 9 Nov 2022 20:53:48 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id gw22so17701690pjb.3 for ; Wed, 09 Nov 2022 11:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=Fat4VHQS9w/vcwAC17NvSroEuvXWz2GMEehRoOVj/wM=; b=8DJrglIB/DLIp2X8WCIEO1JsRVM8+H2iMYlPT2gc5QcpJ9I2E4rPfiHD8FjLAPK5vv 6kCAf4rqX1BJKOOE4rZFg5RG2VvY7dHvZA6VmSlKParur18LKjPK+23LyqfWDwcOngYW zuf3PKMZTpibMSvL5ZoVCOj37tIiVX4qdSvHNSJoUoM/1GlU9bF3N5IkQvVoRLsbyx1E TlN84Ozie8yurP9TRKnTkh2zrFZM0sL/KPjl4KTKZsF2lHAAb4qeocQLVXYbkj80TVrv 7tlffwdUKBwG5Sfv2dzu9X4z2n9X1Nu4SBQH9KG0w+tEe9bYVZ0qz2z1FdK76YuIstzy 8Luw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Fat4VHQS9w/vcwAC17NvSroEuvXWz2GMEehRoOVj/wM=; b=14DngoZqSpPBH0FPFUTtOg/dc1WAMXITUvOgPZejrd2atWtl0T2Fma0ytejEbFMUxa 6DctI7ScbiZeRKaQr29oMbz/cyiHN/6R25aYxnS/eVi0HuuthYYqQ9ZjZtF283btNxYx zsKFVZTaNlsBIgyHLnoOVWrPZTK7mNm79xxoz104qdBnR6Zu5eCaV5H5w9NMk597Xuma 7zz5nHIfny/I5JMPU2bKH//E9mmWmzGiomr0GDCGq+Is9GkZQumvCmvM23sfMSfM+w8w YCCavw5v8PXla2BQ/9fZvXxZMTYdh6BbBYpBkkza5LN9ih+YfiGWX5lSgl2BaTtTuZSf yUoA== X-Gm-Message-State: ACrzQf2FDxqgXgth0B3g4H6hyUcnGEbLDBSIJAO1ntibMS7rR6MW0iF6 mNrZbc4h4NgjaJW8lTsPwafCmVdbHPRkng== X-Google-Smtp-Source: AMsMyM6xyoWyAng4ZlEG76AReCi0hEQzYfvhSg6G0xBBfdpddUwiQITF4bJxwDMmrKI85BFVyzn6Rw== X-Received: by 2002:a17:902:db0e:b0:186:9b38:ad26 with SMTP id m14-20020a170902db0e00b001869b38ad26mr64031127plx.43.1668023627550; Wed, 09 Nov 2022 11:53:47 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:46 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH v2 08/14] examples/vhost: fix whitespace Date: Wed, 9 Nov 2022 11:53:25 -0800 Message-Id: <20221109195331.143473-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- examples/vhost/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 42e53a0f9a4f..9fee966916e9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1491,7 +1491,7 @@ switch_worker(void *arg __rte_unused) } } - while(1) { + while (1) { drain_mbuf_table(tx_q); drain_vhost_table(); /* @@ -1583,9 +1583,8 @@ destroy_device(int vid) return; /*set the remove flag. */ vdev->remove = 1; - while(vdev->ready != DEVICE_SAFE_REMOVE) { + while (vdev->ready != DEVICE_SAFE_REMOVE) rte_pause(); - } for (i = 0; i < RTE_MAX_LCORE; i++) rte_free(vhost_txbuff[i * RTE_MAX_VHOST_DEVICE + vid]); @@ -1816,7 +1815,7 @@ print_stats(__rte_unused void *arg) const char clr[] = { 27, '[', '2', 'J', '\0' }; const char top_left[] = { 27, '[', '1', ';', '1', 'H','\0' }; - while(1) { + while (1) { sleep(enable_stats); /* Clear screen and move to top left */ From patchwork Wed Nov 9 19:53:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119660 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 74383A034C; Wed, 9 Nov 2022 20:54:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5FF742D3E; Wed, 9 Nov 2022 20:53:51 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 5C6E642D3D for ; Wed, 9 Nov 2022 20:53:50 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id e129so17113023pgc.9 for ; Wed, 09 Nov 2022 11:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=nhhXnLkYkG4mHGRUf5HbpuwBHEi398crtA4UbeAB6VE=; b=YVq+CYqolePEFk7SDFI56kiQlBRRF1auEhgTUuafPiMLHtUv+2w1Fqrj1p8EtUlHlt vRsF/9RskxJn8SyIhbSFa4fecDUQu25Alh4NMKuZ6LrqX3m4yYjk4nRBr2ibMDkRSaIk zTfoRWPtW4XddqnXIKqF7bxEHk69v1h5ASEucBefiP9x3lpjlqkg3w0d3u/F3UV1qd8c nTFeruAnhdNUQ+x1aaUy+bKVuJ53EerBmWdeTHak4Q8V/R85o8Gf/ZjNC3GUf180QXCR dmmDt2Yxy0Nk0b/FlG7lE4u3TaaENd3+pJiX/KniSW9ze/wjlJz5dKuxZdCBwzt2cvqO sXwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=nhhXnLkYkG4mHGRUf5HbpuwBHEi398crtA4UbeAB6VE=; b=CBI5Xq6pdOMLY91oGdlmoolA40r8ESK6MjacpPQ379XgU+vJ1e0tbNge2RRGXnqI9L i1RJ5Wl+thvGWX4+oWFzI8RbhKmEIjDivKIl35VVSFSacxhQf06jnnIm+TAskVB93HlH ZW/7yrvba2LFUURO13buMXmL9unMFwebok7C/XsJoVXcbhjrTOWp3cmx2KEbim08ei0T VfQNt9FFBi1Sgmi7REYdWa9/R5/TIIg48kMmJZpLERNXHXxBg6gb/xoNq14gk0Om5l+U N1phEXRNCyzwHGxsAOc3hMckFaTHGlUMIhGWElqBWtrhY+ohpS+LlbhECccDiqc/7d3Q +wFw== X-Gm-Message-State: ACrzQf1Ge0jtLC1Eg/tMne1ijdoyYI+XGCwiu1FVWTHs1h6p1CIeUwI2 WPXB0ukqIA5p6K/7CPloP0C2tCMkClLgOA== X-Google-Smtp-Source: AMsMyM7Oq9v7DWvO52ODbkspekQxuNhFT9TgqRzYa82J5ILP4O9Lsx+zsJd+5VNso9xh9DfpsNZ+EQ== X-Received: by 2002:a63:151e:0:b0:46f:5f3:c7f6 with SMTP id v30-20020a63151e000000b0046f05f3c7f6mr1226327pgl.330.1668023629194; Wed, 09 Nov 2022 11:53:49 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:48 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt Subject: [PATCH v2 09/14] l3fwd: fix whitespace Date: Wed, 9 Nov 2022 11:53:26 -0800 Message-Id: <20221109195331.143473-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- examples/l3fwd-power/main.c | 7 ++++--- examples/l3fwd/main.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index fd3ade330f82..7bd5d8cb2281 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1787,11 +1787,12 @@ parse_config(const char *q_arg) while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -2946,7 +2947,7 @@ main(int argc, char **argv) fflush(stdout); /* init RX queues */ - for(queue = 0; queue < qconf->n_rx_queue; ++queue) { + for (queue = 0; queue < qconf->n_rx_queue; ++queue) { struct rte_eth_rxconf rxq_conf; portid = qconf->rx_queue_list[queue].port_id; diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5198ff30dd00..2b8575137d50 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -516,11 +516,12 @@ parse_config(const char *q_arg) while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -1366,7 +1367,7 @@ l3fwd_poll_resource_setup(void) printf("\nInitializing rx queues on lcore %u ... ", lcore_id ); fflush(stdout); /* init RX queues */ - for(queue = 0; queue < qconf->n_rx_queue; ++queue) { + for (queue = 0; queue < qconf->n_rx_queue; ++queue) { struct rte_eth_rxconf rxq_conf; portid = qconf->rx_queue_list[queue].port_id; From patchwork Wed Nov 9 19:53:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119661 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90DAFA034C; Wed, 9 Nov 2022 20:54:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D48A42D44; Wed, 9 Nov 2022 20:53:53 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 087F340151 for ; Wed, 9 Nov 2022 20:53:52 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id q1-20020a17090a750100b002139ec1e999so2938266pjk.1 for ; Wed, 09 Nov 2022 11:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=/QhJhFhZiPiDsPwY2VTvBHBSaly3Zeo3SiVUnEcBcCg=; b=eBfKffJghX5fLdlzmGC+n6+oANJtKRJ9MCCjb5tBWXAqYxbYWA7oBOH6fNUv4LqcsD bTSIcK0SkMshXVXNmCIPiTEddflwxFnDRKtu8n51gZlOYm9cRepHIwb8ir2decRgFHpG DbRgIv23aTFOM6M2DP+dlTQPMOICGk67PBQZNete/Bx7eKXsnRh8UhvKyj4aSSXtsp0S y0bFiNDNm5iR/Dc/gcy+lkbW0ciYvuX5IpxEErfTNDRUkndKeJtZ6D41oy2pnQhfFjFW 11zREJ/8qZBSkc/bpNkKuZFykvQC866Whk6rWkziDTGbfKqhLgXxZhIDC7Cvrdlj1Txz Ksqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/QhJhFhZiPiDsPwY2VTvBHBSaly3Zeo3SiVUnEcBcCg=; b=ni3nWroG7uYjjkmiQB5mqajIPeP/Yiev0X+Mj4n38aZ83oPx7hQloMRS0CGMX37v1q LyoBk/0RpO2O6XNMxVJ/+rhiZqWNKl7G3tIEcDEaARXSkxJNGJU6K2FZA0+ULrDGPj45 0jpiSZB0PlIFNLFjuYTEG/8QxXrCi290PxzrAe7QsIEMlhPJNgoQ6ePst18mVh0x8oZG Ydd2i845IC5Gdz9Ayj7sS6BEbjpxEXZX9gTf7H/260DaqKiMD4hHO76Htx8W7dI2WI4D XuXsgHZkEoO8yCy46PMwTT5WTGd041ipC21JXOcBETtn77GBCP5PsS1EDFiljPbJQY1J 1Jqg== X-Gm-Message-State: ACrzQf0Kt6qQYGORsSkyZzMr67HcrIfo6qWstLG+NpC/ACAnP1zpWwyf KoPNCuIw7aiLjzJy79PBHzaCH3Xkn2gZSg== X-Google-Smtp-Source: AMsMyM5MmJvf2iYMuIweA1LWO4M6ElPR1e5wunk38XI2xorMbND/hKIQdikYTCk3qfD9RSmppLZBbw== X-Received: by 2002:a17:903:4d4:b0:17f:7ecc:88e3 with SMTP id jm20-20020a17090304d400b0017f7ecc88e3mr59197593plb.169.1668023630898; Wed, 09 Nov 2022 11:53:50 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Konstantin Ananyev , Anatoly Burakov Subject: [PATCH v2 10/14] examples: fix whitespace Date: Wed, 9 Nov 2022 11:53:27 -0800 Message-Id: <20221109195331.143473-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- examples/cmdline/parse_obj_list.c | 2 +- examples/ip_reassembly/main.c | 2 +- examples/multi_process/symmetric_mp/main.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c index 959bcd14527e..759072d39620 100644 --- a/examples/cmdline/parse_obj_list.c +++ b/examples/cmdline/parse_obj_list.c @@ -42,7 +42,7 @@ parse_obj_list(cmdline_parse_token_hdr_t *tk, const char *buf, void *res, if (res && ressize < sizeof(struct object *)) return -1; - while(!cmdline_isendoftoken(buf[token_len])) + while (!cmdline_isendoftoken(buf[token_len])) token_len++; SLIST_FOREACH(o, tkd->list, next) { diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index bd0b1d31decf..7e84b4944759 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -300,7 +300,7 @@ send_single_packet(struct rte_mbuf *m, uint16_t port) TX_LCORE_STAT_UPDATE(&qconf->tx_stat, queue, 1); txmb->m_table[txmb->head] = m; - if(++txmb->head == len) + if (++txmb->head == len) txmb->head = 0; return 0; diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 1ff85875dfdf..2f4441049253 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -156,7 +156,7 @@ smp_parse_args(int argc, char **argv) /* get the port numbers from the port mask */ RTE_ETH_FOREACH_DEV(i) - if(port_mask & (1 << i)) + if (port_mask & (1 << i)) ports[num_ports++] = (uint8_t)i; ret = optind-1; @@ -470,8 +470,8 @@ main(int argc, char **argv) /* Primary instance initialized. 8< */ if (num_ports & 1) rte_exit(EXIT_FAILURE, "Application must use an even number of ports\n"); - for(i = 0; i < num_ports; i++){ - if(proc_type == RTE_PROC_PRIMARY) + for (i = 0; i < num_ports; i++) { + if (proc_type == RTE_PROC_PRIMARY) if (smp_port_init(ports[i], mp, (uint16_t)num_procs) < 0) rte_exit(EXIT_FAILURE, "Error initialising ports\n"); } From patchwork Wed Nov 9 19:53:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119662 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17C7EA034C; Wed, 9 Nov 2022 20:54:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A02E942D53; Wed, 9 Nov 2022 20:53:54 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 6FD4E42D2C for ; Wed, 9 Nov 2022 20:53:53 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id u6so18058622plq.12 for ; Wed, 09 Nov 2022 11:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=7h9XAuTLAdiw0cbcON/lzoi4fMgOU+VzF4RKwroQFmI=; b=abhzXPIkTUj/Vtq04p5UfzIPJr/pqMa4ZRwmO50+QQHo2cX1Qu5MOxmM0upc7eLhE0 BSAljpBjxOtfgMxCt+YPnLPLDLvapW4NDfCf4H0jVojTno0uLdLct1SRVI6co4ATRFZ+ MAhPJy2OoDS9HCVS1LrQUk1g+8TusSEVx1N2pj9gpLThMBDB+Jj0dcaLip8JOrqSW8xG ngBip3MJxph300Dq4yRZi63jsQtb/gWqJxpXOeCzHprTxGZTBvMRhTO5MYCrmu1hWezY c9O7uj+pIrREc5SzMvBRnF63FPEgdHZQ+0rNEl7SyKyC3HuDqJdK7vUOlBM3biV2lSLo Neaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7h9XAuTLAdiw0cbcON/lzoi4fMgOU+VzF4RKwroQFmI=; b=hc8mBFeVm1v76Weo46XXz1bMszsHOWfuhMNuz+HAg+4ZoQIbTxBBrZozUQgWlFKzIX SOi2jSo/nt4omCFfXYump3SwgKboQ+sYB103ACIumwncFXDwSNuE3YyANMwEBOMYn+OF M1Cj6d70qBvvwnro6EsH2RZy2C2ez/02+pmuQjtAPBowhMJqBZJsxxeQAZsn5wjpU7mc 0o/J6KPIP3QPHZjS/J+KrfFxtz5fuPaL6oadIXc6Wxbj6NTOpo5nQfao8Fc1VOvo/T41 UmLQl4RfXRSjCROvumII5jnuhsg/kj9KuKT+5g2/B4Mp6IUFzpzQigROTs1WPO8U9Qtz et3Q== X-Gm-Message-State: ACrzQf2P7N9M0BPLx5YwmwGjv5+HXQysEPstTN62JdDeu4pJIDC6v12/ K7MERupPTwLzxW3IRgWAtFkV38GPPTo4eg== X-Google-Smtp-Source: AMsMyM52HM6Y9lNl8XUOlcRU413iCUCNaT/CrsBroR986gz5HbgoWBhBYPOV+VhisN9tlfaUKw8o9A== X-Received: by 2002:a17:903:2343:b0:188:5f62:8e15 with SMTP id c3-20020a170903234300b001885f628e15mr31183562plh.5.1668023632244; Wed, 09 Nov 2022 11:53:52 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:51 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 11/14] bus/pci: fix whitespace Date: Wed, 9 Nov 2022 11:53:28 -0800 Message-Id: <20221109195331.143473-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- drivers/bus/pci/bsd/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c index 7459d15c7e31..056e2eda2d5f 100644 --- a/drivers/bus/pci/bsd/pci.c +++ b/drivers/bus/pci/bsd/pci.c @@ -368,7 +368,7 @@ rte_pci_scan(void) } dev_count += conf_io.num_matches; - } while(conf_io.status == PCI_GETCONF_MORE_DEVS); + } while (conf_io.status == PCI_GETCONF_MORE_DEVS); close(fd); From patchwork Wed Nov 9 19:53:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119663 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44EEDA034C; Wed, 9 Nov 2022 20:54:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 694A542D2B; Wed, 9 Nov 2022 20:53:57 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id CC81142D2B for ; Wed, 9 Nov 2022 20:53:55 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so2865752pjk.2 for ; Wed, 09 Nov 2022 11:53:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=w13p084c5lz/vaTZSOY0WcFhVOYDiiLi9ewfAO1+SS4=; b=e2XEV4cylodxTFYILs1BwR7dFEfIX2ZRW8OFxaqARmsGIgvhNvyndXMzn/Fghgvntl Mh1DpUZkKQ8mc2rAY+DCrDM0LJZUgc+Bs9j2D04BYIhM8XSz19ddgpGb8Ao6DtUFhq3B VXm/AvrC94krofuAcY7XZ+0KQrUBmn9kSZpIzSwfhPrPslXQxd1uVbMw01eIv4ERlxlX B/sHOl41rYKPjsmES6gx6bga+h0yoHM+7ED4MeTR/81OrFs29g5PiR7e9cVR+hGIRU/Q LqxaQqjn92o/mAQzcqeWpKFYaex//1PTN7NT+I4qOytaDHKifFYMEQbwWOPteWo3bxqm ew4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=w13p084c5lz/vaTZSOY0WcFhVOYDiiLi9ewfAO1+SS4=; b=m9KkKMoJA7cosOtK2M4jOHDFFqS1VOsJRq7O/t8xtyP21c1+0kdyQEGFjzrKJxXzBm asv0C+p03bKDHkuG6SB8GO+l289JLfd8+/oj2PaHB08ArlaDEqKh8XzVpBm0Exw31DV1 zpECg57myvSvjgzYE5+kQLt+c3mwgmzJimPLJPL/Dz0LoZGDFskxdgzUoKqQtMr7yQcM WT4vyRM341mQWWEouW4luH3vr7kfHrWQMEFOJwJCB6lN9FGI/PryZih6ib1lCWiInT38 gPPGhT9W72BinuTwBxRM8ek/W+Qe1F3qKFj9uwBYMATgN34PQFhRu7XFyruX/ylxY/4N ONow== X-Gm-Message-State: ACrzQf0U32oTWTpHI5mMjXkQA3yylEMBqMlhTbOs+v+oLfqmkDI0Sob7 Gu44rw2Xihr+RcFxDb9UZv7QKpGdiFbkCw== X-Google-Smtp-Source: AMsMyM6H0WBjkapHjmnt7v9hEYxjo9NEgfCkjybR6WB6Mp3TkAalmLtik8sJgPMEO5t9Jo6/8ccxFg== X-Received: by 2002:a17:902:b595:b0:187:34f6:7820 with SMTP id a21-20020a170902b59500b0018734f67820mr46904422pls.152.1668023633866; Wed, 09 Nov 2022 11:53:53 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Simei Su , Wenjun Wu Subject: [PATCH v2 12/14] net/e1000: fix whitespace Date: Wed, 9 Nov 2022 11:53:29 -0800 Message-Id: <20221109195331.143473-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- drivers/net/e1000/em_ethdev.c | 4 ++-- drivers/net/e1000/igb_ethdev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 8ee9be12ad19..146e74cfc76e 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -872,8 +872,8 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats) E1000_DEV_PRIVATE_TO_STATS(dev->data->dev_private); int pause_frames; - if(hw->phy.media_type == e1000_media_type_copper || - (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { + if (hw->phy.media_type == e1000_media_type_copper || + (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { stats->symerrs += E1000_READ_REG(hw,E1000_SYMERRS); stats->sec += E1000_READ_REG(hw, E1000_SEC); } diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 8858f975f8cc..67e82d708964 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1683,7 +1683,7 @@ igb_read_stats_registers(struct e1000_hw *hw, struct e1000_hw_stats *stats) uint64_t old_rpthc = stats->rpthc; uint64_t old_hgptc = stats->hgptc; - if(hw->phy.media_type == e1000_media_type_copper || + if (hw->phy.media_type == e1000_media_type_copper || (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { stats->symerrs += E1000_READ_REG(hw,E1000_SYMERRS); @@ -3500,10 +3500,10 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on) for (i = 0; i < IGB_VFTA_SIZE; i++){ vfta = shadow_vfta->vfta[i]; - if(vfta){ + if (vfta) { mask = 1; for (j = 0; j < 32; j++){ - if(vfta & mask) + if (vfta & mask) igbvf_set_vfta(hw, (uint16_t)((i<<5)+j), on); mask<<=1; @@ -3528,7 +3528,7 @@ igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) /*vind is not used in VF driver, set to 0, check ixgbe_set_vfta_vf*/ ret = igbvf_set_vfta(hw, vlan_id, !!on); - if(ret){ + if (ret) { PMD_INIT_LOG(ERR, "Unable to set VF vlan"); return ret; } From patchwork Wed Nov 9 19:53:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119664 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BFA5A034C; Wed, 9 Nov 2022 20:54:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58A2842D4C; Wed, 9 Nov 2022 20:53:58 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 6387542D35 for ; Wed, 9 Nov 2022 20:53:56 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id c2so18061273plz.11 for ; Wed, 09 Nov 2022 11:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=HHt9PbzPy7mkylQAPxjeYOiNiOuzNKGwN6+hVQRO3+Q=; b=j9BtY10ACdXFMU1wQnOUXDYSMGOMesrmLgdj0cnSS5R6U9jWdOxY+PozDPrk7x1p06 ytflIgEIBDRe/ZE64b4uIu47sky+DTDXZ3gAN1zHL/mom1rPnIs9lHvaHPEyet66v4sa oAoHNYmpZjJiL+ewpl3NqZwQKmVJoHW2q099BoeGunDiUmviq8luSGt4rdmtcIyeRFZu KVZC81MNKKNay5RLXPgzyZa5yh7PrGKDnKJ18rhq8SnXoFGLhzPc6Dnww8o63E8wWjeW nURVBp+VjmQ5YHo54K1LjibKuUOFL3ashaTEbvXWBBXTBwtTQrzLwWtsbR9lOn6IiaMA EFrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=HHt9PbzPy7mkylQAPxjeYOiNiOuzNKGwN6+hVQRO3+Q=; b=5/4htP8ButC+3qfiS4BoKbr1Xx0fpRBBA6pBA2cD1KH6oM8Xf/MhFqYNvVZpSICZKc llMzn34HHKz9kJTvMU/YOvUyjbG2W36Wq0NequoxgywGP+74QO6xCvf193hRjez2xXUK VHHbHGM8G5RGVcIL7lX1f9OB5iPDKOgd4NnZD2niV/p3kLSHokU2lHJUm32zu0UlEdc+ dNmO4XPLDlX6on6+rtG9S02Jqty8C8buK2iXf8KLj/bBWJRV7mRUbZHulQL+gRfJEqkn V3m3Z+KIZGvl8ceGztAhzjCPU4Qf6fpYjQgLb5vV2DAgMmx9IJFsdmt5fU+2gyGFxVq+ /ndQ== X-Gm-Message-State: ACrzQf1lbCUaU4ufq8Rm1OAcAmHtyWCssVE0HF13q0k7mEo0bY4SyCKi JZOvyG9XlkyuZE5C9lEOTwE+EoggVKMfMw== X-Google-Smtp-Source: AMsMyM6MZcwqa3yjsaOISFFA8UBsBk7uGGITUX1TDsz3tCCwGoMSyuHAXsIbSlc5mWFTk/i7plORpw== X-Received: by 2002:a17:903:2411:b0:184:7159:dce6 with SMTP id e17-20020a170903241100b001847159dce6mr63365652plo.101.1668023635305; Wed, 09 Nov 2022 11:53:55 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Yuying Zhang , Beilei Xing Subject: [PATCH v2 13/14] net/i40e: fix whitespace Date: Wed, 9 Nov 2022 11:53:30 -0800 Message-Id: <20221109195331.143473-14-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- drivers/net/i40e/i40e_pf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 15d9ff868f3a..7050e0057d8e 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -956,7 +956,7 @@ i40e_pf_host_process_cmd_add_vlan(struct i40e_pf_vf *vf, for (i = 0; i < vlan_filter_list->num_elements; i++) { ret = i40e_vsi_add_vlan(vf->vsi, vid[i]); - if(ret != I40E_SUCCESS) + if (ret != I40E_SUCCESS) goto send_msg; } @@ -996,7 +996,7 @@ i40e_pf_host_process_cmd_del_vlan(struct i40e_pf_vf *vf, vid = vlan_filter_list->vlan_id; for (i = 0; i < vlan_filter_list->num_elements; i++) { ret = i40e_vsi_delete_vlan(vf->vsi, vid[i]); - if(ret != I40E_SUCCESS) + if (ret != I40E_SUCCESS) goto send_msg; } @@ -1577,12 +1577,12 @@ i40e_pf_host_init(struct rte_eth_dev *dev) * return if SRIOV not enabled, VF number not configured or * no queue assigned. */ - if(!hw->func_caps.sr_iov_1_1 || pf->vf_num == 0 || pf->vf_nb_qps == 0) + if (!hw->func_caps.sr_iov_1_1 || pf->vf_num == 0 || pf->vf_nb_qps == 0) return I40E_SUCCESS; /* Allocate memory to store VF structure */ pf->vfs = rte_zmalloc("i40e_pf_vf",sizeof(*pf->vfs) * pf->vf_num, 0); - if(pf->vfs == NULL) + if (pf->vfs == NULL) return -ENOMEM; /* Disable irq0 for VFR event */ From patchwork Wed Nov 9 19:53:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 119665 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB7D3A034C; Wed, 9 Nov 2022 20:54:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A00642D58; Wed, 9 Nov 2022 20:53:59 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id E159242D43 for ; Wed, 9 Nov 2022 20:53:57 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id o7so17705703pjj.1 for ; Wed, 09 Nov 2022 11:53:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=orlqAdyG2cO9p0skE4kv7DuYe3j4iDQmQO7NM85bGpM=; b=OvKNS1Fq5PGRc2N+RxorhTFmYmQlbcWac5dBmhQB118acn6vvUTxr6lyYqZpAH8zPM ZBe7+UPeKOlQznWpBo+L2aTfycST4a8rV1lVCZCJrKXVDZuA+A8MHV/gfP3TJJmdj5w1 1vaWm2v12vjivGg7IEzUDOJW3lcvHqPRFcTbIEe5plllprTOYayIHbI7opt8lIFrQh0m 2WDJp1pa/4dvxJp5U5Xx3TpTGDXQcKsoqoGPByJggqTOSpvAuBID6mng73c2CPQZPIIm A2mb0a4rXbb9SPVYp8Gm9yLO2UNxODo7GeR51mQhWR0oyxDqU+ikGBa524tuXXkf9M+i WT/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=orlqAdyG2cO9p0skE4kv7DuYe3j4iDQmQO7NM85bGpM=; b=1Lu87Rs196ee5xmVxW8SL4saIUDbgn9AOkqdcNXnnTAFFOuo9xeOR8siAKqXoKL7rk mf8GKTVrhZDmQgl+cHRpXhwWjScWm8OV0oM9A8zGHZeN7ZZPeNKuB1xQOqZqn4ILptdt 018kWqTTmfeV37lhSE4pMfhDX0WqpUa46/1KFfF6+wsP4cxGTOFBBYbEAeBBi0imv1Xs Ld9foVRA/dlgPe6K8THdU7tr0KKIYa9HjZtEXgUVqA7PO/pIhYEfi164n7JbsyXk1aZf Zc3pjPj5Mbq+MoXfP/UhtzZkKCKZqZWr69pNkU/itmth7f09pCDew3aylS8kqULmCgzH yC9Q== X-Gm-Message-State: ACrzQf2pJLOcAJxtv7I9e030NClB+y+NfELVmc2Dwy27LcB0K85X2/BD ybtMOaKNg6/dHABDQoSdpG/BB06KheQ06w== X-Google-Smtp-Source: AMsMyM5Y+2+OotNsOltv728DNdZceFGBUCTZqnD2cxr7eJ/KiVxg14EMFPfK3Lsz+LaB1V8qXRqW4g== X-Received: by 2002:a17:902:d70e:b0:178:2d9d:ba7b with SMTP id w14-20020a170902d70e00b001782d9dba7bmr62104376ply.90.1668023636715; Wed, 09 Nov 2022 11:53:56 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u14-20020a170902e5ce00b0017f778d4543sm9628875plf.241.2022.11.09.11.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:53:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rasesh Mody , Shahed Shaikh Subject: [PATCH v2 14/14] net/bnx2x: fix whitespace Date: Wed, 9 Nov 2022 11:53:31 -0800 Message-Id: <20221109195331.143473-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org> References: <20221109191445.140320-1-stephen@networkplumber.org> <20221109195331.143473-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Add space after keywords. Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 89414ac88a93..9cb927e25449 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -96,7 +96,7 @@ int bnx2x_ilog2(int x) int log = 0; x >>= 1; - while(x) { + while (x) { log++; x >>= 1; }