diff mbox series

[v7,intel-next,5/9] ice: do not create xdp_frame on XDP_TX

Message ID 20210819120004.34392-6-maciej.fijalkowski@intel.com
State New
Headers show
Series [v7,intel-next,1/9] ice: remove ring_active from ice_ring | expand

Commit Message

Maciej Fijalkowski Aug. 19, 2021, noon UTC
xdp_frame is not needed for XDP_TX data path in ice driver case.
For this data path cleaning of sent descriptor will not happen anywhere
outside of the driver, which means that carrying the information about
the underlying memory model via xdp_frame will not be used. Therefore,
this conversion can be simply dropped, which would relieve CPU a bit.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kuruvinakunnel, George Sept. 3, 2021, 6:40 a.m. UTC | #1
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Maciej

> Fijalkowski

> Sent: Thursday, August 19, 2021 5:30 PM

> To: intel-wired-lan@lists.osuosl.org

> Cc: joamaki@gmail.com; Lobakin, Alexandr <alexandr.lobakin@intel.com>;

> netdev@vger.kernel.org; toke@redhat.com; bjorn@kernel.org; kuba@kernel.org;

> bpf@vger.kernel.org; davem@davemloft.net; Karlsson, Magnus

> <magnus.karlsson@intel.com>

> Subject: [Intel-wired-lan] [PATCH v7 intel-next 5/9] ice: do not create xdp_frame on

> XDP_TX

> 

> xdp_frame is not needed for XDP_TX data path in ice driver case.

> For this data path cleaning of sent descriptor will not happen anywhere outside of

> the driver, which means that carrying the information about the underlying memory

> model via xdp_frame will not be used. Therefore, this conversion can be simply

> dropped, which would relieve CPU a bit.

> 

> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

> ---

>  drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 


Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index b031f754c5cb..7739cd379052 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -554,7 +554,7 @@  ice_run_xdp(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
 		return ICE_XDP_PASS;
 	case XDP_TX:
 		xdp_ring = rx_ring->vsi->xdp_rings[smp_processor_id()];
-		result = ice_xmit_xdp_buff(xdp, xdp_ring);
+		result = ice_xmit_xdp_ring(xdp->data, xdp->data_end - xdp->data, xdp_ring);
 		if (result == ICE_XDP_CONSUMED)
 			goto out_failure;
 		return result;