dpdk_hqos_metadata_set classifies traffic by selecting bits from each packet 
according to the configured masks.

But what if the packet being inspected is shorter than expected?

For example, the default configuration includes this:

   * Packet field to identify the pipe.
   * Default value: Assuming Ethernet/IPv4/UDP packets, UDP payload bits 12 .. 
  .pktfield1_slabpos = 40,
  .pktfield1_slabmask = 0x0000000FFF000000LLU,

What if an ARP request (or response) is sent out over the interface: won't 
using that mask read from beyond the valid packet data?

Practically, I guess that this will mostly mean only that these occasional 
packets get some arbitrary classification - which isn't so bad.  But if we're 
relying on undefined behaviour to not do worse than this, that would seem 

This is a code-reading worry at the moment rather than an issue that I've 
actually seen.  Hopefully someone can assure me that there's some reason this 
isn't a problem at all.


vpp-dev mailing list

Reply via email to