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 E00F7A0C4C for ; Mon, 12 Jul 2021 15:13:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9BAB40685; Mon, 12 Jul 2021 15:13:43 +0200 (CEST) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id 03E634119D for ; Mon, 12 Jul 2021 15:13:42 +0200 (CEST) Received: by mail-wr1-f52.google.com with SMTP id t5so11702578wrw.12 for ; Mon, 12 Jul 2021 06:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3xUyA6Q1ON73nXi/FagCNsII9iw9WlrPq3KR1rjEa/M=; b=O1Cp4IJaD9StoKw7Jw9UIKLF9Vl7sOXuuSc3GOkzKeT+HZ45RqeqkMm1CCjgM8Pchi YyRSnfJRaPoQFywc73ZUWkWFveOJ0peXmFpdOPGaSY/8OZ25TGSDtdpwLpRAl/nK1HDV lQzsFsBGUXHbvrcjhggOwPWUIZmKHKsxnL6bgJEvvPNF7qfATCWOFVKcea948dlTRrz8 lwAJ01qkwMFWlp+JQ2ORdMyuoz7iWQbD4EdadOD5IHb7hWPW3YPg+sFaYEnaoS26n/Fk WkI7WJmEz8paqpQrpE/zfoeo+mwGNevwivNiubDnRQ8FS53BafHjW+lBYOz2eoZyblSm dd4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3xUyA6Q1ON73nXi/FagCNsII9iw9WlrPq3KR1rjEa/M=; b=rLHwoStNxVc+kyNcL10iwCTjaOYsBNoUFmmJWCEPuu+PMynJapnblbhfCG//DymuwV FUEHOwTy3uThrjvoqKTfCS6ZmgnirJU8zAkDt1DoL23lHODmZYmK5IYqFkUx2uoBGPqd iQDyWMqrOuA8X9uv35EuE2Vi65ffe6OpkZuHUfxSkOwGJqynB42VFrVtlRqCPJJUK4Ir wE/QC8RAO2gQrVzg4kcKPLQLbhFn4XBLx0M9YJGVUpKWtIqZI1Mx3ERRdnxd3vD9nUuF 6BN67YMZl3kMZbbY17x8bGgQF8s7iWMjNk2bo+ZRojYH76zY+HuMYy5limn7e7CEhe/F bVRA== X-Gm-Message-State: AOAM531pChmWKoEMyiKXtPkvbQxBzAK/x+RU0PwIHK9DmjkHI9DOPLws vDjZ/mbgGeSdMI8oT2VYoP4= X-Google-Smtp-Source: ABdhPJx3RbX2SBylO6oZNJAUBuf3THIcfAYs3h+66A3Nz8O2GVPhTQRQsH1/GhBpV8XnBF8Kscitkg== X-Received: by 2002:adf:ee0a:: with SMTP id y10mr6925866wrn.209.1626095621774; Mon, 12 Jul 2021 06:13:41 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id l34sm23745280wms.45.2021.07.12.06.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:13:41 -0700 (PDT) From: luca.boccassi@gmail.com To: Jie Zhou Cc: Andrew Rybchenko , dpdk stable Date: Mon, 12 Jul 2021 14:05:04 +0100 Message-Id: <20210712130551.2462159-69-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix type of FEC mode parsing output' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824 Thanks. Luca Boccassi --- >From ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824 Mon Sep 17 00:00:00 2001 From: Jie Zhou Date: Tue, 29 Jun 2021 13:50:19 -0700 Subject: [PATCH] app/testpmd: fix type of FEC mode parsing output [ upstream commit ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 ] Passing an uint32_t pointer to an enum pointer parameter causes pointer-sign warning on Windows (converts between pointers to integer types with different sign), since enum is implicitly converted to int on Windows. And the current enum pointer parameter of that function is actually misleading and should be fixed as an uint32_t pointer parameter. Fixes: b19da32e3151 ("app/testpmd: add FEC command") Signed-off-by: Jie Zhou Reviewed-by: Andrew Rybchenko --- app/test-pmd/cmdline.c | 6 +++--- app/test-pmd/config.c | 5 +++-- app/test-pmd/testpmd.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 3712daae7b..e28d068cd2 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -16449,17 +16449,17 @@ cmd_set_port_fec_mode_parsed( { struct cmd_set_port_fec_mode *res = parsed_result; uint16_t port_id = res->port_id; - uint32_t mode; + uint32_t fec_capa; int ret; - ret = parse_fec_mode(res->fec_value, &mode); + ret = parse_fec_mode(res->fec_value, &fec_capa); if (ret < 0) { printf("Unknown fec mode: %s for Port %d\n", res->fec_value, port_id); return; } - ret = rte_eth_fec_set(port_id, mode); + ret = rte_eth_fec_set(port_id, fec_capa); if (ret == -ENOTSUP) { printf("Function not implemented\n"); return; diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 937a90f3cd..4847c36481 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3760,13 +3760,14 @@ set_tx_pkt_split(const char *name) } int -parse_fec_mode(const char *name, uint32_t *mode) +parse_fec_mode(const char *name, uint32_t *fec_capa) { uint8_t i; for (i = 0; i < RTE_DIM(fec_mode_name); i++) { if (strcmp(fec_mode_name[i].name, name) == 0) { - *mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode); + *fec_capa = + RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode); return 0; } } diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index aad2eb30f4..927ca587d3 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -878,7 +878,7 @@ void show_tx_pkt_segments(void); void set_tx_pkt_times(unsigned int *tx_times); void show_tx_pkt_times(void); void set_tx_pkt_split(const char *name); -int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode); +int parse_fec_mode(const char *name, uint32_t *fec_capa); void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa); void set_nb_pkt_per_burst(uint16_t pkt_burst); char *list_pkt_forwarding_modes(void); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:40.244433267 +0100 +++ 0069-app-testpmd-fix-type-of-FEC-mode-parsing-output.patch 2021-07-12 13:41:36.598124860 +0100 @@ -1 +1 @@ -From ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 Mon Sep 17 00:00:00 2001 +From ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 0268b18f95..dff5a75ec5 100644 +index 3712daae7b..e28d068cd2 100644 @@ -29 +30 @@ -@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed( +@@ -16449,17 +16449,17 @@ cmd_set_port_fec_mode_parsed( @@ -51 +52 @@ -index 43c79b5021..d87c970ac9 100644 +index 937a90f3cd..4847c36481 100644 @@ -54 +55 @@ -@@ -3617,13 +3617,14 @@ set_tx_pkt_split(const char *name) +@@ -3760,13 +3760,14 @@ set_tx_pkt_split(const char *name) @@ -72 +73 @@ -index 283b5e3680..9ae4d90dd1 100644 +index aad2eb30f4..927ca587d3 100644 @@ -75 +76 @@ -@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void); +@@ -878,7 +878,7 @@ void show_tx_pkt_segments(void);