All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 2/2] doc: pcap: add pcap cmd documentation
@ 2019-06-22 18:53 Ramon Fried
  2019-07-11 21:16 ` Joe Hershberger
  0 siblings, 1 reply; 2+ messages in thread
From: Ramon Fried @ 2019-06-22 18:53 UTC (permalink / raw)
  To: u-boot

Add documentation for new "pcap" command.

Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
---
v2: remove duplicated lines from example
 doc/README.pcap | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 doc/README.pcap

diff --git a/doc/README.pcap b/doc/README.pcap
new file mode 100644
index 0000000000..25c85ae271
--- /dev/null
+++ b/doc/README.pcap
@@ -0,0 +1,61 @@
+PCAP:
+
+U-boot supports live ethernet packet capture in PCAP(2.4) format.
+This is enabled by CONFIG_CMD_PCAP.
+
+The capture is stored on physical memory, and should be copied to
+a machine capabale of parsing and displaying PCAP files (IE. wireshark)
+If networking works properly one can copy the capture file from physical memory
+using tftpput, or save it to local storage with (sf write, mmc write, fatwrite, etc)
+
+the pcap capturing requires maximum buffer size.
+when the buffer is full, packets will silently drop.
+check the status using "pcap status" to see if the buffer is full,
+if so, consider increasing the buffer size.
+
+Usage example:
+
+# pcap init 0x100000 100000
+PCAP capture initialized: addr: 0xffffffff80100000 max length: 100000
+
+# pcap start
+# env set ipaddr 10.0.2.15; env set serverip 10.0.2.2; tftp uImage64
+eth0 at 10000000: PHY present at 0
+eth0 at 10000000: link up, 1000Mbps full-duplex (lpa: 0x7c00)
+Using eth0 at 10000000 device
+TFTP from server 10.0.2.2; our IP address is 10.0.2.15
+Filename 'uImage64'.
+Load address: 0xffffffff88000000
+Loading: #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #################################################################
+         #
+         18.2 MiB/s
+done
+Bytes transferred = 8359376 (7f8dd0 hex)
+PCAP status:
+        Initialized addr: 0xffffffff80100000    max length: 100000
+        Status: Active.  file size: 99991
+        Incoming packets: 66 Outgoing packets: 67
+        !!! Buffer is full, consider increasing buffer size !!!
+
+
+# pcap stop
+# tftpput 0xffffffff80100000 100000 10.0.2.2:capture.pcap
+
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v2 2/2] doc: pcap: add pcap cmd documentation
  2019-06-22 18:53 [U-Boot] [PATCH v2 2/2] doc: pcap: add pcap cmd documentation Ramon Fried
@ 2019-07-11 21:16 ` Joe Hershberger
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Hershberger @ 2019-07-11 21:16 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 22, 2019 at 1:53 PM Ramon Fried <rfried.dev@gmail.com> wrote:
>
> Add documentation for new "pcap" command.
>
> Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
> ---
> v2: remove duplicated lines from example
>  doc/README.pcap | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
>  create mode 100644 doc/README.pcap
>
> diff --git a/doc/README.pcap b/doc/README.pcap
> new file mode 100644
> index 0000000000..25c85ae271
> --- /dev/null
> +++ b/doc/README.pcap
> @@ -0,0 +1,61 @@
> +PCAP:
> +
> +U-boot supports live ethernet packet capture in PCAP(2.4) format.
> +This is enabled by CONFIG_CMD_PCAP.
> +
> +The capture is stored on physical memory, and should be copied to
> +a machine capabale of parsing and displaying PCAP files (IE. wireshark)
> +If networking works properly one can copy the capture file from physical memory
> +using tftpput, or save it to local storage with (sf write, mmc write, fatwrite, etc)
> +
> +the pcap capturing requires maximum buffer size.
> +when the buffer is full, packets will silently drop.
> +check the status using "pcap status" to see if the buffer is full,
> +if so, consider increasing the buffer size.

Based on the change I asked for in the other patch, please reword this
to match the behavior.

> +
> +Usage example:
> +
> +# pcap init 0x100000 100000
> +PCAP capture initialized: addr: 0xffffffff80100000 max length: 100000
> +
> +# pcap start
> +# env set ipaddr 10.0.2.15; env set serverip 10.0.2.2; tftp uImage64
> +eth0 at 10000000: PHY present at 0
> +eth0 at 10000000: link up, 1000Mbps full-duplex (lpa: 0x7c00)
> +Using eth0 at 10000000 device
> +TFTP from server 10.0.2.2; our IP address is 10.0.2.15
> +Filename 'uImage64'.
> +Load address: 0xffffffff88000000
> +Loading: #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #################################################################
> +         #
> +         18.2 MiB/s
> +done
> +Bytes transferred = 8359376 (7f8dd0 hex)
> +PCAP status:
> +        Initialized addr: 0xffffffff80100000    max length: 100000
> +        Status: Active.  file size: 99991
> +        Incoming packets: 66 Outgoing packets: 67
> +        !!! Buffer is full, consider increasing buffer size !!!
> +
> +
> +# pcap stop
> +# tftpput 0xffffffff80100000 100000 10.0.2.2:capture.pcap
> +
> --
> 2.22.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-11 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22 18:53 [U-Boot] [PATCH v2 2/2] doc: pcap: add pcap cmd documentation Ramon Fried
2019-07-11 21:16 ` Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.