Re: [PATCH] PCI: endpoint: pci-epf-test: Allow overriding default BAR sizes

Koichiro Den
2026-01-28T05:21:30Z

On Tue, Jan 27, 2026 at 10:47:52AM +0100, Niklas Cassel wrote:
> On Tue, Jan 27, 2026 at 12:44:13PM +0900, Koichiro Den wrote:
> > On Fri, Jan 23, 2026 at 07:07:48PM +0100, Niklas Cassel wrote:
> > > Add bar{0,1,2,3,4,5}_size attributes in configfs, so that the user is not
> > > restricted to run pci-epf-test with the hardcoded BAR size values defined
> > > in pci-epf-test.c.
> > >
> > > This code is shamelessly more or less copy pasted from pci-epf-vntb.c
> > >
> > > Signed-off-by: Niklas Cassel <cassel@kernel.org>
> >
> > This is useful, thanks!
> > I've used this patch as a dependency for my series [1], and it works fine.
> >
> > Tested-by: Koichiro Den <den@valinux.co.jp>
> >
> > [1] https://lore.kernel.org/linux-pci/20260124145012.2794108-1-den@valinux.co.jp/
>
>
> Thank you for testing!
>
> Just to clarify:
> Your series is currently not depending on this patch, and neither do I think
> that it should.
>
> There will be a trivial conflict when PCI maintainers will try to merge them.
>
> But the solution is to use your new values:
>
> -static size_t bar_size[] = { 512, 512, 1024, 16384, 131072, 1048576 };
> +static size_t bar_size[] = { 131072, 131072, 131072, 131072, 131072, 1048576 };
>
>
> With my new variable name (default_bar_size):
>
> -static size_t bar_size[] = { 512, 512, 1024, 16384, 131072, 1048576 };
> +/* default BAR sizes, can be overridden by the user using configfs */
> +static size_t default_bar_size[] = { 512, 512, 1024, 16384, 131072, 1048576 };
>
>
> So AFAICT, it should a one line conflict resolution.
>
> Since it is so trivial, it would be nice if the PCI maintainers could
> handle that when applying, but I guess in worst case, one of us will
> need to respin.

Yes, agreed, it's a trivial one-line conflict.

As for my series [1] v10, patches [6/8]-[8/8] (new test code) haven't
received any review feedback yet, so I suspect there's a good chance I'll
need to respin anyway. If I do a v11, I'll also resolve this conflict as
appropriate at that point. Even if it turns out no respin is needed for the
test code, I'll post v11 if the maitainers asks for resolving the conflict.

Kind regards,
Koichiro

>
>
> Kind regards,
> Niklas