diff mbox series

examples/ipv4_multicast: remove useless mbuf info copy

Message ID 1542793757-52622-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series examples/ipv4_multicast: remove useless mbuf info copy | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Zhao1, Wei Nov. 21, 2018, 9:49 a.m. UTC
There is not need for these useless information and
it had better be removed in oder not to confusing users.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 examples/ipv4_multicast/main.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Zhao1, Wei Nov. 21, 2018, 10:17 a.m. UTC | #1
Add the background for this patch 
https://mails.dpdk.org/archives/dev/2018-November/119391.html


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, November 21, 2018 5:49 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH] examples/ipv4_multicast: remove useless mbuf info copy
> 
> There is not need for these useless information and it had better be
> removed in oder not to confusing users.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  examples/ipv4_multicast/main.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/examples/ipv4_multicast/main.c
> b/examples/ipv4_multicast/main.c index 428ca46..1eef291 100644
> --- a/examples/ipv4_multicast/main.c
> +++ b/examples/ipv4_multicast/main.c
> @@ -254,18 +254,10 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
>  	/* prepend new header */
>  	hdr->next = pkt;
> 
> -
>  	/* update header's fields */
>  	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
>  	hdr->nb_segs = pkt->nb_segs + 1;
> 
> -	/* copy metadata from source packet*/
> -	hdr->port = pkt->port;
> -	hdr->vlan_tci = pkt->vlan_tci;
> -	hdr->vlan_tci_outer = pkt->vlan_tci_outer;
> -	hdr->tx_offload = pkt->tx_offload;
> -	hdr->hash = pkt->hash;
> -
>  	__rte_mbuf_sanity_check(hdr, 1);
>  	return hdr;
>  }
> --
> 2.7.5
Thomas Monjalon Dec. 19, 2018, 9:28 p.m. UTC | #2
21/11/2018 11:17, Zhao1, Wei:
> Add the background for this patch 
> https://mails.dpdk.org/archives/dev/2018-November/119391.html
> 
> > There is not need for these useless information and it had better be
> > removed in oder not to confusing users.
> > 
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Applied, thanks
diff mbox series

Patch

diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 428ca46..1eef291 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -254,18 +254,10 @@  mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	/* prepend new header */
 	hdr->next = pkt;
 
-
 	/* update header's fields */
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	/* copy metadata from source packet*/
-	hdr->port = pkt->port;
-	hdr->vlan_tci = pkt->vlan_tci;
-	hdr->vlan_tci_outer = pkt->vlan_tci_outer;
-	hdr->tx_offload = pkt->tx_offload;
-	hdr->hash = pkt->hash;
-
 	__rte_mbuf_sanity_check(hdr, 1);
 	return hdr;
 }