* Re: [PATCH v8 18/25] app/testpmd: use VFD APIs on i40e
From: Ferruh Yigit @ 2017-01-10 11:29 UTC (permalink / raw)
To: Wenzhuo Lu, dev; +Cc: Chen Jing D(Mark), Bernard Iremonger
In-Reply-To: <1484032580-60134-19-git-send-email-wenzhuo.lu@intel.com>
On 1/10/2017 7:16 AM, Wenzhuo Lu wrote:
> The new VF Daemon (VFD) APIs is implemented on i40e. Change
> testpmd code to use them, including VF MAC anti-spoofing,
> VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN
> insert.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
<...>
> +#ifdef RTE_LIBRTE_IXGBE_PMD
Within this ifdef, there is following call:
ret = rte_pmd_ixgbe_set_all_queues_drop_en(res->port_id, is_on);
It is not safe to make that call directly, port should be verified first
if it is ixgbe port, as done in other functions.
> /* all queues drop enable configuration */
>
> /* Common result structure for all queues drop enable */
> @@ -11277,6 +11351,9 @@ struct cmd_all_queues_drop_en_result {
> case -ENODEV:
> printf("invalid port_id %d\n", res->port_id);
> break;
> + case -ENOTSUP:
> + printf("function not implemented\n");
> + break;
> default:
> printf("programming error: (%s)\n", strerror(-ret));
> }
> @@ -11381,6 +11458,7 @@ struct cmd_vf_split_drop_en_result {
> NULL,
> },
> };
> +#endif
>
<...>
> @@ -11619,20 +11711,20 @@ struct cmd_set_vf_mac_addr_result {
> (cmdline_parse_inst_t *)&cmd_config_e_tag_forwarding_en_dis,
> (cmdline_parse_inst_t *)&cmd_config_e_tag_filter_add,
> (cmdline_parse_inst_t *)&cmd_config_e_tag_filter_del,
> -#ifdef RTE_LIBRTE_IXGBE_PMD
> (cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,
> (cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,
> (cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,
> (cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
> (cmdline_parse_inst_t *)&cmd_set_tx_loopback,
> +#ifdef RTE_LIBRTE_IXGBE_PMD
Overall, since port will be verified within the function, why not remove
this ifdef completely?
So all functions will be visible to everyone, but only the PMDs support
it will be called, others will return "not supported", as done in some
functions supports bot i40e and ixgbe pmd specific APIs.
> (cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
> (cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,
> - (cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
> (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
> (cmdline_parse_inst_t *)&cmd_set_vf_traffic,
> (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
> (cmdline_parse_inst_t *)&cmd_vf_rate_limit,
> #endif
> + (cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
> NULL,
> };
>
>
^ permalink raw reply
* [PATCH] doc: fix openssl formating text in documentation
From: Daniel Mrzyglod @ 2017-01-10 11:04 UTC (permalink / raw)
To: slawomirx.mrozowicz; +Cc: dev, Daniel Mrzyglod
the code section was lacking indendation to be be corectly formatted.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
doc/guides/cryptodevs/openssl.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index d2b5906..f1c39ba 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -98,15 +98,15 @@ To verify real traffic l2fwd-crypto example can be used with this command:
.. code-block:: console
-sudo ./build/l2fwd-crypto -c 0x3 -n 4 --vdev "crypto_openssl"
---vdev "crypto_openssl"-- -p 0x3 --chain CIPHER_HASH
---cipher_op ENCRYPT --cipher_algo AES_CBC
---cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f
---iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff
---auth_op GENERATE --auth_algo SHA1_HMAC
---auth_key 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
-:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
-:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+ sudo ./build/l2fwd-crypto -c 0x3 -n 4 --vdev "crypto_openssl"
+ --vdev "crypto_openssl"-- -p 0x3 --chain CIPHER_HASH
+ --cipher_op ENCRYPT --cipher_algo AES_CBC
+ --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f
+ --iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff
+ --auth_op GENERATE --auth_algo SHA1_HMAC
+ --auth_key 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+ :11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+ :11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
Limitations
-----------
--
2.7.4
^ permalink raw reply related
* Re: [PATCH v2 1/3] eal: add quiet mode to suppress log output to stdout
From: Declan Doherty @ 2017-01-10 10:41 UTC (permalink / raw)
To: Thomas Monjalon, Slawomir Mrozowicz; +Cc: dev
In-Reply-To: <2615371.2k6WulVlxV@xps13>
On 05/01/17 15:40, Thomas Monjalon wrote:
> 2017-01-05 17:49, Slawomir Mrozowicz:
>> Add EAL option to suppresses all log output to stdout.
>>
>> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
> [...]
>> " --"OPT_LOG_LEVEL" Set default log level\n"
>> + " -s, --"OPT_LOG_STDOUT_SILENT" Silent mode, suppresses log "
>> + "output to stdout\n"
>
> How does it behave when the app configure a custom log function which
> prints to stdout?
>
> Generally speaking, we should stop adding such options in DPDK and
> move this kind of responsibility to the applications (providing some API
> and helpers).
>
Hey Thomas,
this option wouldn't affect a custom log function as the flag this
controls is only used within by the default Linux log file stream in the
console_log_write function. Maybe a better option would be to change the
general behaviour of the default logging function and remove the printf
to stdout completely and add a generic verbose option applicable to all
environments which would allow log output to be directed to stdout. I
did notice that the default behaviour between Linux/BSD does seem to be
different with Linux defaulting to syslog/stdout and BSD to stderr.
One way or another I would like to able to disable streaming of log
output to stdout when using the default log stream in Linux, but I'm
open to suggestions as to the best way of doing this?
^ permalink raw reply
* Re: MSI-X vector #1 seems to be stalled sometimes after VF reset (ixgbe)
From: Mcnamara, John @ 2017-01-10 10:39 UTC (permalink / raw)
To: Ruslan Nikolaev, dev@dpdk.org
In-Reply-To: <33039425-355F-4D51-82EE-C5B792A1B4A0@purestorage.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ruslan Nikolaev
> Sent: Tuesday, January 10, 2017 2:48 AM
> To: dev@dpdk.org
> Subject: Re: [dpdk-dev] MSI-X vector #1 seems to be stalled sometimes
> after VF reset (ixgbe)
>
> dpdk_vfreset.patch:
>
> diff -urN dpdk-16.07/doc/guides/nics/overview.rst dpdk-16.07-
> new/doc/guides/nics/overview.rst
> --- dpdk-16.07/doc/guides/nics/overview.rst 2016-07-28
> 11:48:41.000000000 -0700
> +++ dpdk-16.07-new/doc/guides/nics/overview.rst 2016-12-15
> 17:32:27.436425563 -0800
> @@ -89,6 +89,7 @@
> Speed capabilities
> Link status Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
> Y Y Y Y Y Y Y
> Link status event Y Y Y Y Y Y Y Y Y Y
> Y Y Y Y
> + Link reset Y Y Y Y Y
> Queue status event
> Y
> Rx interrupt Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
> Queue start/stop Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
> Y Y Y Y
Hi,
Overview.rst is no longer in this format.
Capabilities should now be added to the ini files in doc/guides/nics/features.
John
^ permalink raw reply
* Re: [PATCH v3] net/enic: add support for TSO
From: Ferruh Yigit @ 2017-01-10 10:35 UTC (permalink / raw)
To: John Daley; +Cc: Richardson, Bruce, dev@dpdk.org
In-Reply-To: <20170109230428.10422-1-johndale@cisco.com>
On 1/9/2017 11:04 PM, John Daley wrote:
> The enic TSO implementation requires that the length of the Eth/IP/TCP
> headers be passed to the NIC. Other than that, it's just a matter of
> setting the mss and offload mode on a per packet basis.
>
> In TSO mode, IP and TCP checksums are offloaded even if not requested
> with mb->ol_flags.
>
> Signed-off-by: John Daley <johndale@cisco.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply
* Re: [PATCH v2] ixgbe: fix wrong VMDq function name
From: Ferruh Yigit @ 2017-01-10 10:35 UTC (permalink / raw)
To: Wenzhuo Lu, dev; +Cc: stable
In-Reply-To: <1484014751-98773-1-git-send-email-wenzhuo.lu@intel.com>
On 1/10/2017 2:19 AM, Wenzhuo Lu wrote:
> The function name ixgbe_vmdq_mode_check is not right.
> This function checks if Virtualization Technology is
> enabled. It's for both VMDq and IOV.
> Others may be misled by the current name.
>
> Fixes: fe3a45fd4104 ("ixgbe: add VMDq support")
>
> CC: stable@dpdk.org
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply
* Re: [PATCH] crypto/openssl: fix that remove unneeded check
From: Declan Doherty @ 2017-01-10 9:28 UTC (permalink / raw)
To: Piotr Azarewicz, pablo.de.lara.guarch, dev; +Cc: stable
In-Reply-To: <1483973136-154458-1-git-send-email-piotrx.t.azarewicz@intel.com>
On 09/01/17 14:45, Piotr Azarewicz wrote:
> EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is
> unneeded.
>
> Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
>
> Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
> ---
> drivers/crypto/openssl/rte_openssl_pmd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 832ea1d..312154a 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -522,8 +522,7 @@
> if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
> goto process_cipher_decrypt_err;
>
> - if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
> - goto process_cipher_decrypt_err;
> + EVP_CIPHER_CTX_set_padding(ctx, 0);
>
> if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
> goto process_cipher_decrypt_err;
>
Acked-by: Declan Doherty <declan.doherty@intel.com>
^ permalink raw reply
* Re: [PATCH] tools: fix active interface detection in dpdk-devbind.py
From: De Lara Guarch, Pablo @ 2017-01-10 9:22 UTC (permalink / raw)
To: Yoni Gilad, Jain, Deepak K; +Cc: dev@dpdk.org, stable@dpdk.org
In-Reply-To: <1483979853-16386-1-git-send-email-yonig@radcom.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yoni Gilad
> Sent: Monday, January 09, 2017 4:38 PM
> To: De Lara Guarch, Pablo; Jain, Deepak K
> Cc: dev@dpdk.org; Yoni Gilad; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] tools: fix active interface detection in dpdk-
> devbind.py
>
> When adding crypto devices, the "Active" and "Ssh_if" attributes of
> existing network devices were reset. This causes the follwing issues:
>
> - Network interfaces aren't marked as "*Active*" in the --status output.
> - Active network interfaces can be unbound without the --force option,
> causing loss of network connection.
>
> The reset was caused by the call to devices[d].update in
> get_crypto_details.
>
> This patch prevents the update on non-crypto devices.
>
> Fixes: cb4a1d1 ("tools: bind crypto devices")
>
> CC: stable@dpdk.org
>
> Signed-off-by: Yoni Gilad <yonig@radcom.com>
> ---
> usertools/dpdk-devbind.py | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
> index e057b87..1b9c651 100755
> --- a/usertools/dpdk-devbind.py
> +++ b/usertools/dpdk-devbind.py
> @@ -328,6 +328,9 @@ def get_crypto_details():
>
> # based on the basic info, get extended text details
> for d in devices.keys():
> + if devices[d]["Class"][0:2] != CRYPTO_BASE_CLASS:
> + continue
> +
> # get additional info and add it to existing data
> devices[d] = devices[d].copy()
> devices[d].update(get_pci_device_details(d).items())
> --
> 1.7.1
Typo in "follwing". Also, the fixline SHA should be " cb4a1d14bf3e", the first 6 bytes.
Apart from this,
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply
* Re: [PATCH v2] doc: add tso capabilities feature for mlx5
From: Elad Persiko @ 2017-01-10 9:18 UTC (permalink / raw)
To: Ferruh Yigit, dev@dpdk.org
In-Reply-To: <3c5731c6-4213-c976-9a17-798eb24d2c37@intel.com>
Thanks,
The feature is not supported on MLX4. I will fix it on V2
-----Original Message-----
From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
Sent: Monday, January 9, 2017 2:31 PM
To: Elad Persiko <eladpe@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] doc: add tso capabilities feature for mlx5
On 1/8/2017 4:23 PM, Elad Persiko wrote:
> Feature implemented at:
> commit b007e98ccda9 ("net/mlx5: implement TSO data path") commit
> 085c4137280a ("net/mlx5: support TSO in control plane")
>
> Signed-off-by: Elad Persiko <eladpe@mellanox.com>
> ---
> doc/guides/nics/features/mlx4.ini | 1 +
> doc/guides/nics/features/mlx5.ini | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/doc/guides/nics/features/mlx4.ini
> b/doc/guides/nics/features/mlx4.ini
> index c9828f7..d74b9dd 100644
> --- a/doc/guides/nics/features/mlx4.ini
> +++ b/doc/guides/nics/features/mlx4.ini
> @@ -10,6 +10,7 @@ Queue start/stop = Y
> MTU update = Y
> Jumbo frame = Y
> Scattered Rx = Y
> +TSO = Y
One more thing, for double check, patch updates only mlx5 files, is enabling TSO for mlx4 correct?
> Promiscuous mode = Y
> Allmulticast mode = Y
> Unicast MAC filter = Y
<...>
^ permalink raw reply
* [PATCH v6 5/5] ethtool: display firmware version
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484039333-30074-1-git-send-email-qiming.yang@intel.com>
This patch enhances the ethtool example to support to show
firmware version, in the same way that the Linux kernel
ethtool does.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
examples/ethtool/ethtool-app/ethapp.c | 1 +
examples/ethtool/lib/rte_ethtool.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 6aeaa06..85c31ac 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -185,6 +185,7 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params,
printf("Port %i driver: %s (ver: %s)\n",
id_port, info.driver, info.version
);
+ printf("firmware-version: %s\n", info.fw_version);
}
}
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index 6f0ce84..ec7a143 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -48,12 +48,18 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo)
struct rte_eth_dev_info dev_info;
struct rte_dev_reg_info reg_info;
int n;
+ int ret;
if (drvinfo == NULL)
return -EINVAL;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ ret = rte_eth_dev_fw_version_get(port_id, drvinfo->fw_version,
+ sizeof(drvinfo->fw_version));
+ if (ret != 0)
+ printf("firmware version get error: (%s)\n", strerror(-ret));
+
memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(port_id, &dev_info);
--
2.7.4
^ permalink raw reply related
* [PATCH v6 4/5] net/i40e: add firmware version get
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484039333-30074-1-git-send-email-qiming.yang@intel.com>
This patch add a new function i40e_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/i40e.ini | 1 +
drivers/net/i40e/i40e_ethdev.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
index 0d143bc..0dbc3c3 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -39,6 +39,7 @@ Packet type parsing = Y
Timesync = Y
Basic stats = Y
Extended stats = Y
+FW version = Y
Multiprocess aware = Y
BSD nic_uio = Y
Linux UIO = Y
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0eb4c99..3bf92d1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -324,6 +324,8 @@ static int i40e_dev_queue_stats_mapping_set(struct rte_eth_dev *dev,
uint16_t queue_id,
uint8_t stat_idx,
uint8_t is_rx);
+static int i40e_fw_version_get(struct rte_eth_dev *dev,
+ char *fw_version, size_t fw_size);
static void i40e_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
static int i40e_vlan_filter_set(struct rte_eth_dev *dev,
@@ -503,6 +505,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
.stats_reset = i40e_dev_stats_reset,
.xstats_reset = i40e_dev_stats_reset,
.queue_stats_mapping_set = i40e_dev_queue_stats_mapping_set,
+ .fw_version_get = i40e_fw_version_get,
.dev_infos_get = i40e_dev_info_get,
.dev_supported_ptypes_get = i40e_dev_supported_ptypes_get,
.vlan_filter_set = i40e_vlan_filter_set,
@@ -2594,6 +2597,34 @@ i40e_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *dev,
return -ENOSYS;
}
+static int
+i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+{
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ u32 full_ver;
+ u8 ver, patch;
+ u16 build;
+
+ if (fw_size < 16) {
+ PMD_DRV_LOG(WARNING, "Insufficient fw version buffer size");
+ return -EINVAL;
+ }
+
+ full_ver = hw->nvm.oem_ver;
+ ver = (u8)(full_ver >> 24);
+ build = (u16)((full_ver >> 8) & 0xffff);
+ patch = (u8)(full_ver & 0xff);
+
+ snprintf(fw_version, fw_size,
+ "%d.%d%d 0x%08x %d.%d.%d",
+ ((hw->nvm.version >> 12) & 0xf),
+ ((hw->nvm.version >> 4) & 0xff),
+ (hw->nvm.version & 0xf), hw->nvm.eetrack,
+ ver, build, patch);
+
+ return 0;
+}
+
static void
i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
--
2.7.4
^ permalink raw reply related
* [PATCH v6 3/5] net/ixgbe: add firmware version get
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484039333-30074-1-git-send-email-qiming.yang@intel.com>
This patch adds a new function ixgbe_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/ixgbe.ini | 1 +
drivers/net/ixgbe/ixgbe_ethdev.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index 4a5667f..e7104c2 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -43,6 +43,7 @@ Timesync = Y
Basic stats = Y
Extended stats = Y
Stats per queue = Y
+FW version = Y
EEPROM dump = Y
Registers dump = Y
Multiprocess aware = Y
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 060772d..a638936 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -193,6 +193,8 @@ static int ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
uint16_t queue_id,
uint8_t stat_idx,
uint8_t is_rx);
+static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ size_t fw_size);
static void ixgbe_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
static const uint32_t *ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -540,6 +542,7 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
.xstats_reset = ixgbe_dev_xstats_reset,
.xstats_get_names = ixgbe_dev_xstats_get_names,
.queue_stats_mapping_set = ixgbe_dev_queue_stats_mapping_set,
+ .fw_version_get = ixgbe_fw_version_get,
.dev_infos_get = ixgbe_dev_info_get,
.dev_supported_ptypes_get = ixgbe_dev_supported_ptypes_get,
.mtu_set = ixgbe_dev_mtu_set,
@@ -3034,6 +3037,28 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
hw_stats->vfgotc = 0;
}
+static int
+ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+{
+ struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ u16 eeprom_verh, eeprom_verl;
+ u32 etrack_id;
+
+ if (fw_size < 11) {
+ PMD_DRV_LOG(WARNING, "Insufficient fw version buffer size");
+ return -EINVAL;
+ }
+
+ ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh);
+ ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl);
+
+ etrack_id = (eeprom_verh << 16) | eeprom_verl;
+ snprintf(fw_version, fw_size,
+ "0x%08x", etrack_id);
+
+ return 0;
+}
+
static void
ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
--
2.7.4
^ permalink raw reply related
* [PATCH v6 2/5] net/e1000: add firmware version get
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484039333-30074-1-git-send-email-qiming.yang@intel.com>
This patch adds a new function eth_igb_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/igb.ini | 1 +
drivers/net/e1000/igb_ethdev.c | 54 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/doc/guides/nics/features/igb.ini b/doc/guides/nics/features/igb.ini
index 9fafe72..26ae008 100644
--- a/doc/guides/nics/features/igb.ini
+++ b/doc/guides/nics/features/igb.ini
@@ -35,6 +35,7 @@ Packet type parsing = Y
Timesync = Y
Basic stats = Y
Extended stats = Y
+FW version = Y
EEPROM dump = Y
Registers dump = Y
BSD nic_uio = Y
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2bb57f5..10519ad 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -120,6 +120,8 @@ static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,
unsigned limit);
static void eth_igb_stats_reset(struct rte_eth_dev *dev);
static void eth_igb_xstats_reset(struct rte_eth_dev *dev);
+static int eth_igb_fw_version_get(struct rte_eth_dev *dev,
+ char *fw_version, size_t fw_size);
static void eth_igb_infos_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
static const uint32_t *eth_igb_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -391,6 +393,7 @@ static const struct eth_dev_ops eth_igb_ops = {
.xstats_get_names = eth_igb_xstats_get_names,
.stats_reset = eth_igb_stats_reset,
.xstats_reset = eth_igb_xstats_reset,
+ .fw_version_get = eth_igb_fw_version_get,
.dev_infos_get = eth_igb_infos_get,
.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
.mtu_set = eth_igb_mtu_set,
@@ -1984,6 +1987,57 @@ eth_igbvf_stats_reset(struct rte_eth_dev *dev)
offsetof(struct e1000_vf_stats, gprc));
}
+static int
+eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ size_t fw_size)
+{
+ struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct e1000_fw_version fw;
+
+ if (fw_size < 16) {
+ PMD_DRV_LOG(WARNING, "Insufficient fw version buffer size");
+ return -EINVAL;
+ }
+
+ e1000_get_fw_version(hw, &fw);
+
+ switch (hw->mac.type) {
+ case e1000_i210:
+ case e1000_i211:
+ if (!(e1000_get_flash_presence_i210(hw))) {
+ snprintf(fw_version, fw_size,
+ "%2d.%2d-%d",
+ fw.invm_major, fw.invm_minor,
+ fw.invm_img_type);
+ break;
+ }
+ /* fall through */
+ default:
+ /* if option rom is valid, display its version too*/
+ if (fw.or_valid) {
+ snprintf(fw_version, fw_size,
+ "%d.%d, 0x%08x, %d.%d.%d",
+ fw.eep_major, fw.eep_minor, fw.etrack_id,
+ fw.or_major, fw.or_build, fw.or_patch);
+ /* no option rom */
+ } else {
+ if (fw.etrack_id != 0X0000) {
+ snprintf(fw_version, fw_size,
+ "%d.%d, 0x%08x",
+ fw.eep_major, fw.eep_minor,
+ fw.etrack_id);
+ } else {
+ snprintf(fw_version, fw_size,
+ "%d.%d.%d",
+ fw.eep_major, fw.eep_minor,
+ fw.eep_build);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
static void
eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
--
2.7.4
^ permalink raw reply related
* [PATCH v6 1/5] ethdev: add firmware version get
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484039333-30074-1-git-send-email-qiming.yang@intel.com>
This patch adds a new API 'rte_eth_dev_fw_version_get' for
fetching firmware version by a given device.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/default.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_17_02.rst | 3 +++
lib/librte_ether/rte_ethdev.c | 12 ++++++++++++
lib/librte_ether/rte_ethdev.h | 25 +++++++++++++++++++++++++
lib/librte_ether/rte_ether_version.map | 1 +
6 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index f1bf9bf..ae40d57 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -50,6 +50,7 @@ Timesync =
Basic stats =
Extended stats =
Stats per queue =
+FW version =
EEPROM dump =
Registers dump =
Multiprocess aware =
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1438c77..291e03d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -30,10 +30,6 @@ Deprecation Notices
``nb_seg_max`` and ``nb_mtu_seg_max`` providing information about number of
segments limit to be transmitted by device for TSO/non-TSO packets.
-* In 17.02 ABI change is planned: the ``rte_eth_dev_info`` structure
- will be extended with a new member ``fw_version`` in order to store
- the NIC firmware version.
-
* ethdev: an API change is planned for 17.02 for the function
``_rte_eth_dev_callback_process``. In 17.02 the function will return an ``int``
instead of ``void`` and a fourth parameter ``void *ret_param`` will be added.
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 180af82..260033d 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -52,6 +52,9 @@ New Features
See the :ref:`Generic flow API <Generic_flow_API>` documentation for more
information.
+* **Added firmware version get API.**
+ Added a new function ``rte_eth_dev_fw_version_get()`` to fetch firmware
+ version by a given device.
Resolved Issues
---------------
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 9dea1f1..49ca42d 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1588,6 +1588,18 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
STAT_QMAP_RX);
}
+int
+rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
+{
+ struct rte_eth_dev *dev;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ dev = &rte_eth_devices[port_id];
+
+ RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fw_version_get, -ENOTSUP);
+ return (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_size);
+}
+
void
rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
{
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 1c356c1..357612d 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1177,6 +1177,10 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
/**< @internal Check DD bit of specific RX descriptor */
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+ char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
@@ -1487,6 +1491,7 @@ struct eth_dev_ops {
eth_dev_infos_get_t dev_infos_get; /**< Get device info. */
eth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */
eth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */
+ eth_fw_version_get_t fw_version_get; /**< Get firmware version. */
eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
/**< Get packet types supported and identified by device. */
@@ -2430,6 +2435,26 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
/**
+ * Retrieve the firmware version of a device.
+ *
+ * @param port_id
+ * The port identifier of the device.
+ * @param fw_version
+ * A array pointer to store the firmware version of a device,
+ * allocated by caller.
+ * @param fw_size
+ * The size of the array pointed by fw_version, which should be
+ * large enough to store firmware version of the device.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if operation is not supported.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if *fw_size* is not enough to store firmware version.
+ */
+int rte_eth_dev_fw_version_get(uint8_t port_id,
+ char *fw_version, size_t fw_size);
+
+/**
* Retrieve the supported packet types of an Ethernet device.
*
* When a packet type is announced as supported, it *must* be recognized by
diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
index a021781..0cf94ed 100644
--- a/lib/librte_ether/rte_ether_version.map
+++ b/lib/librte_ether/rte_ether_version.map
@@ -151,6 +151,7 @@ DPDK_17.02 {
global:
_rte_eth_dev_reset;
+ rte_eth_dev_fw_version_get;
rte_flow_create;
rte_flow_destroy;
rte_flow_flush;
--
2.7.4
^ permalink raw reply related
* [PATCH v6 0/5] new API 'rte_eth_dev_fw_version_get'
From: Qiming Yang @ 2017-01-10 9:08 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1483848695-44643-1-git-send-email-qiming.yang@intel.com>
v6: - renamed fw_length -> fw_size
- added return value for insufficient fw_size
- fixed the indentation problem in e1000
- added ver.build.patch in i40e, keep the same with Linux kernel driver
v5: - modified the API rte_eth_dev_fw_version_get(uint8_t port_id,
char *fw_version, int fw_length).
v4: - removed deprecation notice
- renamed API as rte_eth_dev_fw_version_get
- splited bus info print from this patch set
v3: - changed API, use rte_eth_dev_fw_info_get(uint8_t port_id,
uint32_t *fw_major, uint32_t *fw_minor, uint32_t *fw_patch,
uint32_t *etrack_id)
- added statusment in /doc/guides/nics/features/default.ini and
release_17_02.rst
v2: - fixed commit log
Now, the example ethtool can only show the driver information. From
customers' point of view, it should be better if we can have the same
way that the Linux kernel ethtool does to show firmware version.
These five patches added a new function ``rte_eth_dev_fw_version_get()``
to fetch firmware version related information and implement the
display in example ethtool.
Qiming Yang (5):
ethdev: add firmware version get
net/e1000: add firmware version get
net/ixgbe: add firmware version get
net/i40e: add firmware version get
ethtool: display firmware version
doc/guides/nics/features/default.ini | 1 +
doc/guides/nics/features/i40e.ini | 1 +
doc/guides/nics/features/igb.ini | 1 +
doc/guides/nics/features/ixgbe.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_17_02.rst | 3 ++
drivers/net/e1000/igb_ethdev.c | 54 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/i40e_ethdev.c | 31 +++++++++++++++++++
drivers/net/ixgbe/ixgbe_ethdev.c | 25 ++++++++++++++++
examples/ethtool/ethtool-app/ethapp.c | 1 +
examples/ethtool/lib/rte_ethtool.c | 6 ++++
lib/librte_ether/rte_ethdev.c | 12 ++++++++
lib/librte_ether/rte_ethdev.h | 25 ++++++++++++++++
lib/librte_ether/rte_ether_version.map | 1 +
14 files changed, 162 insertions(+), 4 deletions(-)
--
2.7.4
^ permalink raw reply
* Re: [PATCH v2 5/7] net/virtio_user: add vhost kernel support
From: Tan, Jianfeng @ 2017-01-10 9:11 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Jason Wang, yuanhan.liu, ferruh.yigit, cunming.liang
In-Reply-To: <1642339.XEY7yvBjzp@xps13>
On 1/10/2017 4:46 PM, Thomas Monjalon wrote:
> 2017-01-10 14:11, Tan, Jianfeng:
>> On 1/9/2017 12:39 PM, Jason Wang wrote:
>>> On 2016年12月23日 15:14, Jianfeng Tan wrote:
>> [...]
>>>> +/* TUNSETIFF ifr flags */
>>>> +#define IFF_TAP 0x0002
>>>> +#define IFF_NO_PI 0x1000
>>>> +#define IFF_ONE_QUEUE 0x2000
>>>> +#define IFF_VNET_HDR 0x4000
>>>> +#define IFF_MULTI_QUEUE 0x0100
>>>> +#define IFF_ATTACH_QUEUE 0x0200
>>>> +#define IFF_DETACH_QUEUE 0x0400
>>> Do we really want to duplicate those things which has been exposed by
>>> uapi here?
>> You mean those defined in <linux/if_tun.h>? Redefine those common
>> macros, or include standard header file, with respective pros and cons.
>> DPDK prefers the redefinition way as far as I understand, doesn't it?
> What is the benefit of copying defines instead of including?
(1) Avoid compiling errors that old version missed some of macros.
(2) Better for portability (does not apply here).
I might take it for granted a little bit as I see some very popular open
source projects behave like this way, like QEMU, HAProxy, etc.
^ permalink raw reply
* [DPDK 3/5] net/ixgbe: add firmware version get
From: Qiming Yang @ 2017-01-10 9:00 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484038841-29932-1-git-send-email-qiming.yang@intel.com>
This patch adds a new function ixgbe_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/ixgbe.ini | 1 +
drivers/net/ixgbe/ixgbe_ethdev.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index 4a5667f..e7104c2 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -43,6 +43,7 @@ Timesync = Y
Basic stats = Y
Extended stats = Y
Stats per queue = Y
+FW version = Y
EEPROM dump = Y
Registers dump = Y
Multiprocess aware = Y
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 060772d..a638936 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -193,6 +193,8 @@ static int ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
uint16_t queue_id,
uint8_t stat_idx,
uint8_t is_rx);
+static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ size_t fw_size);
static void ixgbe_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
static const uint32_t *ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -540,6 +542,7 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
.xstats_reset = ixgbe_dev_xstats_reset,
.xstats_get_names = ixgbe_dev_xstats_get_names,
.queue_stats_mapping_set = ixgbe_dev_queue_stats_mapping_set,
+ .fw_version_get = ixgbe_fw_version_get,
.dev_infos_get = ixgbe_dev_info_get,
.dev_supported_ptypes_get = ixgbe_dev_supported_ptypes_get,
.mtu_set = ixgbe_dev_mtu_set,
@@ -3034,6 +3037,28 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
hw_stats->vfgotc = 0;
}
+static int
+ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+{
+ struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ u16 eeprom_verh, eeprom_verl;
+ u32 etrack_id;
+
+ if (fw_size < 11) {
+ PMD_DRV_LOG(WARNING, "Insufficient fw version buffer size");
+ return -EINVAL;
+ }
+
+ ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh);
+ ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl);
+
+ etrack_id = (eeprom_verh << 16) | eeprom_verl;
+ snprintf(fw_version, fw_size,
+ "0x%08x", etrack_id);
+
+ return 0;
+}
+
static void
ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
--
2.7.4
^ permalink raw reply related
* [DPDK 2/5] net/e1000: add firmware version get
From: Qiming Yang @ 2017-01-10 9:00 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1484038841-29932-1-git-send-email-qiming.yang@intel.com>
This patch adds a new function eth_igb_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/igb.ini | 1 +
drivers/net/e1000/igb_ethdev.c | 54 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/doc/guides/nics/features/igb.ini b/doc/guides/nics/features/igb.ini
index 9fafe72..26ae008 100644
--- a/doc/guides/nics/features/igb.ini
+++ b/doc/guides/nics/features/igb.ini
@@ -35,6 +35,7 @@ Packet type parsing = Y
Timesync = Y
Basic stats = Y
Extended stats = Y
+FW version = Y
EEPROM dump = Y
Registers dump = Y
BSD nic_uio = Y
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2bb57f5..10519ad 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -120,6 +120,8 @@ static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,
unsigned limit);
static void eth_igb_stats_reset(struct rte_eth_dev *dev);
static void eth_igb_xstats_reset(struct rte_eth_dev *dev);
+static int eth_igb_fw_version_get(struct rte_eth_dev *dev,
+ char *fw_version, size_t fw_size);
static void eth_igb_infos_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
static const uint32_t *eth_igb_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -391,6 +393,7 @@ static const struct eth_dev_ops eth_igb_ops = {
.xstats_get_names = eth_igb_xstats_get_names,
.stats_reset = eth_igb_stats_reset,
.xstats_reset = eth_igb_xstats_reset,
+ .fw_version_get = eth_igb_fw_version_get,
.dev_infos_get = eth_igb_infos_get,
.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
.mtu_set = eth_igb_mtu_set,
@@ -1984,6 +1987,57 @@ eth_igbvf_stats_reset(struct rte_eth_dev *dev)
offsetof(struct e1000_vf_stats, gprc));
}
+static int
+eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ size_t fw_size)
+{
+ struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct e1000_fw_version fw;
+
+ if (fw_size < 16) {
+ PMD_DRV_LOG(WARNING, "Insufficient fw version buffer size");
+ return -EINVAL;
+ }
+
+ e1000_get_fw_version(hw, &fw);
+
+ switch (hw->mac.type) {
+ case e1000_i210:
+ case e1000_i211:
+ if (!(e1000_get_flash_presence_i210(hw))) {
+ snprintf(fw_version, fw_size,
+ "%2d.%2d-%d",
+ fw.invm_major, fw.invm_minor,
+ fw.invm_img_type);
+ break;
+ }
+ /* fall through */
+ default:
+ /* if option rom is valid, display its version too*/
+ if (fw.or_valid) {
+ snprintf(fw_version, fw_size,
+ "%d.%d, 0x%08x, %d.%d.%d",
+ fw.eep_major, fw.eep_minor, fw.etrack_id,
+ fw.or_major, fw.or_build, fw.or_patch);
+ /* no option rom */
+ } else {
+ if (fw.etrack_id != 0X0000) {
+ snprintf(fw_version, fw_size,
+ "%d.%d, 0x%08x",
+ fw.eep_major, fw.eep_minor,
+ fw.etrack_id);
+ } else {
+ snprintf(fw_version, fw_size,
+ "%d.%d.%d",
+ fw.eep_major, fw.eep_minor,
+ fw.eep_build);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
static void
eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
--
2.7.4
^ permalink raw reply related
* [DPDK 1/5] ethdev: add firmware version get
From: Qiming Yang @ 2017-01-10 9:00 UTC (permalink / raw)
To: dev; +Cc: remy.horton, ferruh.yigit, helin.zhang, Qiming Yang
In-Reply-To: <1483848695-44643-1-git-send-email-qiming.yang@intel.com>
This patch adds a new API 'rte_eth_dev_fw_version_get' for
fetching firmware version by a given device.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
doc/guides/nics/features/default.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_17_02.rst | 3 +++
lib/librte_ether/rte_ethdev.c | 12 ++++++++++++
lib/librte_ether/rte_ethdev.h | 25 +++++++++++++++++++++++++
lib/librte_ether/rte_ether_version.map | 1 +
6 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index f1bf9bf..ae40d57 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -50,6 +50,7 @@ Timesync =
Basic stats =
Extended stats =
Stats per queue =
+FW version =
EEPROM dump =
Registers dump =
Multiprocess aware =
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1438c77..291e03d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -30,10 +30,6 @@ Deprecation Notices
``nb_seg_max`` and ``nb_mtu_seg_max`` providing information about number of
segments limit to be transmitted by device for TSO/non-TSO packets.
-* In 17.02 ABI change is planned: the ``rte_eth_dev_info`` structure
- will be extended with a new member ``fw_version`` in order to store
- the NIC firmware version.
-
* ethdev: an API change is planned for 17.02 for the function
``_rte_eth_dev_callback_process``. In 17.02 the function will return an ``int``
instead of ``void`` and a fourth parameter ``void *ret_param`` will be added.
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 180af82..260033d 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -52,6 +52,9 @@ New Features
See the :ref:`Generic flow API <Generic_flow_API>` documentation for more
information.
+* **Added firmware version get API.**
+ Added a new function ``rte_eth_dev_fw_version_get()`` to fetch firmware
+ version by a given device.
Resolved Issues
---------------
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 9dea1f1..49ca42d 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1588,6 +1588,18 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
STAT_QMAP_RX);
}
+int
+rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
+{
+ struct rte_eth_dev *dev;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ dev = &rte_eth_devices[port_id];
+
+ RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fw_version_get, -ENOTSUP);
+ return (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_size);
+}
+
void
rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
{
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 1c356c1..357612d 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1177,6 +1177,10 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
/**< @internal Check DD bit of specific RX descriptor */
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+ char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
@@ -1487,6 +1491,7 @@ struct eth_dev_ops {
eth_dev_infos_get_t dev_infos_get; /**< Get device info. */
eth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */
eth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */
+ eth_fw_version_get_t fw_version_get; /**< Get firmware version. */
eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
/**< Get packet types supported and identified by device. */
@@ -2430,6 +2435,26 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
/**
+ * Retrieve the firmware version of a device.
+ *
+ * @param port_id
+ * The port identifier of the device.
+ * @param fw_version
+ * A array pointer to store the firmware version of a device,
+ * allocated by caller.
+ * @param fw_size
+ * The size of the array pointed by fw_version, which should be
+ * large enough to store firmware version of the device.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if operation is not supported.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if *fw_size* is not enough to store firmware version.
+ */
+int rte_eth_dev_fw_version_get(uint8_t port_id,
+ char *fw_version, size_t fw_size);
+
+/**
* Retrieve the supported packet types of an Ethernet device.
*
* When a packet type is announced as supported, it *must* be recognized by
diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
index a021781..0cf94ed 100644
--- a/lib/librte_ether/rte_ether_version.map
+++ b/lib/librte_ether/rte_ether_version.map
@@ -151,6 +151,7 @@ DPDK_17.02 {
global:
_rte_eth_dev_reset;
+ rte_eth_dev_fw_version_get;
rte_flow_create;
rte_flow_destroy;
rte_flow_flush;
--
2.7.4
^ permalink raw reply related
* Re: [PATCH v2 3/3] app/crypto-perf: introduce new performance test application
From: Mrozowicz, SlawomirX @ 2017-01-10 8:52 UTC (permalink / raw)
To: Thomas Monjalon, Doherty, Declan
Cc: dev@dpdk.org, Azarewicz, PiotrX T, Kerlin, Marcin,
Kobylinski, MichalX
In-Reply-To: <2098042.frnbFPgmZm@xps13>
>-----Original Message-----
>From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
>Sent: Monday, January 9, 2017 4:25 PM
>To: Mrozowicz, SlawomirX <slawomirx.mrozowicz@intel.com>; Doherty,
>Declan <declan.doherty@intel.com>
>Cc: dev@dpdk.org; Azarewicz, PiotrX T <piotrx.t.azarewicz@intel.com>;
>Kerlin, Marcin <marcin.kerlin@intel.com>; Kobylinski, MichalX
><michalx.kobylinski@intel.com>
>Subject: Re: [dpdk-dev] [PATCH v2 3/3] app/crypto-perf: introduce new
>performance test application
>
>2017-01-05 17:50, Slawomir Mrozowicz:
>> --- a/app/Makefile
>> +++ b/app/Makefile
>> @@ -38,5 +38,6 @@ DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
>> DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test
>> DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
>> DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
>> +DIRS-$(CONFIG_RTE_APP_CRYPTO_PERF) += crypto-perf
>
>Could we rename the directory to test-crypto or test-crypto-perf for
>consistency?
>
>> --- /dev/null
>> +++ b/app/crypto-perf/Makefile
>[...]
>> +APP = dpdk-crypto-perf
>
>I think we should have "test" in the name of the app.
>dpdk-test-crypto?
>dpdk-test-crypto-perf?
I am going to change
the directory to: /app/test-crypto-perf
the app name to: dpdk-test-crypto-perf
Sławomir
^ permalink raw reply
* Re: [PATCH v2 5/7] net/virtio_user: add vhost kernel support
From: Thomas Monjalon @ 2017-01-10 8:46 UTC (permalink / raw)
To: Tan, Jianfeng; +Cc: dev, Jason Wang, yuanhan.liu, ferruh.yigit, cunming.liang
In-Reply-To: <4fa4d06c-d359-df12-a073-7c2c2540b634@intel.com>
2017-01-10 14:11, Tan, Jianfeng:
> On 1/9/2017 12:39 PM, Jason Wang wrote:
> > On 2016年12月23日 15:14, Jianfeng Tan wrote:
> [...]
> >> +/* TUNSETIFF ifr flags */
> >> +#define IFF_TAP 0x0002
> >> +#define IFF_NO_PI 0x1000
> >> +#define IFF_ONE_QUEUE 0x2000
> >> +#define IFF_VNET_HDR 0x4000
> >> +#define IFF_MULTI_QUEUE 0x0100
> >> +#define IFF_ATTACH_QUEUE 0x0200
> >> +#define IFF_DETACH_QUEUE 0x0400
> >
> > Do we really want to duplicate those things which has been exposed by
> > uapi here?
>
> You mean those defined in <linux/if_tun.h>? Redefine those common
> macros, or include standard header file, with respective pros and cons.
> DPDK prefers the redefinition way as far as I understand, doesn't it?
What is the benefit of copying defines instead of including?
^ permalink raw reply
* Re: [PATCH v3 0/7] virtio_user as an alternative exception path
From: Tan, Jianfeng @ 2017-01-10 8:46 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, yuanhan.liu, ferruh.yigit, cunming.liang
In-Reply-To: <20170109140634.GA94516@bricha3-MOBL3.ger.corp.intel.com>
On 1/9/2017 10:06 PM, Bruce Richardson wrote:
> On Wed, Jan 04, 2017 at 03:59:19AM +0000, Jianfeng Tan wrote:
>> v3:
>> - Drop the patch to postpone driver ok sending patch, superseded it
>> with a bug fix to disable all virtqueues and re-init the device.
>> (you might wonder why not just send reset owner msg. Under my test,
>> it causes spinlock deadlock problem when killing the program).
>> - Avoid compiling error on 32-bit system for pointer convert.
>> - Fix a bug in patch "abstract virtio user backend ops", vhostfd is
>> not properly assigned.
>> - Fix a "MQ cannot be used" bug in v2, which is related to strip
>> some feature bits that vhost kernel does not recognize.
>> - Update release note.
>>
>> v2: (Lots of them are from yuanhan's comment)
>> - Add offloding feature.
>> - Add multiqueue support.
>> - Add a new patch to postpone the sending of driver ok notification.
>> - Put fix patch ahead of the whole patch series.
>> - Split original 0001 patch into 0003 and 0004 patches.
>> - Remove the original vhost_internal design, just add those into
>> struct virtio_user_dev for simplicity.
>> - Reword "control" to "send_request".
>> - Reword "host_features" to "device_features".
>>
>> In v16.07, we upstreamed a virtual device, virtio_user (with vhost-user
>> as the backend). The path to go with a vhost-kernel backend has been
>> dropped for bad performance comparing to vhost-user and code simplicity.
>>
>> But after a second thought, virtio_user + vhost-kernel is a good
>> candidate as an exceptional path, such as KNI, which exchanges packets
>> with kernel networking stack.
>> - maintenance: vhost-net (kernel) is upstreamed and extensively used
>> kernel module. We don't need any out-of-tree module like KNI.
>> - performance: as with KNI, this solution would use one or more
>> kthreads to send/receive packets from user space DPDK applications,
>> which has little impact on user space polling thread (except that
>> it might enter into kernel space to wake up those kthreads if
>> necessary).
>> - features: vhost-net is born to be a networking solution, which has
>> lots of networking related featuers, like multi queue, tso, multi-seg
>> mbuf, etc.
>>
>> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
>>
> Sounds great. However, I think we'll need a how-to doc for this to help
> people get it up and running as a KNI replacement for packets to/from
> the kernel. Any plans to draw up such a doc? It would be good to include
> it in this patchset.
I was planning to do that in separate patchset. But I agree with you
that it's better to do that in this patchset.
Thanks,
Jianfeng
>
> /Bruce
^ permalink raw reply
* Re: Port stats zero when using MLX5 DPDK driver
From: Shahaf Shuler @ 2017-01-10 8:43 UTC (permalink / raw)
To: george.dit@gmail.com; +Cc: dev@dpdk.org
In-Reply-To: <CAN9HtFACigKN4MTZeTzAjkNXD2G3N5cSGnRaVJO6MRZOtQn5cw@mail.gmail.com>
supporting this functionality is not on the plans. If you wish to read statistics of a running process you can use ethtool –S <device_name>.
It will provide you the statistics of the port.
Note that those statistics count the number of bytes/packet which were received/sent by the port. This number may not be equal to the number of packet/bytes which were send/received on the PMD.
--Shahaf
From: george.dit@gmail.com [mailto:george.dit@gmail.com]
Sent: Monday, January 9, 2017 4:45 PM
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Port stats zero when using MLX5 DPDK driver
Hi Shahaf,
Thanks for the clarification!
Is there a plan for this functionality to be provided (soon)? (or any technical limitation that stands in this way)
Thanks and best regards,
Georgios
On Mon, Jan 9, 2017 at 2:32 PM, Shahaf Shuler <shahafs@mellanox.com<mailto:shahafs@mellanox.com>> wrote:
Hi Georgios,
It is not support on Mellanox PMD to read the primary process counters from a secondary process.
--Shahaf
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>] On Behalf Of george.dit@gmail.com<mailto:george.dit@gmail.com>
Sent: Sunday, January 8, 2017 3:38 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>
Subject: [dpdk-dev] Port stats zero when using MLX5 DPDK driver
Hi,
I have a simple setup with a machine that contains a dual port 10 GbE Intel 82599ES NIC and another dual port 100 GbE Mellanox ConnectX-4 NIC. The Intel ports are 0 and 1, while the Mellanox ones are 2 and 3.
I properly compiled DPDK 16.11 and test-pmd works just fine for all 4 ports.
Then, I ran a simple primary application that forwards packets from 0 <-->
1 and 2 <--> 3 and started dpdk-procinfo -- --stats (or --xstats) as a secondary monitoring process, while sending some traffic to all 4 ports.
The problem I see is that the statistics reported by the Mellanox NICs are always zero (Intel ports report just fine).
What is the reason behind this behavior? Is there a bug in the driver (maybe recently fixed by DPDK 17.02 rc?) or is it simply a lack of this functionality?
Thanks and best regards,
--
Georgios Katsikas
Ph.D. Student and Research Assistant
Network Systems Lab (NSL)
*E-Mail:* george <george.katsikas@imdea.org<mailto:george.katsikas@imdea.org>>.dit@gmail.com<mailto:dit@gmail.com>
*Web Site:* http://www.di.uoa.gr/~katsikas/ <http://people.networks.imdea.org/~george_katsikas/index.html>
--
Georgios Katsikas
Ph.D. Student and Research Assistant
Network Systems Lab (NSL)
[http://www.kth.se/polopoly_fs/1.77259!/image/logo-main-2013.png]
E-Mail: george<mailto:george.katsikas@imdea.org>.dit@gmail.com<mailto:dit@gmail.com>
Web Site: http://www.di.uoa.gr/~katsikas/<http://people.networks.imdea.org/~george_katsikas/index.html>
^ permalink raw reply
* Re: [PATCH] app/test: fix aad padding size in SGL operation
From: De Lara Guarch, Pablo @ 2017-01-10 8:41 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev@dpdk.org
Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K
In-Reply-To: <80307F746F1522479831AB1253B7024E7214EF@IRSMSX102.ger.corp.intel.com>
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Monday, January 09, 2017 2:09 PM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Cc: Trahe, Fiona; Griffin, John; Jain, Deepak K
> Subject: RE: [PATCH] app/test: fix aad padding size in SGL operation
>
>
>
> > -----Original Message-----
> > From: De Lara Guarch, Pablo
> > Sent: Monday, January 09, 2017 1:39 PM
> > To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> > Cc: Trahe, Fiona <fiona.trahe@intel.com>; Griffin, John
> > <john.griffin@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>
> > Subject: RE: [PATCH] app/test: fix aad padding size in SGL operation
> >
> > Hi Arek,
> >
> > > -----Original Message-----
> > > From: Kusztal, ArkadiuszX
> > > Sent: Tuesday, January 03, 2017 3:39 PM
> > > To: dev@dpdk.org
> > > Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak
> > > K; Kusztal, ArkadiuszX
> > > Subject: [PATCH] app/test: fix aad padding size in SGL operation
> > >
> > > This commit fixes unnecessary padding of aad for GCM using
> > > scatter-gather list
> > >
> > > Fixes: b71990ffa7e4 ("app/test: add SGL tests to cryptodev QAT suite")
> > >
> > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> >
> > I can merge this patch to the commit above in the subtree, as it has not
> been
> > upstreamed to the mainline.
> > Is that OK?
>
> Hi Pablo,
>
> Sure, I think it is the best solution.
>
> Thanks,
> Arek
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply
* Re: [PATCH 2/7] ethdev: reduce goto's in attach/detach
From: Thomas Monjalon @ 2017-01-10 8:40 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
In-Reply-To: <20170109233022.31154-3-stephen@networkplumber.org>
Hi Stephen,
Please use --in-reply-to to keep v1 and v2 in the same thread.
Comment below
2017-01-09 15:30, Stephen Hemminger:
> int
> rte_eth_dev_detach(uint8_t port_id, char *name)
> {
> - int ret = -1;
> + int ret;
>
> - if (name == NULL) {
> - ret = -EINVAL;
> - goto err;
> - }
> + if (name == NULL)
> + return -EINVAL;
>
> /* FIXME: move this to eal, once device flags are relocated there */
> - if (rte_eth_dev_is_detachable(port_id))
> - goto err;
> + ret = rte_eth_dev_is_detachable(port_id);
> + if (ret < 0)
> + return ret;
As commented on v1 by Ferruh and I, you should check also positive value.
>
> snprintf(name, sizeof(rte_eth_devices[port_id].data->name),
> "%s", rte_eth_devices[port_id].data->name);
> - ret = rte_eal_dev_detach(name);
> - if (ret < 0)
> - goto err;
>
> - return 0;
> -
> -err:
> - return ret;
> + return rte_eal_dev_detach(name);
> }
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox