RE: [v1,net-next 3/3] net:enetc: enetc qos using the CBDR dma alloc function

From: Po Liu
Date: Wed Feb 09 2022 - 07:20:35 EST



> -----Original Message-----
> From: Po Liu <po.liu@xxxxxxx>
> Sent: 2022年2月9日 13:49
> To: davem@xxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; tim.gardner@xxxxxxxxxxxxx; kuba@xxxxxxxxxx;
> Claudiu Manoil <claudiu.manoil@xxxxxxx>; Vladimir Oltean
> <vladimir.oltean@xxxxxxx>
> Cc: Xiaoliang Yang <xiaoliang.yang_1@xxxxxxx>; Po Liu <po.liu@xxxxxxx>
> Subject: [v1,net-next 3/3] net:enetc: enetc qos using the CBDR dma alloc
> function
>
> Now we can use the enetc_cbd_alloc_data_mem() to replace complicated
> DMA data alloc method and CBDR memory basic seting.
>
> Signed-off-by: Po Liu <po.liu@xxxxxxx>
> ---
> .../net/ethernet/freescale/enetc/enetc_qos.c | 91 +++++--------------
> 1 file changed, 21 insertions(+), 70 deletions(-)
>
>
> memset(si_data, 0, data_size);
>
> - cbd.length = cpu_to_le16(data_size);
> -
> - cbd.addr[0] = cpu_to_le32(lower_32_bits(dma_align));
> - cbd.addr[1] = cpu_to_le32(upper_32_bits(dma_align));
> -

Sorry, found there is hardware setting bug here. Will update soon for v2.

> /* VIDM default to be 1.
> * VID Match. If set (b1) then the VID must match, otherwise
> * any VID is considered a match. VIDM setting is only used @@ -562,8
> +537,7 @@ static int enetc_streamid_hw_set(struct enetc_ndev_priv *priv,