RE: [Intel-wired-lan] [PATCH v2 intel-net 2/6] ice: xsk: allocate separate memory for XDP SW ring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of
> Maciej Fijalkowski
> Sent: Monday, December 13, 2021 9:01 PM
> To: intel-wired-lan@xxxxxxxxxxxxxxxx
> Cc: Mathew, Elza <elza.mathew@xxxxxxxxx>; netdev@xxxxxxxxxxxxxxx;
> kuba@xxxxxxxxxx; bpf@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; Karlsson,
> Magnus <magnus.karlsson@xxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH v2 intel-net 2/6] ice: xsk: allocate separate
> memory for XDP SW ring
> 
> Currently, the zero-copy data path is reusing the memory region that was
> initially allocated for an array of struct ice_rx_buf for its own purposes. This
> is error prone as it is based on the ice_rx_buf struct always being the same
> size or bigger than what the zero-copy path needs.
> There can also be old values present in that array giving rise to errors when
> the zero-copy path uses it.
> 
> Fix this by freeing the ice_rx_buf region and allocating a new array for the
> zero-copy path that has the right length and is initialized to zero.
> 
> Fixes: 57f7f8b6bc0b ("ice: Use xdp_buf instead of rx_buf for xsk zero-copy")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
> ---
>  drivers/net/ethernet/intel/ice/ice_base.c | 17 ++++++++++++
> drivers/net/ethernet/intel/ice/ice_txrx.c | 19 ++++++++-----
> drivers/net/ethernet/intel/ice/ice_xsk.c  | 33 ++++++++++++-----------
>  3 files changed, 47 insertions(+), 22 deletions(-)
> 

Tested-by: Kiran Bhandare <kiranx.bhandare@xxxxxxxxx>  A Contingent Worker at Intel




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux