tsnep: Remove FCS for XDP data path – kernel/git/torvalds/linux.git

@@ -1485,7 +1485,7 @@ static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi,

xdp_prepare_buff(&xdp, page_address(entry->page),

XDP_PACKET_HEADROOM + TSNEP_RX_INLINE_METADATA_SIZE,

– length, false);

+ length – ETH_FCS_LEN, false);

consume = tsnep_xdp_run_prog(rx, prog, &xdp,

&xdp_status, tx_nq, tx);

@@ -1568,7 +1568,7 @@ static int tsnep_rx_poll_zc(struct tsnep_rx *rx, struct napi_struct *napi,

prefetch(entry->xdp->data);

length = __le32_to_cpu(entry->desc_wb->properties) &

TSNEP_DESC_LENGTH_MASK;

– xsk_buff_set_size(entry->xdp, length);

+ xsk_buff_set_size(entry->xdp, length – ETH_FCS_LEN);

xsk_buff_dma_sync_for_cpu(entry->xdp, rx->xsk_pool);

/* RX metadata with timestamps is in front of actual data,


Source link

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker