/* Pop Ethernet header */
if (app.ether_hdr_pop_push) {
rte_pktmbuf_adj(m, (uint16_t)sizeof(struct ether_hdr));
- m->pkt.vlan_macip.f.l2_len = 0;
- m->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr);
+ m->l2_len = 0;
+ m->l3_len = sizeof(struct ipv4_hdr);
}
}
port_in_id = params->port_in_id;
/* Handle request */
- req = (struct app_msg_req *) ((struct rte_mbuf *)msg)->ctrl.data;
+ req = (struct app_msg_req *)rte_ctrlmbuf_data((struct rte_mbuf *)msg);
switch (req->type) {
case APP_MSG_REQ_PING:
{
}
/* Fill in response message */
- resp = (struct app_msg_resp *) ((struct rte_mbuf *)msg)->ctrl.data;
+ resp = (struct app_msg_resp *)rte_ctrlmbuf_data((struct rte_mbuf *)msg);
resp->result = result;
/* Send response */