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

Re: [Xen-devel] printf formatter for pci_sbdf_t


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Thu, 18 Jul 2019 15:32:25 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tBFHHSk+1TifIUFee/ggKbdmC8cf9RwiCDgReOjMRws=; b=QkJfXplX6lLAVL71MZonchJ4va8HyFrirFnLhcBze5cn6S5x06HFl4p1N9Jm9NkLwy2aBEs5dG8htPbiG9p4AIlGkOUHTTD8jNzz6c6gYz4ZcsJa3U068T/klMYm7sz76/EuAG+BnFjXzZcpPS+0IZ0dc5Szbcr5TGGYusL7RO4PCi6YH6wdosp8wXgY9gJtlaedOzuPP+5pfv3Sc1FAM6eged6T0eoXewOiEili5NQwlEb3eF1uAVG9x2jkHA2LGlvluwCJeebVacINJHvZMTj4WqS4rYJ61AwfEW+GljbFX/5BG8aNOXtONkLQKLOnQvyrxWTPerHOyAxUZlX6Cg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HnrGvRHMnV5gORsGBoAXbzi5Dl18QrSqwnvq07K7e6OFOCJ5hB0avqhC/Rlq4qIWx+Nre0Ovp0QTleLmZgRqWOZ5lYP6+GVfKxtxmNn1EWqkoRTUOSJ4/Znx/Bh6Rbfew3HSEUpP3GQqrhb9Ic2czoXYl30lcFxxBaUpI0dQ8r7JTdr2tNrUxx6MzWD9bKYIO7ld0PHrnbEcFqBRNRiUY2toRSC3bCW2peJTnwgTNLdlv6v/592UgKKuzYrL3u2YUa3CVHNPIxjARb4qXHOfKO6a9L4ezRkiB0XXKoJtVLr1Kril2Hnx2//e/YP6KbaKaXNpfKj2eVv+l0w1j4HjOQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, GeorgeDunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 18 Jul 2019 15:33:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVPKkbqe/gqkIsCkyMLC3anRUky6bPCrxPgAE6U4CAADjtToAABKyA
  • Thread-topic: printf formatter for pci_sbdf_t

On 18.07.2019 17:14, Roger Pau Monné  wrote:
> On Thu, Jul 18, 2019 at 11:51:57AM +0000, Jan Beulich wrote:
>> On 17.07.2019 19:06, Andrew Cooper wrote:
>>> On 17/07/2019 15:08, Roger Pau Monné wrote:
>>>> As part of some PCI related cleanup I'm doing, which includes
>>>> expanding the usage of pci_sbdf_t, I'm also planning to add a custom
>>>> printf formatter for pci_sbdf_t [0], so that a SBDF can be printed
>>>> without having to specify four formatters (and pass four parameters)
>>>> each time (%04x:%02x:%02x.%u).
>>>>
>>>> There's been some debate on the previous version about whether the
>>>> formatter should be %pp or %op, and I would like to settle on one of
>>>> them before sending a new version:
>>>
>>> I am firmly opposed to overloading %o.
>>
>> And I am firmly of the opinion that using %o for SBDF is the more
>> natural thing to do.
>>
>>> Nothing about PCI coordinates has anything to do with octal
>>> representation; its mostly hex.
>>
>> The domain and vCPU IDs aren#t pointer-ish either, for example.
> 
> But we do pass the vcpu and the domain struct pointer to those
> modifiers? ie: we don't pass a vcpu or a domain ID directly in either
> case.

Right. My point was: The actual format specifier used ('p' or 'o')
doesn't necessarily have anything to do with the resulting output.

> AFAICT both you an Andrew agree that a custom printf formatter for PCI
> SBDF is a desirable thing to have, the only disagreement is on the
> actual implementation detail (whether %pp or %op should be used). In
> which case I think I would like to call for THE REST to also voice in
> their opinion on the matter in order to try to resolve the situation
> so that I can make progress on the series, sorry if this is awkward.

That's perfectly fine with me. If a majority agrees with Andrew,
so be it.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.