From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 5B53F4CAF for ; Mon, 19 Nov 2018 13:26:12 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id y139so5108453wmc.5 for ; Mon, 19 Nov 2018 04:26:12 -0800 (PST) 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=VcKOXKEzcPdfeo7EzjcUFR/PsSJBbK1FoECnfB+3c2U=; b=pQ53efWJXJ0yCcusJnlhBKywzmutYBChfRMpgQU3A/ftLrzYMvkl/Ho3dv78bLvbWw +/Dk6COzvvvZuxPgeXmwxXqF3Td2sMQBjcpYSZde8XQD/nnfOnKVoDxInymEzi3vLROi +4CFVIPFONVFczje23TPQLdvbRK+PwwrS5MBx6IyYt2BSq4FKgZbhTG3A39slIKxp2Aq AIUAJwxpgH8IAGy9BZonSl9UKNPprqxgM49TkZdL8Wfu0PlRZtOFc9YKN8KU5xwYZsV9 YGMYx40k03IhvxHVEKYKgtmW+uzvb0Fe7WzHZkcI9Ap5/FJ2BgwgUfKSiU0CViLPQnzr /n9A== X-Gm-Message-State: AGRZ1gICgKWEajiW3gxa9Oq0sJJgqdKNWtAJqhG08kWgDc7TDPMbuu9m 3zC3OlrGoPvOF56SiY+nbIOwvBQuafs= X-Google-Smtp-Source: AFSGD/Uk9F1OGZsd0PEXV8VEH7VCqUO1/+STumRktS0r64+BsOS7x34APKjPUOfguuWdf9YWjHRJQg== X-Received: by 2002:a1c:9303:: with SMTP id v3-v6mr7361777wmd.82.1542630371964; Mon, 19 Nov 2018 04:26:11 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id t17sm8184552wme.43.2018.11.19.04.26.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 04:26:11 -0800 (PST) From: Luca Boccassi To: Herakliusz Lipiec Cc: Dong Wang , Konstantin Ananyev , dpdk stable Date: Mon, 19 Nov 2018 12:25:35 +0000 Message-Id: <20181119122538.14207-18-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119122538.14207-1-bluca@debian.org> References: <20181108180111.25873-1-bluca@debian.org> <20181119122538.14207-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/ipv4_multicast: fix leak of cloned packets' has been queued to LTS release 16.11.9 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: , X-List-Received-Date: Mon, 19 Nov 2018 12:26:12 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From 116289a11aee9e785c7e3a2f7b9e76cb00f2f53a Mon Sep 17 00:00:00 2001 From: Herakliusz Lipiec Date: Tue, 13 Nov 2018 11:49:29 +0000 Subject: [PATCH] examples/ipv4_multicast: fix leak of cloned packets [ upstream commit 91dc9c13ba978fb8147240ed6fa20c41145bf0db ] The ipv4_multicast sample application was dropping packets when using mbuf clone. When creating an L2 header and copying metadata from the source packet, the ol_flags were also copied along with all the other metadata. Because the cloned packet had IND_ATTACHED_MBUF flag set in its ol_flags, this caused the packets to never be freed when using rte_pktmbuf_free. Since copying ol_flags from the cloned packet is not necessary in the first place, just don't do it. Fixes: af75078fece3 ("first public release") Reported-by: Dong Wang Signed-off-by: Herakliusz Lipiec Acked-by: Konstantin Ananyev Acked-by: Dong Wang --- doc/guides/sample_app_ug/ipv4_multicast.rst | 1 - examples/ipv4_multicast/main.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst index 72da8c423..6badc681a 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst @@ -365,7 +365,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either hdr->pkt.in_port = pkt->pkt.in_port; hdr->pkt.vlan_macip = pkt->pkt.vlan_macip; hdr->pkt.hash = pkt->pkt.hash; - hdr->ol_flags = pkt->ol_flags; rte_mbuf_sanity_check(hdr, RTE_MBUF_PKT, 1); return hdr; diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index b908b3174..d2e1bfb98 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -301,8 +301,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->tx_offload = pkt->tx_offload; hdr->hash = pkt->hash; - hdr->ol_flags = pkt->ol_flags; - __rte_mbuf_sanity_check(hdr, 1); return hdr; } -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-19 12:15:18.487136672 +0000 +++ 0018-examples-ipv4_multicast-fix-leak-of-cloned-packets.patch 2018-11-19 12:15:18.123611432 +0000 @@ -1,8 +1,10 @@ -From 91dc9c13ba978fb8147240ed6fa20c41145bf0db Mon Sep 17 00:00:00 2001 +From 116289a11aee9e785c7e3a2f7b9e76cb00f2f53a Mon Sep 17 00:00:00 2001 From: Herakliusz Lipiec Date: Tue, 13 Nov 2018 11:49:29 +0000 Subject: [PATCH] examples/ipv4_multicast: fix leak of cloned packets +[ upstream commit 91dc9c13ba978fb8147240ed6fa20c41145bf0db ] + The ipv4_multicast sample application was dropping packets when using mbuf clone. When creating an L2 header and copying metadata from the source packet, the ol_flags were also copied @@ -13,7 +15,6 @@ not necessary in the first place, just don't do it. Fixes: af75078fece3 ("first public release") -Cc: stable@dpdk.org Reported-by: Dong Wang Signed-off-by: Herakliusz Lipiec @@ -25,10 +26,10 @@ 2 files changed, 3 deletions(-) diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst -index ce1474ec7..f6efa7f6f 100644 +index 72da8c423..6badc681a 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst -@@ -319,7 +319,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either +@@ -365,7 +365,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either hdr->pkt.in_port = pkt->pkt.in_port; hdr->pkt.vlan_macip = pkt->pkt.vlan_macip; hdr->pkt.hash = pkt->pkt.hash; @@ -37,10 +38,10 @@ return hdr; diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c -index 4073a4907..428ca4694 100644 +index b908b3174..d2e1bfb98 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c -@@ -266,8 +266,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) +@@ -301,8 +301,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->tx_offload = pkt->tx_offload; hdr->hash = pkt->hash;