On Thu, Jun 06, 2019 at 04:22:54AM -0600, Jan Beulich wrote: > >>> On 06.06.19 at 12:13, <roger....@citrix.com> wrote: > > On Thu, Jun 06, 2019 at 04:09:31AM -0600, Jan Beulich wrote: > >> >>> On 06.06.19 at 11:50, <paul.durr...@citrix.com> wrote: > >> >> -----Original Message----- > >> >> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On > >> >> Behalf Of > >> > Roger Pau Monne > >> >> Sent: 06 June 2019 10:02 > >> >> To: xen-devel@lists.xenproject.org > >> >> Cc: Stefano Stabellini <sstabell...@kernel.org>; Wei Liu > >> >> <w...@xen.org>; Konrad > >> > Rzeszutek Wilk > >> >> <konrad.w...@oracle.com>; George Dunlap <george.dun...@citrix.com>; > >> >> Andrew > >> > Cooper > >> >> <andrew.coop...@citrix.com>; Ian Jackson <ian.jack...@citrix.com>; Tim > > (Xen.org) > >> > <t...@xen.org>; Julien > >> >> Grall <julien.gr...@arm.com>; Jan Beulich <jbeul...@suse.com>; Roger > >> >> Pau Monne > >> > <roger....@citrix.com> > >> >> Subject: [Xen-devel] [PATCH v2 01/12] pci: introduce a devfn field to > >> > pci_sbdf_t > >> >> > >> >> This is equivalent to the current extfunc field in term of contents. > >> >> > >> >> Switch the two current users of extfunc to use devfn instead for > >> >> correctness. > >> >> > >> >> No functional change. > >> >> > >> >> Requested-by: Jan Beulich <jbeul...@suse.com> > >> >> Signed-off-by: Roger Pau Monné <roger....@citrix.com> > >> >> --- > >> >> Cc: Andrew Cooper <andrew.coop...@citrix.com> > >> >> Cc: George Dunlap <george.dun...@eu.citrix.com> > >> >> Cc: Ian Jackson <ian.jack...@eu.citrix.com> > >> >> Cc: Jan Beulich <jbeul...@suse.com> > >> >> Cc: Julien Grall <julien.gr...@arm.com> > >> >> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > >> >> Cc: Stefano Stabellini <sstabell...@kernel.org> > >> >> Cc: Tim Deegan <t...@xen.org> > >> >> Cc: Wei Liu <w...@xen.org> > >> >> --- > >> >> Changes since v1: > >> >> - New in this version. > >> >> --- > >> >> NB: Paul suggested to name the function field fn instead of func, so > >> >> that it would match the naming of the devfn field. Sadly the func > >> >> field cannot be aliased to another field using a union because it's a > >> >> bit field, so the only option is to rename func to fn. > >> > > >> > Is that true? Can you not do something like... > >> > > >> > union { > >> > struct { > >> > uint8_t func : 3, > >> > dev : 5; > >> > }; > >> > struct { > >> > uint8_t fn : 3, > >> > pad : 5; > >> > >> And the "pad" field here wouldn't really be necessary. > >> > >> Is there a reason "func" needs to be kept? If so, is there a plan to > >> phase out its use? If so, perhaps fn and dev should be grouped > >> together, and func should become the (temporary) alias? > > > > I think I can prepare a pre-patch to rename func to fn, the users of > > pci_sbdf_t are very limited at this point. If you agree with this I > > will add such a patch at the beginning of the series. > > Well, I'm okay with either, as each has it's up and down sides: > "fn" is more consistent with "devfn", but "func" fits better with > PCI_FUNC() (which is already not really fitting with PCI_DEVFN(), > just like PCI_SLOT() isn't). > > Therefore I wouldn't object to sticking to func, but since Paul > would prefer it to become fn, I'm also okay with that. Of course > just a single, consistently used name for the field as the final > result of the series would be very desirable.
I'm fine with fn also. Then let me prepare v3. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel