[dpdk-dev] [PATCH] net/tap: perform proto field update for tun only
Varghese, Vipin
vipin.varghese at intel.com
Tue May 15 11:08:49 CEST 2018
Thanks Keith,
I have made changes and shared v2 patch for both the suggestions.
Thanks
Vipin Varghese
<snipped>
> > + /*
> > + * TUN and TAP are created with IFF_NO_PI disabled.
> > + * For TUN PMD this mandatory as fields are used by
> > + * Kernel tun.c to determine whether its IP or non IP
> > + * packets.
> > + *
> > + * The logic fetches the first byte of data from mbuf.
> > + * compares whether its v4 or v6. If none match default
> > + * value 0x00 is taken for protocol field.
>
> Little reword and remove the ‘.’ at end of first line.
>
> The logic fetches the first byte of data from mbuf then compares whether it is v4
> or v6. If not equal to zero then it must be a protocol field.
>
>
>
> > + */
> > + char *buff_data = rte_pktmbuf_mtod(seg, void *);
> > + j = (*buff_data & 0xf0);
> > + pi.proto = (j == 0x40) ? 0x0008 :
> > + (j == 0x60) ? 0xdd86 : 0x00;
> > + printf("j %x pi proto %x\n", j, pi.proto);
>
> Should this not be a LOG message or is this debug that was not removed? If log
> message then add move text to explain the output better.
>
<snipped>
More information about the dev
mailing list