On Thu, Apr 15, 2021 at 1:12 PM Flavio Leitner <[email protected]> wrote: > > > +static void > > > +dump_invalid_packet(struct dp_packet *packet, const char *reason) > > > +{ > > > + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); > > > + struct ds ds = DS_EMPTY_INITIALIZER; > > > + size_t size; > > > + > > > + if (VLOG_DROP_DBG(&rl)) { > > > + return; > > > + } > > > + size = dp_packet_size(packet); > > > + ds_put_hex_dump(&ds, dp_packet_data(packet), size, 0, false); > > > > Are we sure we need to dump the entire packet, or are we ok with let’s say > > the first 128 bytes? > > For normal packets yes, that would be the case. But the packet might > be corrupted and this is only used when debugging is enabled, so having > a full dump is useful.
Anormal padding, some corruption... When something is wrong with a packet, I prefer a full dump than being sorry I only have partial info. -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
