X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ether%2Frte_ether.h;h=49f457617d6a07237d7b15e694e84534d539723b;hb=2ee98e69e104b551aeb1d9567e8a28a854849c0f;hp=bafeb2b8e4642facddf600b75e5054bffd317964;hpb=93fa8c0e1068afcecb4f0020f8815c942a74cf8b;p=dpdk.git diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h index bafeb2b8e4..49f457617d 100644 --- a/lib/librte_ether/rte_ether.h +++ b/lib/librte_ether/rte_ether.h @@ -383,7 +383,6 @@ static inline int rte_vlan_insert(struct rte_mbuf **m) struct ether_hdr *oh, *nh; struct vlan_hdr *vh; -#ifdef RTE_MBUF_REFCNT /* Can't insert header if mbuf is shared */ if (rte_mbuf_refcnt_read(*m) > 1) { struct rte_mbuf *copy; @@ -394,7 +393,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m) rte_pktmbuf_free(*m); *m = copy; } -#endif + oh = rte_pktmbuf_mtod(*m, struct ether_hdr *); nh = (struct ether_hdr *) rte_pktmbuf_prepend(*m, sizeof(struct vlan_hdr));