Re: [PATCH v8 4/6] docs: Add Documentation for Mediated devices

Jike Song
2016-10-14T02:22:02Z

On 10/11/2016 04:28 AM, Kirti Wankhede wrote:
> +
> +Under per-physical device sysfs:
> +--------------------------------
> +
> +* mdev_supported_types:
> + List of current supported mediated device types and its details are added
> +in this directory in following format:
> +
> +|- <parent phy device>
> +|--- Vendor-specific-attributes [optional]
> +|--- mdev_supported_types
> +| |--- <type id>
> +| | |--- create
> +| | |--- name
> +| | |--- available_instances
> +| | |--- description /class
> +| | |--- [devices]
> +| |--- <type id>
> +| | |--- create
> +| | |--- name
> +| | |--- available_instances
> +| | |--- description /class
> +| | |--- [devices]
> +| |--- <type id>
> +| |--- create
> +| |--- name
> +| |--- available_instances
> +| |--- description /class
> +| |--- [devices]
> +
> +[TBD : description or class is yet to be decided. This will change.]
> +
> +Under per mdev device:
> +----------------------
> +
> +|- <parent phy device>
> +|--- $MDEV_UUID
> + |--- remove
> + |--- {link to its type}
> + |--- vendor-specific-attributes [optional]
> +

All mdev directories are placed under physical device directly.

Looking at the sysfs directory of physical device, you get:

<parent phy device>
|--- mdev_supported_types/
| |--- type1/
| |--- type2/
| |--- type3/
|--- mdev1/
|--- mdev2/

With an independent device between physical and mdev, and names
simplified, you will get:

<parent phy device>
|--- mdev/
| |--- supported_type1/
| |--- supported_type2/
| |--- supported_type3/
| |--- mdev1/
| |--- mdev2/

i.e. everything related to mdev are placed under one single directory -
the same as SR-IOV. I'm not sure if it is possible without
introducing an independent device (which you apparently dislike), but
placing so many mdev directories under physical doesn't seems clean.

--
Thanks,
Jike