Subject: Re: [Intel-wired-lan] [PATCH net] igc: Fix passing 0 to ERR_PTR in igc_xdp_run_prog()

From: Kurt Kanzenbach <[email-masked]>
Date: Fri, 18 Oct 2024 08:37:10 +0200

On Thu Oct 17 2024, Jacob Keller wrote:
> On 10/17/2024 4:03 AM, Maciej Fijalkowski wrote:
>> On Thu, Oct 17, 2024 at 11:55:05AM +0800, Yue Haibing wrote:
>>> On 2024/10/17 7:12, Jacob Keller wrote:
>>>> On 10/16/2024 4:06 PM, Jacob Keller wrote:
>>>>> I don't like this fix, I think we could drop the igc_xdp_run_prog
>>>>> wrapper, call __igc_xdp_run_prog directly and check its return value
>>>>> instead of this method of using an error pointer.
>>>>
>>>> Indeed, this SKB error stuff was added by 26575105d6ed ("igc: Add
>>>> initial XDP support") which claims to be aligning with other Intel drivers.
>>>>
>>>
>>> Thanks for review，maybe can fix this as commit 12738ac4754e ("i40e: Fix sparse errors in i40e_txrx.c")?
>> 
>> Yes please get rid of this logic. Historically speaking, i40e started this
>> and other drivers followed, but I chose in ice implementation to avoid
>> that :)
>
> Thanks!
>
>> 
>> Kurt, if you'll be sending next revision for igb xsk support, then avoid
>> the logic we talk about here as well, please.
>> 
> Yes, please fix this the way i40e did in the mentioned commit above.
> That looks significantly better to me :)

Changed the return type of igb_run_xdp_zc() from skb* to int.

Thanks,
Kurt