dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Fred Pedrisa <fredhps10-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: RES:  RES:  hw.nic_uio.bdfs
Date: Thu, 17 Apr 2014 16:05:46 +0200	[thread overview]
Message-ID: <3597800.xQpD0niGsC@xps13> (raw)
In-Reply-To: <COL131-DS1742442E12162ABBC8639FB0640-MsuGFMq8XAE@public.gmane.org>

Hi Fred,

2014-03-26 04:22, Fred Pedrisa:
> Here is my fix for probe code :
> 
> static int
> nic_uio_probe (device_t dev)
> {
>         int i, len;
>         char *remaining;
>         long bus = 0, device = 0, function = 0;
>         remaining = bdf_str;
>         len = strlen(remaining);
> 
>         for (i = 0; remaining && len >= 5 && i < len;i+=6) {
>                 if ( remaining[i + 1] == ':' && remaining[i + 3] == ':' ) {
>                         bus = strtol(&remaining[i + 0],NULL,0);
>                         device = strtol(&remaining[i + 2],NULL,0);
>                         function = strtol(&remaining[i + 4],NULL,0);
>                         if (dev != NULL) {
>                                 if (pci_get_bus(dev) == bus &&
> pci_get_slot(dev) == device && pci_get_function(dev) == function) {
>                                         printf("nic_uio: success blocking
> probe of : %ld:%ld:%ld!\n", bus, device, function);
>                                         return (ENXIO);
>                                 }
>                         }
>                 }
>         }
> 
>         for (i = 0; i < NUM_DEVICES; i++)
>                 if (pci_get_vendor(dev) == devices[i].vend &&
>                         pci_get_device(dev) == devices[i].dev) {
> 
>                         device_set_desc(dev, "Intel(R) DPDK PCI Device");
>                         return (BUS_PROBE_SPECIFIC);
>                 }
> 
>         return (ENXIO);
> }
> 
> Now it is working as intended ;)

If you think a patch should be applied, please send it with git-send-email as 
described in http://dpdk.org/dev#send

Thank you
-- 
Thomas

  parent reply	other threads:[~2014-04-17 14:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26  5:35 hw.nic_uio.bdfs Fred Pedrisa
     [not found] ` <COL131-DS45B88A00BD19770A807E5B0640-MsuGFMq8XAE@public.gmane.org>
2014-03-26  6:15   ` hw.nic_uio.bdfs Masaru Oki
     [not found] ` <013601cf48bb$0e1ed6a0$2a5c83e0$@stratosphere.co.jp>
2014-03-26  6:20   ` RES: hw.nic_uio.bdfs Fred Pedrisa
     [not found]     ` <COL131-DS10C032EEFFC3DF69D14D4FB0640-MsuGFMq8XAE@public.gmane.org>
2014-03-26  6:42       ` hw.nic_uio.bdfs Masaru Oki
     [not found]     ` <014d01cf48be$f02c3990$d084acb0$@stratosphere.co.jp>
2014-03-26  6:49       ` RES: hw.nic_uio.bdfs Fred Pedrisa
     [not found]         ` <COL131-DS688FD7DF0F374C5AFDAD2B0640-MsuGFMq8XAE@public.gmane.org>
2014-03-26  6:52           ` RES: " Fred Pedrisa
2014-03-26  7:07           ` hw.nic_uio.bdfs Masaru Oki
     [not found]         ` <016201cf48c2$59f0ead0$0dd2c070$@stratosphere.co.jp>
2014-03-26  7:16           ` RES: hw.nic_uio.bdfs Fred Pedrisa
     [not found]           ` <016f01cf48c3$99aedc30$cd0c9490$@hotmail.com>
2014-03-26  7:22             ` RES: " Fred Pedrisa
     [not found]               ` <COL131-DS1742442E12162ABBC8639FB0640-MsuGFMq8XAE@public.gmane.org>
2014-04-17 14:05                 ` Thomas Monjalon [this message]
     [not found]             ` <017001cf48c4$4439eaf0$ccadc0d0$@hotmail.com>
2014-03-26  7:51               ` RES: " Fred Pedrisa

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=3597800.xQpD0niGsC@xps13 \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=fredhps10-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org \
    /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).