DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Zijie Pan <zijie.pan@6wind.com>, dev@dpdk.org
Cc: remy.horton@intel.com, thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH v7 0/5] get the information and data of EEPROM
Date: Wed, 25 Apr 2018 15:24:59 +0100	[thread overview]
Message-ID: <340f51da-177f-9a16-5437-0ddddd879195@intel.com> (raw)
In-Reply-To: <1524664926-938-1-git-send-email-zijie.pan@6wind.com>

On 4/25/2018 3:02 PM, Zijie Pan wrote:
> Add APIs to read information from the DPDK applictions.
> It can be used to dump the EEPROM of plugin modules (SFP+, QSFP, etc.).
> 
> Two APIs are introduced to access eeprom:
> - rte_eth_dev_get_module_info
> - rte_eth_dev_get_module_eeprom
> 
> Applications based on DPDK can dump eeprom by calling those two APIs.
> 
> Then, each PMD has to implement these callbacks for e1000, ixgbe, i40e, etc.
> 
> Patch for example/ethtool is used to test this function. It can get the raw 
> data of eeprom. See below how both DPDK applications (ethtool) and Linux
> kernel are dumping the same eeprom of a same NIC.
> 
> - Start example/ethtool:
>     ./examples/ethtool/ethtool-app/x86_64-native-linuxapp-gcc/ethtool -c 0xf -n 4 --socket-mem 1024,0 -- -i
> EthApp> drvinfo
> Port 0 driver: net_ixgbe (ver: DPDK 18.05.0-rc0)
> firmware-version: 0x18b30001
> bus-info: 0000:04:00.0
> 
> EthApp> module-eeprom
>  [UINT16]: module-eeprom <port_id> <filename>
>      Dump plug-in module EEPROM to file
> 
> EthApp> module-eeprom 0 my-module-eeprom.bin
> Total plug-in module EEPROM length: 512 bytes
> 
> EthApp> quit
> 
> - HexDump of this eeprom file:
> # xxd my-module-eeprom.bin
> 0000000: 0304 0710 0000 0100 0000 0006 6702 0000  ............g...
> 0000010: 0803 001e 4f45 4d20 2020 2020 2020 2020  ....OEM
> 0000020: 2020 2020 0000 1b21 5346 502d 3130 472d      ...!SFP-10G-
> 0000030: 5352 2d49 5420 2020 4120 2020 0352 0024  SR-IT   A   .R.$
> 0000040: 003a 0000 5751 3136 3034 3132 4131 3135  .:..WQ160412A115
> 0000050: 2020 2020 3135 3136 3130 2020 68fa 033b      151610  h..;
> 0000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000080: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000090: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000a0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000b0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000c0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000d0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000e0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000f0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000100: 5000 fb00 4b00 0000 8ca0 7530 88b8 7918  P...K.....u0..y.
> 0000110: 1d4c 01f4 1b58 03e8 3de9 03e8 2710 04eb  .L...X..=...'...
> 0000120: 2710 0064 1f07 007e 0000 0000 0000 0000  '..d...~........
> 0000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000140: 0000 0000 3f80 0000 0000 0000 0100 0000  ....?...........
> 0000150: 0100 0000 0100 0000 0100 0000 0000 002d  ...............-
> 0000160: 2c59 810a 13c7 1752 0001 0000 0000 0200  ,Y.....R........
> 0000170: 0040 0000 0040 0000 0000 0000 0000 0000  .@...@..........
> 0000180: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000190: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001a0: ffff faff ffff ffff ffff ffff ffff ffff  ................
> 00001b0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001c0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001d0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001e0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001f0: ffff ffff ffff ffff 0003 0100 0000 0000  ................
> 
> - Rerun same dump using Linux's kernel ethtool.
> 
> # ./install/sbin/dpdk-devbind --bind=ixgbe 04:00.0
> # ethtool -m p2p1 raw on > meeprom-kernel.bin
> 
> # xxd meeprom-kernel.bin
> 0000000: 0304 0710 0000 0100 0000 0006 6702 0000  ............g...
> 0000010: 0803 001e 4f45 4d20 2020 2020 2020 2020  ....OEM
> 0000020: 2020 2020 0000 1b21 5346 502d 3130 472d      ...!SFP-10G-
> 0000030: 5352 2d49 5420 2020 4120 2020 0352 0024  SR-IT   A   .R.$
> 0000040: 003a 0000 5751 3136 3034 3132 4131 3135  .:..WQ160412A115
> 0000050: 2020 2020 3135 3136 3130 2020 68fa 033b      151610  h..;
> 0000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000080: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000090: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000a0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000b0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000c0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000d0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000e0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00000f0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000100: 5000 fb00 4b00 0000 8ca0 7530 88b8 7918  P...K.....u0..y.
> 0000110: 1d4c 01f4 1b58 03e8 3de9 03e8 2710 04eb  .L...X..=...'...
> 0000120: 2710 0064 1f07 007e 0000 0000 0000 0000  '..d...~........
> 0000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 0000140: 0000 0000 3f80 0000 0000 0000 0100 0000  ....?...........
> 0000150: 0100 0000 0100 0000 0100 0000 0000 002d  ...............-
> 0000160: 2899 8146 0058 0001 0001 0000 0000 8200  (..F.X..........
> 0000170: 0540 0000 0540 0000 0000 0000 0000 0000  .@...@..........
> 0000180: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 0000190: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001a0: ffff faff ffff ffff ffff ffff ffff ffff  ................
> 00001b0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001c0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001d0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001e0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 00001f0: ffff ffff ffff ffff 0003 0100 0000 0000  ................
> 
> Both DPDK's my-module-eeprom.bin and Kernel's meeprom-kernel.bin
> are the same.
> 
> v2 changes:
>  - Fix typo in features.rst.
>  - Fix checkpatch warnings regarding long lines.
>  - Update function pcmd_module_eeprom_callback().
> 
> v3 changes:
>  - fix compilation when dpdk is compiled with shared libs.
> 
> v4 changes:
>  - add RTE_ prefix for the macros defined in rte_dev_info.h.
>  - mark the new APIs as experimental.
>  - some other minor fixes.
> 
> v5 changes:
>  - insert the new APIs in alphabetical order in rte_ethdev_version.map.
> 
> v6 changes:
>  - rename rte_dev_module_info as rte_eth_dev_module_info.
> 
> v7 changes:
>  - add module EEPROM dump feature in default.ini
>  - add module EEPROM dump feature in .ini files for the three PMDs.
> 
> Zijie Pan (5):
>   ethdev: add access to eeprom
>   examples/ethtool: add a new command module-eeprom
>   net/ixgbe: add module EEPROM callbacks for ixgbe
>   net/e1000: add module EEPROM callbacks for e1000
>   net/i40e: add module EEPROM callbacks for i40e

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

  parent reply	other threads:[~2018-04-25 14:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1524563176-7795-1-git-send-email-zijie.pan@6wind.com>
2018-04-25  9:13 ` [dpdk-dev] [PATCH v5 " Zijie Pan
2018-04-25  9:13   ` [dpdk-dev] [PATCH v5 1/5] ethdev: add access to eeprom Zijie Pan
2018-04-25  9:13   ` [dpdk-dev] [PATCH v5 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-04-25  9:13   ` [dpdk-dev] [PATCH v5 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-04-25  9:13   ` [dpdk-dev] [PATCH v5 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-04-25  9:13   ` [dpdk-dev] [PATCH v5 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan
2018-04-25  9:22   ` [dpdk-dev] [PATCH v5 0/5] get the information and data of EEPROM Thomas Monjalon
2018-04-25  9:32     ` Zijie Pan
2018-04-25 10:01   ` [dpdk-dev] [PATCH v6 " Zijie Pan
2018-04-25 10:01     ` [dpdk-dev] [PATCH v6 1/5] ethdev: add access to eeprom Zijie Pan
2018-04-25 10:28       ` Thomas Monjalon
2018-04-25 10:40       ` Ferruh Yigit
2018-04-25 10:01     ` [dpdk-dev] [PATCH v6 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-04-25 10:01     ` [dpdk-dev] [PATCH v6 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-04-25 10:44       ` Ferruh Yigit
2018-04-25 10:01     ` [dpdk-dev] [PATCH v6 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-04-25 10:01     ` [dpdk-dev] [PATCH v6 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan
2018-04-25 14:02     ` [dpdk-dev] [PATCH v7 0/5] get the information and data of EEPROM Zijie Pan
2018-04-25 14:02       ` [dpdk-dev] [PATCH v7 1/5] ethdev: add access to eeprom Zijie Pan
2018-04-25 14:02       ` [dpdk-dev] [PATCH v7 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-04-25 14:02       ` [dpdk-dev] [PATCH v7 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-04-25 14:02       ` [dpdk-dev] [PATCH v7 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-04-25 14:02       ` [dpdk-dev] [PATCH v7 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan
2018-04-25 14:24       ` Ferruh Yigit [this message]
2018-04-25 14:39         ` [dpdk-dev] [PATCH v7 0/5] get the information and data of EEPROM Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=340f51da-177f-9a16-5437-0ddddd879195@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=remy.horton@intel.com \
    --cc=thomas@monjalon.net \
    --cc=zijie.pan@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).