It is mainly about first segment. Majority of vpp code asumes that packet headers are in the first segment. This is to prevent crashes due to headers being split between 2.
— Damjan > On 08.09.2021., at 11:31, Prashant Upadhyaya <praupadhy...@gmail.com> wrote: > > Hi Damjan, > > Thanks for the feedback. > Out of curiosity, what is the motivation of this contract about > minimal length of chained buffer data -- surely, my case being in > point, the chaining framework should not make any assumptions about > how the user would use it. > > Regards > -Prashant > >> On Tue, Sep 7, 2021 at 12:59 AM Damjan Marion <dmar...@me.com> wrote: >> >> >> — >> Damjan >> >> >> >> On 06.09.2021., at 15:27, Prashant Upadhyaya <praupadhy...@gmail.com> wrote: >> >> Hi, >> >> I am using VPP21.06 >> In vlib_buffer_advance there is the following assert -- >> ASSERT ((b->flags & VLIB_BUFFER_NEXT_PRESENT) == 0 || >> b->current_length >= VLIB_BUFFER_MIN_CHAIN_SEG_SIZE); >> >> The above is problematic as I have a usecase where I construct a chained >> packet. >> The first packet in the chain is containing just an ip4/udp/gtp header >> and the second packet in the chain is an IP4 packet of arbitrary >> length -- you can see that I am trying to wrap the packet into gtp via >> chaining. >> As a result this assert hits and brings the house down. >> My usecase works fine when I use the non-debug build of VPP. >> >> Perhaps this assert should be removed ? >> >> >> This assert enforces contract with the rest of the VPP code about minimal >> length of chaine buffer data. >> You can remove it, but be aware of consequences. At some point things may >> just blow up…. >> >> — >> Damjan
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20094): https://lists.fd.io/g/vpp-dev/message/20094 Mute This Topic: https://lists.fd.io/mt/85411974/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-