Re: [PATCH net-next 08/12] net: hns3: introduce ring_to_netdev() in enet module

From: Jakub Kicinski
Date: Wed Oct 16 2019 - 13:10:30 EST


On Wed, 16 Oct 2019 15:17:07 +0800, Huazhong Tan wrote:
> From: Yunsheng Lin <linyunsheng@xxxxxxxxxx>
>
> There are a few places that need to access the netdev of a ring
> through ring->tqp->handle->kinfo.netdev, and ring->tqp is a struct
> which both in enet and hclge modules, it is better to use the
> struct that is only used in enet module.
>
> This patch adds the ring_to_netdev() to access the netdev of ring
> through ring->tqp_vector->napi.dev.
>
> Also, struct hns3_enet_ring is a frequently used in critical data
> path, so make it cacheline aligned as struct hns3_enet_tqp_vector.

That part seems logically separate, should it be a separate patch?

> Signed-off-by: Yunsheng Lin <linyunsheng@xxxxxxxxxx>
> Signed-off-by: Huazhong Tan <tanhuazhong@xxxxxxxxxx>