uint32_t packet_length = rte_pktmbuf_pkt_len(pkt);
uint32_t dest_if = INVALID_DESTIF;
+ uint32_t dst_phy_port = INVALID_DESTIF;
uint32_t src_phy_port = pkt->port;
+ if(is_phy_port_privte(src_phy_port))
+ dst_phy_port = prv_to_pub_map[src_phy_port];
+ else
+ dst_phy_port = pub_to_prv_map[src_phy_port];
+
if(is_gateway()){
/* 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);
uint32_t nhip = 0;
uint32_t dst_ip_addr = rte_bswap32(ipv4hdr->dst_addr);
- gw_get_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip);
+ gw_get_route_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip, dst_phy_port);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if, &dst_mac);
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];
uint32_t dest_if = INVALID_DESTIF;
uint32_t src_phy_port = pkt->port;
+ uint32_t dst_phy_port = INVALID_DESTIF;
+ if(is_phy_port_privte(src_phy_port))
+ dst_phy_port = prv_to_pub_map[src_phy_port];
+ else
+ dst_phy_port = pub_to_prv_map[src_phy_port];
if(is_gateway()){
/* 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);
uint32_t src_phy_port = pkt->port;
uint32_t dst_ip_addr = rte_bswap32(ipv4hdr->dst_addr);
- gw_get_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip);
+ gw_get_route_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip, dst_phy_port);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if, &dst_mac);
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;
if (p == NULL)
return NULL;
- strcpy(p->name, params->name);
+ strncpy(p->name, params->name, PIPELINE_NAME_SIZE);
p->log_level = params->log_level;
PLOG(p, HIGH, "ACL");
rte_ACL_hi_counter_block_in_use++;
counter_ptr = &rte_acl_counter_table[rte_ACL_hi_counter_block_in_use];
- strcpy(counter_ptr->name, params->name);
+ strncpy(counter_ptr->name, params->name,PIPELINE_NAME_SIZE);
p_acl->action_counter_index = rte_ACL_hi_counter_block_in_use;
p_acl->counters = counter_ptr;