[dpdk-dev] [PATCH] net/mlx5: fix calculating TSO inline size

Shahaf Shuler shahafs at mellanox.com
Wed Sep 13 07:05:14 CEST 2017


Tuesday, September 12, 2017 9:34 PM, Nélio Laranjeiro:
> > On Sep 12, 2017, at 12:24 AM, Nélio Laranjeiro
> >>> Is not it dangerous to assume inl will always be 4 bytes long?  Why
> >>> not writing the real value instead?
> >> That was for readability of the code and uint32_t will be always
> >> 4bytes. But for better readability, it should be 'inline_header'
> >> instead of 'inl' though. I'm also okay with using "4" as well. Which way do
> you prefer?
> >
> > I agree on both, I was not clear enough to explain my thought, if for
> > some reason the inl moves from uint32_t to uint16_t without touching
> > the sizeof later, it will cause an issue.
> 
> I tried to change the sizeof but I found that there are more "sizeof(inl)" in the
> following lines. Changing all the sizeof would be beyond the scope of this
> patch. So, how about leaving it as is for consistency?

The inline segment format is not expected to change so easily. It is parsed by the HW and HW maintains backward compatibility for all of the WQE structures. 

> 
> Thanks
> Yongseok
> 
> 
> 
> 



More information about the dev mailing list