diff mbox series

[RESEND,v4,4/6] Documentation: misc-devices: Add Documentation for dw-xdata-pcie driver

Message ID 2cc3a3a324d299a096f1d3e682b2039d3537b013.1612390291.git.gustavo.pimentel@synopsys.com (mailing list archive)
State Superseded
Headers show
Series misc: Add Add Synopsys DesignWare xData IP driver | expand

Commit Message

Gustavo Pimentel Feb. 3, 2021, 10:12 p.m. UTC
Add Documentation for dw-xdata-pcie driver.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
 Documentation/misc-devices/dw-xdata-pcie.rst | 40 ++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/misc-devices/dw-xdata-pcie.rst

Comments

Krzysztof Wilczyński Feb. 6, 2021, 11:31 p.m. UTC | #1
Hi Gustavo,

[...]
> +The interaction with this driver is done through the module parameter and
> +can be changed in runtime. The driver outputs the requested command state
> +information to /var/log/kern.log or dmesg.

The driver does not seem to offer any parameters (aside of using sysfs
for runtime settings), and it also seem to only print what it's doing
when debug level is enabled - unless I am missing something?

[...]
> +Request to stop any current TLP transfer:
> +- Command:
> +	echo 1 > /sys/kernel/dw-xdata-pcie/stop
[...]

When I do the following:

  # echo 1 > /sys/kernel/dw-xdata-pcie/write
  # echo 1 > /sys/kernel/dw-xdata-pcie/stop
  # cat /sys/kernel/dw-xdata-pcie/write

Would output from cat above simply show "0 MB/s" then?  I wonder how
someone using this new driver could tell whether "write" or "read"
traffic generation has been enabled aside of reading the sysfs files,
would adding "/sys/kernel/dw-xdata-pcie/active" be an overkill here?

What do you think?

Krzysztof
Gustavo Pimentel Feb. 8, 2021, 9:24 a.m. UTC | #2
Hi Krzysztof,

On Sat, Feb 6, 2021 at 23:31:14, Krzysztof Wilczyński <kw@linux.com> 
wrote:

> Hi Gustavo,
> 
> [...]
> > +The interaction with this driver is done through the module parameter and
> > +can be changed in runtime. The driver outputs the requested command state
> > +information to /var/log/kern.log or dmesg.
> 
> The driver does not seem to offer any parameters (aside of using sysfs
> for runtime settings), and it also seem to only print what it's doing
> when debug level is enabled - unless I am missing something?
> 
> [...]
> > +Request to stop any current TLP transfer:
> > +- Command:
> > +	echo 1 > /sys/kernel/dw-xdata-pcie/stop
> [...]
> 
> When I do the following:
> 
>   # echo 1 > /sys/kernel/dw-xdata-pcie/write
>   # echo 1 > /sys/kernel/dw-xdata-pcie/stop
>   # cat /sys/kernel/dw-xdata-pcie/write
> 
> Would output from cat above simply show "0 MB/s" then?  I wonder how
> someone using this new driver could tell whether "write" or "read"
> traffic generation has been enabled aside of reading the sysfs files,
> would adding "/sys/kernel/dw-xdata-pcie/active" be an overkill here?
> 
> What do you think?

Yes, it would display 0 MB/s. This driver is to be used mainly by the 
Synopsys DesignWare HW prototyping team. I don't think the general public 
will be interested or can use this driver, because requires a special HW 
block available only for this prototype.

I tried to reduce to the minimal the interfaces, to avoid possible 
confusion. For instance, even the /sys/kernel/dw-xdata-pcie/stop 
interface could be avoided, because on the driver unloading or changing 
the between write or read it calls the stop procedure.

Due to the nature of the HW block, it only can allow the write or the 
read at some given moment, therefore based on the last command enable 
write or read, we know which mode is this driving working.
This driver will be used by the testing team on their automation scripts, 
thus they will know exactly the sequence input.

Anyway, thanks for your feedback.

> 
> Krzysztof
Krzysztof Wilczyński Feb. 8, 2021, 11:11 p.m. UTC | #3
Hi Gustavo,

[...]
> > When I do the following:
> > 
> >   # echo 1 > /sys/kernel/dw-xdata-pcie/write
> >   # echo 1 > /sys/kernel/dw-xdata-pcie/stop
> >   # cat /sys/kernel/dw-xdata-pcie/write
> > 
> > Would output from cat above simply show "0 MB/s" then?  I wonder how
> > someone using this new driver could tell whether "write" or "read"
> > traffic generation has been enabled aside of reading the sysfs files,
> > would adding "/sys/kernel/dw-xdata-pcie/active" be an overkill here?
> > 
> > What do you think?
> 
> Yes, it would display 0 MB/s. This driver is to be used mainly by the 
> Synopsys DesignWare HW prototyping team. I don't think the general public 
> will be interested or can use this driver, because requires a special HW 
> block available only for this prototype.

Got it.

> I tried to reduce to the minimal the interfaces, to avoid possible 
> confusion. For instance, even the /sys/kernel/dw-xdata-pcie/stop 
> interface could be avoided, because on the driver unloading or changing 
> the between write or read it calls the stop procedure.

Oh, OK.
 
> Due to the nature of the HW block, it only can allow the write or the 
> read at some given moment, therefore based on the last command enable 
> write or read, we know which mode is this driving working.
> This driver will be used by the testing team on their automation scripts, 
> thus they will know exactly the sequence input.
> 
> Anyway, thanks for your feedback.

Thank you for taking the time to add more details for me.  Much
appreciated.

Krzysztof
diff mbox series

Patch

diff --git a/Documentation/misc-devices/dw-xdata-pcie.rst b/Documentation/misc-devices/dw-xdata-pcie.rst
new file mode 100644
index 00000000..3af9fad
--- /dev/null
+++ b/Documentation/misc-devices/dw-xdata-pcie.rst
@@ -0,0 +1,40 @@ 
+.. SPDX-License-Identifier: GPL-2.0
+
+===========================================================================
+Driver for Synopsys DesignWare PCIe traffic generator (also known as xData)
+===========================================================================
+
+This driver should be used as a host-side (Root Complex) driver and Synopsys
+DesignWare prototype that includes this IP.
+
+The "dw-xdata-pcie" driver can be used to enable/disable PCIe traffic
+generator in either direction (mutual exclusion) besides allowing the
+PCIe link performance analysis.
+
+The interaction with this driver is done through the module parameter and
+can be changed in runtime. The driver outputs the requested command state
+information to /var/log/kern.log or dmesg.
+
+Request write TLPs traffic generation - Root Complex to Endpoint direction
+- Command:
+	echo 1 > /sys/kernel/dw-xdata-pcie/write
+
+Get write TLPs traffic link throughput
+- Command:
+        cat /sys/kernel/dw-xdata-pcie/write
+- Output example:
+	204 MB/s
+
+Request read TLPs traffic generation - Endpoint to Root Complex direction:
+- Command:
+	echo 1 > /sys/kernel/dw-xdata-pcie/read
+
+Get read TLPs traffic link throughput
+- Command:
+        cat /sys/kernel/dw-xdata-pcie/read
+- Output example:
+	199 MB/s
+
+Request to stop any current TLP transfer:
+- Command:
+	echo 1 > /sys/kernel/dw-xdata-pcie/stop