On Fri, 24 Feb 2023 16:25:21 +0500
Tanzeel-inline <tanxeel1.ah...@gmail.com> wrote:

> +     oh = rte_pktmbuf_mtod(*m, struct rte_ether_hdr *);
> +     nh = (struct rte_ether_hdr *)(void *)
> +             rte_pktmbuf_prepend(*m, sizeof(struct rte_mpls_hdr));

Don't need void * cast. Can cast result of prepend (char *) to ether header 
directly.

Note: rte_pktmbuf_append/prepend should have been written initially to
return void * to reduce the number of casts.

Reply via email to