DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Akhil Goyal <akhil.goyal@nxp.com>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v1] baseband/fpga_5gnr_fec: add companion PF config App
Date: Thu, 16 Jul 2020 19:59:18 +0000
Message-ID: <BY5PR11MB4451D0727F455EBA7C7EDBECF87F0@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8z89Qh61tKG1Lgg8OHrY9hp5sbs-SHggnrJ_4o4o61Ceg@mail.gmail.com>

> From: David Marchand <david.marchand@redhat.com>
> On Sat, Jul 11, 2020 at 12:28 AM Nicolas Chautru <nicolas.chautru@intel.com>
> wrote:
> 
> [snip]
> 
> > +#define SYS_DIR "/sys/bus/pci/devices"
> > +#define CUR_DIR "."
> > +#define PREV_DIR ".."
> > +
> > +#define DRIVER_LINK  "driver"
> > +#define DEVICE_FILE  "device"
> > +#define VENDOR_FILE  "vendor"
> > +#define BAR0_FILE    "resource0"
> > +#define MAX_VFS_FILE "max_vfs"
> > +
> > +#define PCI_STR_SIZE 15
> > +#define DEV_STR_SIZE 10
> > +#define NULL_PAD     2
> > +
> > +/* Function Pointer for device specific configuration file */ typedef
> > +int (*configuration)(void *bar0addr, const char *arg_cfg_filename);
> > +
> > +typedef struct hw_device {
> > +       const char *device_name;
> > +       char *config_file;
> > +       int vendor_id;
> > +       int device_id;
> > +       char pci_address[PCI_STR_SIZE];
> > +       bool driver_found;
> > +       configuration conf;
> > +       char *num_vfs;
> > +       int config_all;
> > +} hw_device;
> > +
> > +static int
> > +enable_vfs(const char *pci_addr, char *num_vfs) {
> > +       char maxvfspath[PATH_MAX];
> > +       char fs_num_vfs[4] = {0, 0, 0, 0};
> > +       int maxvfsfd;
> > +
> > +       snprintf(maxvfspath, sizeof(maxvfspath),
> > +                       "%s/%s/%s", SYS_DIR, pci_addr, MAX_VFS_FILE);
> > +       maxvfsfd = open(maxvfspath, O_RDWR | O_SYNC);
> 
> You should stop relying on igb_uio (reminder: it is going to move out of the
> dpdk tree in 20.11) and use vfio vf token that got merged in 20.08.
> 

Thanks David. 
We will keep the VF creation externally so that to any avoid such dependency on which kernel variant ends up being used. 
The VF creation was kept here as an option for ease of use but not really required as non device specific. 
The main feature is purely configuration from MMIO write. 



      reply	other threads:[~2020-07-16 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 22:26 [dpdk-dev] [PATCH v1] BBDEV FPGA PF Config app Nicolas Chautru
2020-07-10 22:26 ` [dpdk-dev] [PATCH v1] baseband/fpga_5gnr_fec: add companion PF config App Nicolas Chautru
2020-07-16  8:56   ` Akhil Goyal
2020-07-16 18:14     ` Chautru, Nicolas
2020-07-16  9:40   ` David Marchand
2020-07-16 19:59     ` Chautru, Nicolas [this message]

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=BY5PR11MB4451D0727F455EBA7C7EDBECF87F0@BY5PR11MB4451.namprd11.prod.outlook.com \
    --to=nicolas.chautru@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git