RE: [PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

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

 



>> diff --git a/net/core/xdp.c b/net/core/xdp.c
>> index 05354976c1fc..4eaa28972af2 100644
>> --- a/net/core/xdp.c
>> +++ b/net/core/xdp.c
>> @@ -350,7 +350,8 @@ static void __xdp_return(void *data, struct
>xdp_mem_info *mem, bool napi_direct,
>>  		/* mem->id is valid, checked in
>xdp_rxq_info_reg_mem_model() */
>>  		xa = rhashtable_lookup(mem_id_ht, &mem->id,
>mem_id_rht_params);
>>  		page = virt_to_head_page(data);
>> -		napi_direct &= !xdp_return_frame_no_direct();
>> +		if (napi_direct)
>> +			napi_direct &= !xdp_return_frame_no_direct();
>
>if (napi_direct && xdp_return_frame_no_direct())
>	napi_direct = false;
>
>I wonder if this code would be easier to understand?
>
Ya, I think this is more readable. Thanks.   
I will send v2. 




[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