xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 3 of 4 v2] libxl: Introduce pci_assignable_add and pci_assignable_remove
Date: Mon, 14 May 2012 11:06:00 +0100	[thread overview]
Message-ID: <4FB0D908.9070201@eu.citrix.com> (raw)
In-Reply-To: <1336987293.31817.41.camel@zakaz.uk.xensource.com>

On 14/05/12 10:21, Ian Campbell wrote:
>> +
>> +    if (f == NULL) {
>> +        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Couldn't open %s",
>> +                         SYSFS_PCIBACK_DRIVER"/slots");
>> +        return ERROR_FAIL;
>> +    }
>> +
>> +    while(fscanf(f, "%x:%x:%x.%x\n",&dom,&bus,&dev,&func)==3) {
> Shouldn't this 3 be 4 now that you include dom?
Ah, of course -- this is handling a case that doesn't happen normally 
when you use the commands (i.e., having a slot in pciback but not being 
bound), so it didn't get tested.  I'll make sure to check that.
> Also ISTR some change to the precise formatting using by the kernel for
> BDFs recently (A . became a : or vice versa?). CCing Konrad for input in
> case it impacts this too.
That would be pretty unfortunate; but it seems like it would also be 
pretty unlikely, as it would break an awful lot of user-mode programs, 
yes?  Linus seems to have a zero-tolerance policy towards that kind of 
thing.

I'll fix this up, re-test, and wait for Konrad's comment before re-sending.

  -George

  reply	other threads:[~2012-05-14 10:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 13:31 [PATCH 0 of 4 v2] Add commands to automatically prep devices for pass-through George Dunlap
2012-05-11 13:31 ` [PATCH 1 of 4 v2] libxl: Make a helper function write a BDF to a sysfs path George Dunlap
2012-05-11 13:31 ` [PATCH 2 of 4 v2] libxl: Rename pci_list_assignable to pci_assignable_list George Dunlap
2012-05-11 13:31 ` [PATCH 3 of 4 v2] libxl: Introduce pci_assignable_add and pci_assignable_remove George Dunlap
2012-05-14  9:21   ` Ian Campbell
2012-05-14 10:06     ` George Dunlap [this message]
2012-05-21 14:13     ` Konrad Rzeszutek Wilk
2012-05-22  8:15       ` Ian Campbell
2012-05-11 13:31 ` [PATCH 4 of 4 v2] xl: Add pci_assignable_add and remove commands George Dunlap
2012-05-14  9:24   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB0D908.9070201@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).