[vpp-dev] IPv6 Encapsulation - Buffer chains
Hello all, As I explained it in a previous thread, I'm trying to do some IPv6 in IPv6 encapsulation. In addition to the outer IPv6 header that I'm adding for the encapsulation, I'm also adding an Hop-by-hop extension header. Since the size of the outer IPv6 header + the HBH header can be quite large, I need to use a new buffer to store the corresponding data. Then, I need to create a buffer chain to link the original buffer and the new one. It is relatively easy to add a buffer at the end of a chain : I've already done it and it worked fine. However, here in my case, I need to add the new buffer at the beginning of the chain because it carries the outer IPv6 header that obviously needs to come on top of the existing packet. My issue is that I'm not able to prepend properly my new buffer to the chain. Indeed, when I simply add the new buffer at the beginning of the chain without changing any fields in the buffer's metadata but the minimum required to make the chain (i.e next_buffer, total_length_not_including_first_buffer, etc.), the next VPP nodes seem to ignore my buffer and directly use the next one in the chain (i.e the original buffer in my case). I assume that I should set some buffer's metadata accordingly but I don't know which one ? More generally speaking, what should be configured in a newly created buffer when one wants to add it as the first buffer of a chain ? Thank you for your help, Jérôme -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19502): https://lists.fd.io/g/vpp-dev/message/19502 Mute This Topic: https://lists.fd.io/mt/83168416/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] IPv6 Encapsulation - Buffer chains
Jérôme, Did you remember to enqueue the new head buffer’s buffer index to the next node instead of the original? Cheers Ole > On 29 May 2021, at 13:31, jerome.bay...@student.uliege.be wrote: > > > Hello all, > > As I explained it in a previous thread, I'm trying to do some IPv6 in IPv6 > encapsulation. In addition to the outer IPv6 header that I'm adding for the > encapsulation, I'm also adding an Hop-by-hop extension header. > > Since the size of the outer IPv6 header + the HBH header can be quite large, > I need to use a new buffer to store the corresponding data. Then, I need to > create a buffer chain to link the original buffer and the new one. It is > relatively easy to add a buffer at the end of a chain : I've already done it > and it worked fine. However, here in my case, I need to add the new buffer at > the beginning of the chain because it carries the outer IPv6 header that > obviously needs to come on top of the existing packet. > > My issue is that I'm not able to prepend properly my new buffer to the chain. > Indeed, when I simply add the new buffer at the beginning of the chain > without changing any fields in the buffer's metadata but the minimum required > to make the chain (i.e next_buffer, total_length_not_including_first_buffer, > etc.), the next VPP nodes seem to ignore my buffer and directly use the next > one in the chain (i.e the original buffer in my case). I assume that I should > set some buffer's metadata accordingly but I don't know which one ? > > More generally speaking, what should be configured in a newly created buffer > when one wants to add it as the first buffer of a chain ? > > Thank you for your help, > > Jérôme > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19503): https://lists.fd.io/g/vpp-dev/message/19503 Mute This Topic: https://lists.fd.io/mt/83168416/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] IPv6 Encapsulation - Buffer chains
Ole, I thought I did it correctly, but apparently not. I did again this part of the implementation starting from zero and this time everything works as it should ! Thanks for the help, Jérôme De: "Ole Troan" À: "jerome bayaux" Cc: vpp-dev@lists.fd.io Envoyé: Samedi 29 Mai 2021 17:14:45 Objet: Re: [vpp-dev] IPv6 Encapsulation - Buffer chains Jérôme, Did you remember to enqueue the new head buffer’s buffer index to the next node instead of the original? Cheers Ole On 29 May 2021, at 13:31, jerome.bay...@student.uliege.be wrote: BQ_BEGIN Hello all, As I explained it in a previous thread, I'm trying to do some IPv6 in IPv6 encapsulation. In addition to the outer IPv6 header that I'm adding for the encapsulation, I'm also adding an Hop-by-hop extension header. Since the size of the outer IPv6 header + the HBH header can be quite large, I need to use a new buffer to store the corresponding data. Then, I need to create a buffer chain to link the original buffer and the new one. It is relatively easy to add a buffer at the end of a chain : I've already done it and it worked fine. However, here in my case, I need to add the new buffer at the beginning of the chain because it carries the outer IPv6 header that obviously needs to come on top of the existing packet. My issue is that I'm not able to prepend properly my new buffer to the chain. Indeed, when I simply add the new buffer at the beginning of the chain without changing any fields in the buffer's metadata but the minimum required to make the chain (i.e next_buffer, total_length_not_including_first_buffer, etc.), the next VPP nodes seem to ignore my buffer and directly use the next one in the chain (i.e the original buffer in my case). I assume that I should set some buffer's metadata accordingly but I don't know which one ? More generally speaking, what should be configured in a newly created buffer when one wants to add it as the first buffer of a chain ? Thank you for your help, Jérôme BQ_END -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19508): https://lists.fd.io/g/vpp-dev/message/19508 Mute This Topic: https://lists.fd.io/mt/83168416/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-