vACL: The ethernet mac address not updated correctly 17/44917/1
authorAnand B Jyoti <anand.b.jyoti@intel.com>
Thu, 12 Oct 2017 01:34:03 +0000 (07:04 +0530)
committerDeepak S <deepak.s@linux.intel.com>
Thu, 12 Oct 2017 03:26:30 +0000 (20:26 -0700)
JIRA: SAMPLEVNF-85

The ethernet header pointer initialization was wrong due to which
the MAC address were not updated. Hence the packets were not
reaching the destination.

Change-Id: Ide061abaec9de9707390664848b01bf79171bfbd
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
VNFs/vACL/pipeline/pipeline_acl_be.c

index 512c2f6..d4b9210 100644 (file)
@@ -784,7 +784,7 @@ pkt_work_acl_key(struct rte_pipeline *p,
                 /* Gateway Proc Starts */
                 struct ether_hdr *ehdr = (struct ether_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt,
-                            META_DATA_OFFSET + MBUF_HDR_ROOM);
+                            META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM);
 
                 struct ipv4_hdr *ipv4hdr = (struct ipv4_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt, IP_START);
@@ -896,7 +896,7 @@ pkt_work_acl_key(struct rte_pipeline *p,
 
                 struct ether_hdr *ehdr = (struct ether_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt,
-                            META_DATA_OFFSET + MBUF_HDR_ROOM);
+                            META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM);
 
                 struct ether_addr dst_mac;
                 uint8_t nhipv6[IPV6_ADD_SIZE];
@@ -1481,7 +1481,7 @@ pkt_work_acl_ipv4_key(struct rte_pipeline *p,
                 /* Gateway Proc Starts */
                 struct ether_hdr *ehdr = (struct ether_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt,
-                            META_DATA_OFFSET + MBUF_HDR_ROOM);
+                            META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM);
 
                 struct ipv4_hdr *ipv4hdr = (struct ipv4_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt, IP_START);
@@ -2065,7 +2065,7 @@ pkt_work_acl_ipv6_key(struct rte_pipeline *p,
 
                 struct ether_hdr *ehdr = (struct ether_hdr *)
                     RTE_MBUF_METADATA_UINT32_PTR(pkt,
-                            META_DATA_OFFSET + MBUF_HDR_ROOM);
+                            META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM);
 
                 struct ether_addr dst_mac;
                 uint32_t dest_if = INVALID_DESTIF;