[PATCH v3] lib/net: add MPLS insert and strip functionality
Stephen Hemminger
stephen at networkplumber.org
Fri Feb 24 17:29:07 CET 2023
On Fri, 24 Feb 2023 16:25:21 +0500
Tanzeel-inline <tanxeel1.ahmed at 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.
More information about the dev
mailing list