From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BE05A04F0 for ; Thu, 19 Dec 2019 15:40:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7260F1BF7B; Thu, 19 Dec 2019 15:40:22 +0100 (CET) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 1FB131BFE0 for ; Thu, 19 Dec 2019 15:40:21 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id f129so5868762wmf.2 for ; Thu, 19 Dec 2019 06:40:21 -0800 (PST) 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=iYN/EESoI3Hno8fuSTxEYjMsMxYNCVR83CvUNBtSxSg=; b=NLiOEy7rFdZaj3wY7DnDQSfkXL28jQQMxioC86iK7or3JqnK/clu7fld3f2PPVw8bW sJ56KltpNLM2fL8h2sIRREcbqR59n62S+N8qUbLlH+p1RuqGohIlVott/aocdpgoFk0I 5U7cb8JB1Bx9nNu41K7HsFaJOEifeurkGPmvvdqNckq1Q6CaMCg26OyyKGpNbgZrSDiz rdYxTCdHjJwG8qMwTLLZ9CW3pXLORQIKkHQ0Mf8zgwr6REn/CUh9DOPRLHkZHxFEH18m rqAZfftRN8srfBSiGjs/1J3d7reOsMKMtNHssQDNiJDAQvCTjKYvZXAho4mT1uzW29CQ pHbw== 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=iYN/EESoI3Hno8fuSTxEYjMsMxYNCVR83CvUNBtSxSg=; b=r5vn6xoWRwOjSHrSAbcnHSZgZlixYfEXAsAYDk0zrlngWUPYrG1EPBHJg31fGWXZlm I8yH5UDzhDqpIyW5/Kj76ZWccbhsdO73jcnV2HvSQ0XNTROvJPaHchULZ2/O0il4AupE WNYVafpOI05wRI1YmMUelCifE7rKm1bnZ3fnTTGvu2KyZ4xfGN096KqHZrJJxPUsh0Kl WOOjz0EWpwA8efJrO0ZrFJJEOGY6VLC+DK+vjUi+euBwtPNMXWm5D/15ZrhYPFji4ZoR z6Q1ls2jXKe/vr0jnAvUxprf/WJvZNd9malQParVAJoghbqB3eq84WLaQRO9uog4piix 8d7Q== X-Gm-Message-State: APjAAAVFR6HSCigif+HnnXRctuWWYG0h6g896x9sFIT09ome7QvJq9xN mEoViZ5ogYMu053XWcS+oVGABeXtWHI= X-Google-Smtp-Source: APXvYqzlShgJ7vErmIzr68X5HW0o2pv5o9UkT3tWb6bjfDn+JOTlHuWShV8xCal4d8BzMEsQzRgxRw== X-Received: by 2002:a1c:2dcd:: with SMTP id t196mr10203178wmt.22.1576766420853; Thu, 19 Dec 2019 06:40:20 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m10sm6549927wrx.19.2019.12.19.06.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:40:20 -0800 (PST) From: luca.boccassi@gmail.com To: David Hunt Cc: Bruce Richardson , dpdk stable Date: Thu, 19 Dec 2019 14:34:03 +0000 Message-Id: <20191219143447.21506-96-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/vm_power: fix build without i40e' has been queued to LTS release 17.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. 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. Thanks. Luca Boccassi --- >From 3b096e804f651a3b15826ee8e37ef13a666ab5f6 Mon Sep 17 00:00:00 2001 From: David Hunt Date: Thu, 24 Oct 2019 15:26:10 +0100 Subject: [PATCH] examples/vm_power: fix build without i40e [ upstream commit e4d028a0fb53809a341f62a39e59f9e13e7c7f59 ] channel_monitor.c was dependent on i40e driver being available. This is only necessary for the TRAFFIC policy, so use #ifdef's to not call these when i40e not available. Fixes: f14791a8126e ("examples/vm_power_mgr: add policy to channels") Signed-off-by: David Hunt Tested-by: Bruce Richardson Acked-by: Bruce Richardson --- examples/vm_power_manager/channel_monitor.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c index 37e71ed905..6e73d54dd5 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c @@ -49,7 +49,9 @@ #include #include #include +#ifdef RTE_LIBRTE_I40E_PMD #include +#endif #include #include "channel_monitor.h" @@ -145,8 +147,12 @@ get_pfid(struct policy *pol) for (i = 0; i < pol->pkt.nb_mac_to_monitor; i++) { for (x = 0; x < nb_ports; x++) { +#ifdef RTE_LIBRTE_I40E_PMD ret = rte_pmd_i40e_query_vfid_by_mac(x, (struct ether_addr *)&(pol->pkt.vfid[i])); +#else + ret = -ENOTSUP; +#endif if (ret != -EINVAL) { pol->port[i] = x; break; @@ -209,15 +215,21 @@ get_pkt_diff(struct policy *pol) vsi_pkt_count_prev_total = 0; double rdtsc_curr, rdtsc_diff, diff; int x; +#ifdef RTE_LIBRTE_I40E_PMD struct rte_eth_stats vf_stats; +#endif for (x = 0; x < pol->pkt.nb_mac_to_monitor; x++) { +#ifdef RTE_LIBRTE_I40E_PMD /*Read vsi stats*/ if (rte_pmd_i40e_get_vf_stats(x, pol->pfid[x], &vf_stats) == 0) vsi_pkt_count = vf_stats.ipackets; else vsi_pkt_count = -1; +#else + vsi_pkt_count = -1; +#endif vsi_pkt_total += vsi_pkt_count; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:30.153668706 +0000 +++ 0096-examples-vm_power-fix-build-without-i40e.patch 2019-12-19 14:32:26.225300205 +0000 @@ -1,14 +1,15 @@ -From e4d028a0fb53809a341f62a39e59f9e13e7c7f59 Mon Sep 17 00:00:00 2001 +From 3b096e804f651a3b15826ee8e37ef13a666ab5f6 Mon Sep 17 00:00:00 2001 From: David Hunt Date: Thu, 24 Oct 2019 15:26:10 +0100 Subject: [PATCH] examples/vm_power: fix build without i40e +[ upstream commit e4d028a0fb53809a341f62a39e59f9e13e7c7f59 ] + channel_monitor.c was dependent on i40e driver being available. This is only necessary for the TRAFFIC policy, so use #ifdef's to not call these when i40e not available. Fixes: f14791a8126e ("examples/vm_power_mgr: add policy to channels") -Cc: stable@dpdk.org Signed-off-by: David Hunt Tested-by: Bruce Richardson @@ -18,10 +19,10 @@ 1 file changed, 12 insertions(+) diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c -index 0c73fac558..29e1cb64d0 100644 +index 37e71ed905..6e73d54dd5 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c -@@ -28,7 +28,9 @@ +@@ -49,7 +49,9 @@ #include #include #include @@ -31,20 +32,20 @@ #include #include "channel_monitor.h" -@@ -436,8 +438,12 @@ get_pfid(struct policy *pol) +@@ -145,8 +147,12 @@ get_pfid(struct policy *pol) for (i = 0; i < pol->pkt.nb_mac_to_monitor; i++) { - RTE_ETH_FOREACH_DEV(x) { + for (x = 0; x < nb_ports; x++) { +#ifdef RTE_LIBRTE_I40E_PMD ret = rte_pmd_i40e_query_vfid_by_mac(x, - (struct rte_ether_addr *)&(pol->pkt.vfid[i])); + (struct ether_addr *)&(pol->pkt.vfid[i])); +#else + ret = -ENOTSUP; +#endif if (ret != -EINVAL) { pol->port[i] = x; break; -@@ -531,15 +537,21 @@ get_pkt_diff(struct policy *pol) +@@ -209,15 +215,21 @@ get_pkt_diff(struct policy *pol) vsi_pkt_count_prev_total = 0; double rdtsc_curr, rdtsc_diff, diff; int x;