On Mon, 2017-03-13 at 16:40 -0700, Alexei Starovoitov wrote:
> that's not how it works. It's a job of submitter to prove
> that additional code doesn't cause regressions especially
> when there are legitimate concerns.
This test was moved out of the mlx4_en_prepare_rx_desc() section into
the XDP_TX code path.
if (ring->page_cache.index > 0) {
/* XDP uses a single page per frame */
if (!frags->page) {
ring->page_cache.index--;
frags->page =
ring->page_cache.buf[ring->page_cache.index].page;
frags->dma =
ring->page_cache.buf[ring->page_cache.index].dma;
}
frags->page_offset = XDP_PACKET_HEADROOM;
rx_desc->data[0].addr = cpu_to_be64(frags->dma +
XDP_PACKET_HEADROOM);
return 0;
}
Can you check again your claim, because I see no additional cost
for XDP_TX.
In fact I removed from the other paths (which are equally important I
believe) a test that had no use, so everybody should be happy.