Re: [PATCH net-next v8 04/17] net: prepare for non devmem TCP memory providers

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

 



On Tue, 10 Dec 2024 03:53:36 +0000 Pavel Begunkov wrote:
> >> @@ -353,16 +356,16 @@ void page_pool_unlist(struct page_pool *pool)
> >>   int page_pool_check_memory_provider(struct net_device *dev,
> >>   				    struct netdev_rx_queue *rxq)
> >>   {
> >> -	struct net_devmem_dmabuf_binding *binding = rxq->mp_params.mp_priv;
> >> +	void *mp_priv = rxq->mp_params.mp_priv;
> >>   	struct page_pool *pool;
> >>   	struct hlist_node *n;
> >>   
> >> -	if (!binding)
> >> +	if (!mp_priv)
> >>   		return 0;
> >>   
> >>   	mutex_lock(&page_pools_lock);
> >>   	hlist_for_each_entry_safe(pool, n, &dev->page_pools, user.list) {
> >> -		if (pool->mp_priv != binding)
> >> +		if (pool->mp_priv != mp_priv)
> >>   			continue;
> >>   
> >>   		if (pool->slow.queue_idx == get_netdev_rx_queue_index(rxq)) {  
> > 
> > appears to be unrelated  
> 
> The entire chunk? It removes the type, nobody should be blindly casting
> it to devmem specific binding even if it's not referenced, otherwise it
> gets pretty ugly pretty fast. E.g. people might assume that it's always
> the right type to cast to.

Change is good. It didn't feel very related to the other changes
which specifically address devmem code. While this one only removes 
the type because the code itself isn't devmem specific. Right?

if you make this chunk a separate patch #1 in the series I can apply it
right away. pp->mp_priv is void *, this is a good cleanup regardless.




[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