AnsweredAssumed Answered

Converting IPV4 header to IPV6 header T4240

Question asked by jasonforster on Jan 22, 2020
Latest reply on Jan 29, 2020 by bpe

Hi  NXP Community,

I'm trying to convert an IPv4 header into an IPv6 header using the header manipulation table descriptor (using opcode 0x12), but I'm having some issues.

I've been able to manipulate the ip src address of an IPv4 frame (using the Header Manipulation Command Descriptor opcode 0x0c) successfully, however, when I try to form an IPv6 header from an IPv4 header I have had no success.

 

Referring to '5.13.11 Restrictions on the Usage of HMCDs' points me to updating FMBM_RIM[FOF]. I understand I need to do this because the frame size is increasing by an additional 20bytes (from 20 bytes of the ipv4 header, to 40 bytes of an ipv6 header). Is this correct?

 

When I set  FMBM_RIM[FOF] to be non-zero, polling the frame queues reveals no frame descriptors. I have no idea why this occurs.

 

If FMBM_RIM[FOF] is left at its default value of 0, the frame queue provides a frame descriptor (which is encouraging!). However, reading the content of the external buffer that is used to store the UDP frame, reveals only 20 bytes of the IPv6 header.

 

I'm thinking that my implementation is ok for frames that do not change in size, since ip4 to ipv4 manipulations are ok.

 

What I don't understand is what the consequences are of setting FMBM_RIM[FOF]. I've also set FMBM_REBM[BSM] which appears is necessary if setting FMBM_RIM[FOF], but continue to get no frames received when  FMBM_RIM[FOF] is non-zero.

 

Has anyone had any success converting ipv4 to ipv4 using the header manipulations? What values of FMBM_RIM[FOF]  and FMBM_REBM[BSM] have brought success for you?

 

Any assistance or pointers would be much appreciated.

 

Regards,

Jason.

 

 

Outcomes