Commit be572424 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'dpaa_eth-add-xdp-support'

Camelia Groza says:

====================
dpaa_eth: add XDP support

Enable XDP support for the QorIQ DPAA1 platforms.

Implement all the current actions (DROP, ABORTED, PASS, TX, REDIRECT). No
Tx batching is added at this time.

Additional XDP_PACKET_HEADROOM bytes are reserved in each frame's headroom.

After transmit, a reference to the xdp_frame is saved in the buffer for
clean-up on confirmation in a newly created structure for software
annotations. DPAA_TX_PRIV_DATA_SIZE bytes are reserved in the buffer for
storing this structure and the XDP program is restricted from accessing
them.

The driver shares the egress frame queues used for XDP with the network
stack. The DPAA driver is a LLTX driver so no explicit locking is required
on transmission.
====================

Link: https://lore.kernel.org/r/cover.1606322126.git.camelia.groza@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents e71d2b95 ae680bcb
......@@ -68,6 +68,7 @@ struct dpaa_fq {
u16 channel;
u8 wq;
enum dpaa_fq_type fq_type;
struct xdp_rxq_info xdp_rxq;
};
struct dpaa_fq_cbs {
......@@ -126,6 +127,7 @@ struct dpaa_napi_portal {
struct napi_struct napi;
struct qman_portal *p;
bool down;
int xdp_act;
};
struct dpaa_percpu_priv {
......@@ -144,6 +146,15 @@ struct dpaa_buffer_layout {
u16 priv_data_size;
};
/* Information to be used on the Tx confirmation path. Stored just
* before the start of the transmit buffer. Maximum size allowed
* is DPAA_TX_PRIV_DATA_SIZE bytes.
*/
struct dpaa_eth_swbp {
struct sk_buff *skb;
struct xdp_frame *xdpf;
};
struct dpaa_priv {
struct dpaa_percpu_priv __percpu *percpu_priv;
struct dpaa_bp *dpaa_bp;
......@@ -188,6 +199,8 @@ struct dpaa_priv {
bool tx_tstamp; /* Tx timestamping enabled */
bool rx_tstamp; /* Rx timestamping enabled */
struct bpf_prog *xdp_prog;
};
/* from dpaa_ethtool.c */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment