RE: [EXTERNAL] [PATCH 3/9] qed: avoid truncating work queue length

From: Subbaraya Sundeep Bhatta
Date: Wed Mar 27 2024 - 13:08:51 EST


Hi,

>-----Original Message-----
>From: Arnd Bergmann <arnd@xxxxxxxx>
>Sent: Wednesday, March 27, 2024 9:05 PM
>To: Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx>; Arnd Bergmann
><arnd@xxxxxxxxxx>; llvm@xxxxxxxxxxxxxxx; Ariel Elior <aelior@xxxxxxxxxxx>;
>Manish Chopra <manishc@xxxxxxxxxxx>
>Cc: David S . Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet
><edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni
><pabeni@xxxxxxxxxx>; Nathan Chancellor <nathan@xxxxxxxxxx>; Nick
>Desaulniers <ndesaulniers@xxxxxxxxxx>; Bill Wendling <morbo@xxxxxxxxxx>;
>Justin Stitt <justinstitt@xxxxxxxxxx>; Simon Horman <horms@xxxxxxxxxx>;
>Konstantin Khorenko <khorenko@xxxxxxxxxxxxx>; Sudarsana Reddy Kalluru
><sudarsana.kalluru@xxxxxxxxxx>; Netdev <netdev@xxxxxxxxxxxxxxx>; linux-
>kernel@xxxxxxxxxxxxxxx
>Subject: Re: [EXTERNAL] [PATCH 3/9] qed: avoid truncating work queue length
>
>On Wed, Mar 27, 2024, at 15:04, Subbaraya Sundeep Bhatta wrote:
>
>>>- snprintf(name, NAME_SIZE, "slowpath-%02x:%02x.%02x",
>>>- cdev->pdev->bus->number,
>>>- PCI_SLOT(cdev->pdev->devfn), hwfn->abs_pf_id);
>>>+ hwfn->slowpath_wq = alloc_workqueue("slowpath-
>>>%02x:%02x.%02x",
>>>+ 0, 0, cdev->pdev->bus->number,
>>>+ PCI_SLOT(cdev->pdev->devfn),
>>>+ hwfn->abs_pf_id);
>>
>> Confused. This should be alloc_workqueue("slowpath-%02x:%02x.%02x",
>> cdev->pdev->bus->number, PCI_SLOT(cdev->pdev->devfn), hwfn->abs_pf_id,
>> 0, 0);
>> Right?
>
>I still think my version is the right one here, see the
>prototype:
>
>__printf(1, 4) struct workqueue_struct *
>alloc_workqueue(const char *fmt, unsigned int flags, int max_active, ...);
>
>so the first argument in the format, while the printf arguments
>start after the flags and max_active arguments that are still both
>set to zero.
>
My bad. Got it

Thanks,
Sundeep

> Arnd