From patchwork Sat Jun 22 18:49:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramon Fried X-Patchwork-Id: 1120714 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vhmdrsIa"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45WPlD6yqGz9s3C for ; Sun, 23 Jun 2019 04:50:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7868FC21E62; Sat, 22 Jun 2019 18:50:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E6704C21E73; Sat, 22 Jun 2019 18:50:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8481EC21E42; Sat, 22 Jun 2019 18:50:19 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by lists.denx.de (Postfix) with ESMTPS id 69732C21E3B for ; Sat, 22 Jun 2019 18:50:14 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id v14so9662241wrr.4 for ; Sat, 22 Jun 2019 11:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UFzSg1YOBvJ+vEK2GtiUYS1FYjBEaghhGilisIed0VI=; b=vhmdrsIaj1bFfe6EkVS2NtnfQRe4JQ8PlmP/ooCROMxWlG50sGgUualj20a2CLcJmR E6WjZJma/vkyTIO8DOga30jni9HRe/TijOdHo9D1CsWwC5yczTyEDzAOJKhwQfqgv7IP kc+eaB3wJKUBM9yvm9uLGZ2p4/OiST/BpMyt7qbDDUQe+8CzkjocXsgqv63cT7J/WDrd tFz/qJJeiqgtG+sDAqsdJ3jssW/dj3YhmI3a7mmSTnAeh34BEijAxYM4otqHulFVLdKG cc7hmWXDSYaqRweGMBBpUQHiJGMBRd1M2rHQvQXn1sKrHTmqvaNXxpKUpFYNARDVnKKB G03w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UFzSg1YOBvJ+vEK2GtiUYS1FYjBEaghhGilisIed0VI=; b=jZ6tGnChfi89r9DhVaWjt4ydtJxlBPryQmATeHJrJ2s5xbSl4/UWrVsJbUovAUFG7R lupBnYHxQ1o2gkzR5tu6rheVLgga/swVturxxOryoSkqmHtaUblF5Oq70JidddE9QzPY qCmnapl36sPybzowE/piW4gwXL7UFamLVOeKTxBIftFSYZTf6Lb44ivp2ebxG/GE8gT6 USlGCfPRccPr9Vu52yfPP0aud/3/yvFJt03CYZic5kkFbiFXDW96XOazSIphz4MmsYBA dTUAghI0GGERQtGv2rVwYh3JvjXB88Ayx2oVhLjY4FGrxbZ/7FTDWJGwbh7J3l625OO7 /8SA== X-Gm-Message-State: APjAAAUOyo4p0wa5HEoOibmENB0oCCbgrGI4Zd9H7YhblFUtAqdW9+h5 RL6EevSV0OjPnAqiH2BNEw4= X-Google-Smtp-Source: APXvYqxZXHwAhCrLc3wA8mGR97m7fwItK9eKFZ5HRkr6LFc3heuc9W/tH5QO1/48fEjt1+1jsc/wJg== X-Received: by 2002:adf:f181:: with SMTP id h1mr6156161wro.18.1561229414063; Sat, 22 Jun 2019 11:50:14 -0700 (PDT) Received: from localhost.localdomain ([141.226.31.91]) by smtp.gmail.com with ESMTPSA id u25sm5434367wmc.3.2019.06.22.11.50.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 22 Jun 2019 11:50:13 -0700 (PDT) From: Ramon Fried To: joe.hershberger@ni.com Date: Sat, 22 Jun 2019 21:49:50 +0300 Message-Id: <20190622184950.16454-2-rfried.dev@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190622184950.16454-1-rfried.dev@gmail.com> References: <20190622184950.16454-1-rfried.dev@gmail.com> MIME-Version: 1.0 Cc: DH@Synoia.com, u-boot@lists.denx.de, lothar.felten@gmail.com, judge.packham@gmail.com Subject: [U-Boot] [PATCH 2/2] doc: pcap: add pcap cmd documentation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add documentation for new "pcap" command. Signed-off-by: Ramon Fried --- 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: + +# Initialize pcap capture to physical address (0x100000) with maximum size of 100000. +# Start capture +pcap start + +# Initialize network activity +env set ipaddr 10.0.2.15; env set serverip 10.0.2.2; tftp uImage64 + +# Stop capture +pcap stop + +# 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@10000000: PHY present at 0 +eth0@10000000: link up, 1000Mbps full-duplex (lpa: 0x7c00) +Using eth0@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 +