Searched hist:"4 a7f6c5ac9e558b07a6cf9407ad28250b60980ab" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/drivers/net/ethernet/freescale/dpaa2/ |
H A D | dpaa2-xsk.c | diff 4a7f6c5ac9e558b07a6cf9407ad28250b60980ab Tue Oct 18 09:19:00 CDT 2022 Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> net: dpaa2-eth: AF_XDP TX zero copy support
Add support in dpaa2-eth for packet processing on the Tx path using AF_XDP zero copy mode.
The newly added dpaa2_xsk_tx() function will handle enqueuing AF_XDP Tx packets into the appropriate queue and update any necessary statistics.
On a more detailed note, the dpaa2_xsk_tx_build_fd() function handles creating a Scatter-Gather frame descriptor with only one data buffer. This is needed because otherwise we would need to impose a headroom in the Tx buffer to store our software annotation structures. This tactic is already used on the normal data path of the dpaa2-eth driver, thus we are reusing the dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions in order to allocate and recycle the Scatter-Gather table buffers.
In case we have reached the maximum number of Tx XSK packets to be sent in a NAPI cycle, we'll exit the dpaa2_eth_poll() and hope to be rescheduled again.
On the XSK Tx confirmation path, we are just unmapping the SGT buffer and recycle it for further use.
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | dpaa2-eth.h | diff 4a7f6c5ac9e558b07a6cf9407ad28250b60980ab Tue Oct 18 09:19:00 CDT 2022 Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> net: dpaa2-eth: AF_XDP TX zero copy support
Add support in dpaa2-eth for packet processing on the Tx path using AF_XDP zero copy mode.
The newly added dpaa2_xsk_tx() function will handle enqueuing AF_XDP Tx packets into the appropriate queue and update any necessary statistics.
On a more detailed note, the dpaa2_xsk_tx_build_fd() function handles creating a Scatter-Gather frame descriptor with only one data buffer. This is needed because otherwise we would need to impose a headroom in the Tx buffer to store our software annotation structures. This tactic is already used on the normal data path of the dpaa2-eth driver, thus we are reusing the dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions in order to allocate and recycle the Scatter-Gather table buffers.
In case we have reached the maximum number of Tx XSK packets to be sent in a NAPI cycle, we'll exit the dpaa2_eth_poll() and hope to be rescheduled again.
On the XSK Tx confirmation path, we are just unmapping the SGT buffer and recycle it for further use.
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | dpaa2-eth.c | diff 4a7f6c5ac9e558b07a6cf9407ad28250b60980ab Tue Oct 18 09:19:00 CDT 2022 Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> net: dpaa2-eth: AF_XDP TX zero copy support
Add support in dpaa2-eth for packet processing on the Tx path using AF_XDP zero copy mode.
The newly added dpaa2_xsk_tx() function will handle enqueuing AF_XDP Tx packets into the appropriate queue and update any necessary statistics.
On a more detailed note, the dpaa2_xsk_tx_build_fd() function handles creating a Scatter-Gather frame descriptor with only one data buffer. This is needed because otherwise we would need to impose a headroom in the Tx buffer to store our software annotation structures. This tactic is already used on the normal data path of the dpaa2-eth driver, thus we are reusing the dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions in order to allocate and recycle the Scatter-Gather table buffers.
In case we have reached the maximum number of Tx XSK packets to be sent in a NAPI cycle, we'll exit the dpaa2_eth_poll() and hope to be rescheduled again.
On the XSK Tx confirmation path, we are just unmapping the SGT buffer and recycle it for further use.
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|