Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583611

Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs
Date 2017-02-17 18:20 +0100
Message-ID <tbUml-79M-7@gated-at.bofh.it> (permalink)
References <tbNux-2Ef-5@gated-at.bofh.it> <tbNux-2Ef-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I'm commenting on the configfs layout here instead of the patch with the
code as the issues are easier to explain that way.  I think the layout
is a bit confusing and could be cleaner by making use of pre-created
entries and symlinks.  Here is my suggestion:

/sys/kernel/config/pci_ep/functions/		
    .. test/					# a directory for each function driver
       ... user-specified-name1/
       ... user-specified-name2
    .. nvme/
       ... user-specified-name42/		

Each directory under /sys/kernel/config/pci_ep/functions/ is owned
by a function drivers.  Under that function driver's directory you
can create a directory for each instance of a function driver.  The
configfs layout is controlled by the function driver.  E.g. your current
EPF fields would move into the test function driver, while the nvme
function would expose totally different fields.


/sys/kernel/config/pci_ep/controllers/
	... dwc-0/
	    ... function
	... dwc-1/
	    ... function
	... vhost-0/
	    ... function

	Here you have a directory for each controller that can be bound
	to a function.  The directories are pre-created for each
	controller port that is EP capable.
	Function is a symlink to the function instance above.
	Additional parameters might also be present depending on the
	EPC driver.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs Kishon Vijay Abraham I <kishon@ti.com> - 2017-02-17 11:00 +0100
  Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint  configfs Joao Pinto <Joao.Pinto@synopsys.com> - 2017-02-17 14:10 +0100
  Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint  configfs Christoph Hellwig <hch@infradead.org> - 2017-02-17 18:20 +0100

csiph-web