On Tue, 06 Oct 2020 00:55:19 +0200
Thomas Monjalon <tho...@monjalon.net> wrote:

> > -       cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr));
> > +       cksum = rte_raw_cksum(ipv4_hdr, (ipv4_hdr->version_ihl & 0xf) * 4); 
> >  
> 
> Truly naive questions:
> - doesn't it deserve a static inline function rte_ipv4_hdr_len()?

Makes sense to have that.

> - how generated code for "* 4" compares with "<< 2"?

The code is the same if value is unsigned.

Reply via email to