nff-go icon indicating copy to clipboard operation
nff-go copied to clipboard

Updating to support newer versions of DPDK

Open AndrewAlston opened this issue 3 years ago • 2 comments

I've been working with nff-go to make it function correctly with dpdk-20.11.1 (which is critical for support of e810 cards and certain functions in them) - but I've run into an issue and potentially being a little stupid.

in low.go - there is a reference in setMbufLen to mb.anon5[0] -> mb.anon5[7] - and for the life of me I cannot seem to figure out how this maps back to MBuf structure in dpdk itself - since that anon struct member doesn't seem to exist in any version of dpdk that I've checked all the way back to 18 - what I do know is - this kicks out entirely on the later versions of dpdk saying that struct member doesn't exist. Anyone got any idea how this maps back so I can modify accordingly?

AndrewAlston avatar Apr 29 '21 05:04 AndrewAlston

I'm working on the same task of bumping nff-go to use dpdk v20.11 (and hopefully even newer versions eventually). From looking at the struct definition for rte_mbuf (https://doc.dpdk.org/api-19.08/rte__mbuf_8h_source.html#l00534), I believe anon5 refers to the (5+1)th anonymous union defined. I can't find an explicit mention of this convention in the cgo docs but it seems to match with the fact that referencing anon6 breaks compilation (there are only 6 anon unions defined in v19.08), and also by anon3 breaking when upgrading to v20.11 (where there are only 3 unions defined - https://doc.dpdk.org/api-20.11/rte__mbuf__core_8h_source.html#l00474). Luckily the union in question didn't change other than becoming the 3rd in the struct, so I believe we can just change mb.anon5 to mb.anon2. I'm still resolving some other compilation issues but will post here if this works out.

maheeshap-canopus avatar Sep 15 '21 09:09 maheeshap-canopus

any updates?

XAhad32 avatar Sep 19 '23 11:09 XAhad32