DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: krytarowski@caviumnetworks.com
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: Allow to overload pci_drv.devinit and pci_drv.devuninit
Date: Wed, 3 Feb 2016 09:47:32 +0100	[thread overview]
Message-ID: <CALwxeUuFRikTY_aqrR1M0SZ9JuzXxP3gmoYHb6tSPPx=YXUrqA@mail.gmail.com> (raw)
In-Reply-To: <1454423239-16382-1-git-send-email-krytarowski@caviumnetworks.com>

Hello,

On Tue, Feb 2, 2016 at 3:27 PM,  <krytarowski@caviumnetworks.com> wrote:
> From: Kamil Rytarowski <Kamil.Rytarowski@caviumnetworks.com>
>
> This change enables drivers needing custom pci (de)initialization functions
> through the standard callback overloading.
>
> For example:
>
>  /*
>   * virtual function driver struct
>   */
>  static struct eth_driver rte_DRIVER_pmd = {
>         {
>                 .name = "rte_DRIVER_pmd",
>                 .id_table = pci_id_DRIVER_map,
>                 .drv_flags = RTE_PCI_DRV_NEED_MAPPING,
>                 .devinit = DRIVER_pci_devinit,
>         },
>         .eth_dev_init = eth_DRIVER_dev_init,
>         .dev_private_size = sizeof(struct DRIVER),
>  };
>
> Use-case is as follows: NIC offers several pci virtual functions, while
> one of them is to be treated as port, we need to configure the rest in a
> specific way for particular device for full interface (port) functionality.

Mmm, why don't you register a custom pci driver rather than a eth_driver ?
And do your custom things in its devinit function ?


-- 
David Marchand

  parent reply	other threads:[~2016-02-03  8:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 14:27 krytarowski
2016-02-02 14:27 ` [dpdk-dev] [PATCH 2/2] ethdev: Export rte_eth_dev_create_unique_device_name() to public API krytarowski
2016-02-11 16:56   ` Panu Matilainen
2016-02-11 17:15     ` David Marchand
2016-02-03  8:47 ` David Marchand [this message]
2016-02-03 11:39   ` [dpdk-dev] [PATCH 1/2] ethdev: Allow to overload pci_drv.devinit and pci_drv.devuninit Kamil Rytarowski
2016-02-03 14:08     ` David Marchand
2016-02-03 15:49       ` Kamil Rytarowski
2016-02-03 15:59         ` Kamil Rytarowski

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='CALwxeUuFRikTY_aqrR1M0SZ9JuzXxP3gmoYHb6tSPPx=YXUrqA@mail.gmail.com' \
    --to=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=krytarowski@caviumnetworks.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).