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

Re: [Xen-devel] printf formatter for pci_sbdf_t


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 19 Jul 2019 08:19:17 +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=FBaveRQPwcNTfttfwxaNOvocKHbzOzNvlTPED4tXMnM=; b=XtnuQf+9VXAeu+dAbWw3Ru8mac8s9kJJn6S9AcOnRAArOi9UvCHLfUhOrR5YG+E9L/WyoN5AcqwipRDL0u6e1abMn+q9xc5Bv7ib9CtktmBmca9zzqLnDNIPWt6N11a6sWxI8+Ws0+MdBXH2/onBnyMQe9+TQs7PFuojPCp/jYgW//6mObj/w1Kw/JnEZvAhs37101VTRs8CWJtQyc+Yf5z+IO19Z2xYGJYz3wVrCNaSkjLRClFKfXANU25waqMdmqDKbXUcv2HCb0EkPUwB/B15pkm1kid7NkeqXUQ7qSXrQrwVegUW64pN1vQWSKwxKic07g+YFzHw1cqXkPmcZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ElyR94bxoOJc80r/5AUNrBdQCYdTSi1EZS8/D+jF4av2jWFP8LIi+QkP8GnfG8m4v22FlY3gK5SNBnP7dbcklYRklZfnOSI1Osr/omXegnrkja/rU57NDeS2cA/TxjF6urjrxZ8Lc/2mxyjJHo7O8GRQ5UcNx5cOe5QCWRzge4N2q1+tJD9ZTS9lgVFQmxNsvzN00TtfYjY0zFAbHOPjwRVGgUuIDJVzpMrNMl/WKAeyYDkT5K4gbPMvjMCVgZzdl/kxszgZ01Gn4FPhdkbiOj1qSy0wneIRqQcyhIEeK5TulbQl8MZCyFz1sXWVikynfvaA1kvuKwJSvnezSYSIrw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Jul 2019 08:21:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVPKkbqe/gqkIsCkyMLC3anRUky6bPCrxPgAKRP4A=
  • Thread-topic: printf formatter for pci_sbdf_t

On 17.07.2019 19:06, Andrew Cooper wrote:
> On 17/07/2019 15:08, Roger Pau Monné wrote:
>> Hello,
>>
>> 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.

There's actually one more argument against %p: Previously you
did express a desire for our %p extensions to stay somewhat in
sync with Linux'es. Linux is using quite a few of the available
characters already, so there's an increasing risk of conflicts.
Using %o here would risk a future conflict only if Linux
eventually decided to also overload %o.

And one more remark: If we were to introduce a more generic
"device identifier" extension, then I'd obviously be fine with
using %p. After all we'd then want to pass in struct device *.
I'm actually surprised Linux doesn't already have such a generic
formatter.

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®.