Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds the initial XDP support to Freescale driver. It supports XDP_PASS, XDP_DROP and XDP_REDIRECT actions. Upcoming patches will add support for XDP_TX and Zero Copy features. This patch also optimizes the RX buffers by using the page pool, which uses one frame per page for easy management. In the future, it can be further improved to use two frames per page. This patch has been tested with the sample apps of "xdpsock" and "xdp2" in samples/bpf directory for both SKB and Native (XDP) mode. The following are the testing result comparing with the XDP skb-mode. # xdpsock -i eth0 sock0@eth0:0 rxdrop xdp-drv pps pkts 1.00 rx 198798 1040011 tx 0 0 # xdpsock -S -i eth0 // skb-mode sock0@eth0:0 rxdrop xdp-skb pps pkts 1.00 rx 95638 717251 tx 0 0 # xdp2 eth0 proto 0: 475362 pkt/s proto 0: 475549 pkt/s proto 0: 475480 pkt/s proto 0: 143258 pkt/s # xdp2 -S eth0 // skb-mode proto 17: 56468 pkt/s proto 17: 71999 pkt/s proto 17: 72000 pkt/s proto 17: 71988 pkt/s Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
- Loading branch information