On Wed, Apr 20, 2016 at 4:35 AM, Andriy Berestovskyy <aber at semihalf.com> wrote:
> Hi Jay, > > On Tue, Apr 19, 2016 at 10:16 PM, Jay Rolette <rolette at infinite.io> wrote: > > Should the driver error out in that case instead of only "sort of" > working? > > +1, we hit the same issue. Error or log message would help. > > > If I support a max frame size of 9216 bytes (exactly a 1K multiple to > make > > the NIC happy), then max_rx_pkt_len is going to be 9216 and > data_room_size > > will be 9216 + RTE_PKTMBUF_HEADROOM. > > Try to set max_rx_pkt_len <= 9K - 8 and mempool element size to 9K + > headroom + size of structures. > Thanks, Andriy. That makes sense given how the code + NIC are working. > > Is that check correct? > > Datasheet says: > The MFS does not include the 4 bytes of the VLAN header. Packets with > VLAN header can be as large as MFS + 4. When double VLAN is enabled, > the device adds 8 to the MFS for any packets. > Gotcha. Hopefully we can get the docs and example code up to where app developers don't need to crawl through driver source and NIC datasheets. That or have rte_pktmbuf_pool_create() take care of that sort of detail automatically. :-) Jay Regards, > Andriy >