i40e: enable extended tag
cover i40e: enable extended tag
'extended tag' is important for XL710 performance, while might not be neccessary for other NICs. It adds the enabling 'extended tag' into i40e PMD specifically, then the sys files of 'extended_tag' and 'max_read_request_size', and all of their relavant operations are removed as they are not neccessary for all devices. In addition, documentations are updated at the same time.
Helin Zhang (3):
i40e: enable extended tag
eal: remove pci config of extended tag
igb_uio: remove sys files for setting pci config space
config/common_linuxapp | 7 -- doc/guides/linux_gsg/enable_func.rst | 22 ------ doc/guides/rel_notes/deprecation.rst | 3 + doc/guides/rel_notes/release_2_3.rst | 11 +++ drivers/net/i40e/i40e_ethdev.c | 67 +++++++++++++++++- lib/librte_eal/common/eal_common_pci.c | 7 -- lib/librte_eal/common/include/rte_pci.h | 4 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 ++----------------------- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 108 ------------------------------ 9 files changed, 87 insertions(+), 232 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/3 i40e: enable extended tag
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
--- doc/guides/rel_notes/release_2_3.rst | 5 +++ drivers/net/i40e/i40e_ethdev.c | 67 ++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-)
doc/guides/rel_notes/release_2_3.rst +5 -0
@@ -4,6 +4,11 @@ DPDK Release 2.3 New Features ------------ +* **i40e: Enabled extended tag.** + + It enabled extended tag by checking and writing corresponding PCI config + space bytes, to boost the performance. + Resolved Issues ---------------
drivers/net/i40e/i40e_ethdev.c +64 -3
97 lines not on this page · raw message
Signature · 1 line
1.9.3
Hi
Review
Quoted 9 lines
*/
static voiddrivers/net/i40e/i40e_ethdev.c +2
-1-i40e_hw_init(struct i40e_hw *hw) +i40e_hw_init(struct rte_eth_dev *dev) { + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data-Quoted 1 line
dev_private);(quoted diff) +2
-0+ + i40e_enable_extended_tag(dev);
If the function i40e_enable_extended_tag is only used here without Checking the return value, why not define it as void?
Thanks
Jingjing
Quoted 6 lines
drivers/net/i40e/i40e_ethdev.c +1
-1+/* clear the PF Queue Filter control register */ I40E_WRITE_REG (hw,I40E_PFQF_CTL_0 ,0 ); --1.9.3
2015-12-21 10:38, Helin Zhang:
Quoted 3 lines
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
If it's so important, why the values are not documented? Please start to fill a file doc/guides/nics/i40e.rst to explain how the device works.
Thanks
Hi Thomas
It has already been mentioned in getting started guide for a long time. Are you suggesting to move into i40e specifically? Thanks!
Regards,
Helin
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, January 22, 2016 6:27 PM
To: Zhang, Helin <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] i40e: enable extended tag
2015-12-21 10:38, Helin Zhang:
Quoted 3 lines
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
If it's so important, why the values are not documented?
Please start to fill a file doc/guides/nics/i40e.rst to explain how the device works. Thanks
Quoted 6 lines
From: Thomas Monjalon [mailto:[email protected]]
Quoted 5 lines
2015-12-21 10:38, Helin Zhang:
Quoted 3 lines
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
Quoted 6 lines
Quoted 3 lines
If it's so important, why the values are not documented? Please start to fill a file
doc/guides/nics/i40e.rstto explain how the device works. ThanksIt has already been mentioned in getting started guide for a long time. Are you suggesting to move into i40e specifically? Thanks!
Yes you're right. I had forgotten that:
http://dpdk.org/doc/guides-2.2/linux_gsg/enable_func.html#enabling-extended-tag-and-setting-max-read-request-size
Yes, it would be better moved into an i40e doc.
And maybe max_read_request_size may be commented to give advices on values. Thanks
Quoted 22 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, January 25, 2016 5:17 PM
To: Zhang, Helin
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] i40e: enable extended tagQuoted 6 lines
From: Thomas Monjalon [mailto:[email protected]]
Quoted 5 lines
2015-12-21 10:38, Helin Zhang:
Quoted 3 lines
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
Quoted 6 lines
Quoted 3 lines
If it's so important, why the values are not documented? Please start to fill a file
doc/guides/nics/i40e.rstto explain how the device works. ThanksIt has already been mentioned in getting started guide for a long time. Are you suggesting to move into i40e specifically? Thanks!
Quoted 8 lines
Yes you're right. I had forgotten that:
http://dpdk.org/doc/guides-2.2/linux_gsg/enable_func.html#enabling-
extended-tag-and-setting-max-read-request-sizeYes, it would be better moved into an i40e doc.
And maybemax_read_request_sizemay be commented to give advices on values.
Thanks
OK. Good idea, and I will move that soon later. Thanks!
Regards,
Helin
PATCH 2/3 eal: remove pci config of extended tag
In reply to Helin ZhangRemove pci configuration of 'extended tag' and 'max read request size', as they are not required by all devices and it lets PMD to configure them if neccessary.
In addition, 'pci_config_space_set()' is deprecated.
--- config/common_linuxapp | 7 --- lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 4 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++------------------------------ 4 files changed, 9 insertions(+), 99 deletions(-)
config/common_linuxapp +0 -7
@@ -115,13 +115,6 @@ CONFIG_RTE_MALLOC_DEBUG=n CONFIG_RTE_EAL_PMD_PATH="" # -# Special configurations in PCI Config Space for high performance -# -CONFIG_RTE_PCI_CONFIG=n -CONFIG_RTE_PCI_EXTENDED_TAG="" -CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE=0 - -# # Compile Environment Abstraction Layer for linux # CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
lib/librte_eal/common/eal_common_pci.c +0 -7
@@ -180,13 +180,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d }if (dr->drv_flags &RTE_PCI_DRV_NEED_MAPPING ) { -#ifdef RTE_PCI_CONFIG -/* -* Set PCIe config space for high performance. -* Return value can be ignored. -*/ -pci_config_space_set (dev); -#endif /* map resources for devices that use igb_uio */ ret =pci_map_device (dev);if (ret !=0 )
lib/librte_eal/common/include/rte_pci.h +3 -1
@@ -489,12 +489,14 @@ int rte_eal_pci_write_config(const struct rte_pci_device *device,#ifdef RTE_PCI_CONFIG /** * Set special config space registers for performance purpose. +* It is deprecated, as all configurations have been moved into +* each PMDs respectively. * * @param dev * A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set (struct rte_pci_device *dev); +void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated;#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/eal/eal_pci.c +6 -84
98 lines not on this page · raw message
Signature · 1 line
1.9.3
v2 cover enable extended tag for i40e
It enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in igb_uio, and eal lib.
v2:
- Changed the type of return value of i40e_enable_extended_tag() to 'void'.
- Fixed the compile warnings.
- Kept the sys files as they were, and added ABI change announcement for them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
Helin Zhang (3):
i40e: enable extended tag
eal: remove pci config of extended tag
igb_uio: deprecate sys files
config/common_linuxapp | 1 + doc/guides/linux_gsg/enable_func.rst | 47 ---------------- doc/guides/nics/i40e.rst | 76 ++++++++++++++++++++++++++ doc/guides/rel_notes/deprecation.rst | 6 +++ doc/guides/rel_notes/release_16_04.rst | 6 +++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++-- lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 2 + lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++---------------------------- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 +++---------------------- 10 files changed, 167 insertions(+), 205 deletions(-) create mode 100644 doc/guides/nics/i40e.rst
Signature · 1 line
1.9.3
PATCH v2 1/3 i40e: enable extended tag
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
--- doc/guides/rel_notes/release_16_04.rst | 6 ++++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-)
v2:
- Changed the type of return value of i40e_enable_extended_tag() to 'void'.
doc/guides/rel_notes/release_16_04.rst +6 -0
@@ -46,6 +46,12 @@ This section should contain new features added in this release. Sample format: * **Added vhost-user live migration support.** +* **i40e: Enabled extended tag.** + + It enabled extended tag by checking and writing corresponding PCI config + space bytes, to boost the performance. In the meanwhile, it deprecated the + legacy way via reading/writing sysfile supported by kernel module of igb_uio. + Resolved Issues ---------------
drivers/net/i40e/i40e_ethdev.c +62 -3
95 lines not on this page · raw message
Signature · 1 line
1.9.3
Quoted 18 lines · Helin Zhang
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
Signed-off-by Helin Zhang <[email protected]>--- doc/guides/rel_notes/release_16_04.rst | 6 ++++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-)v2:
- Changed the type of return value ofi40e_enable_extended_tag()to 'void'.doc/guides/rel_notes/release_16_04.rst +0
-0
doc/guides/rel_notes/release_16_04.rst This section should contain new features added in this release. Sample format: · line 54
Quoted 9 lines
doc/guides/rel_notes/release_16_04.rst +6
-0@@ -46,6 +46,12 @@ This section should contain new features added in this release. Sample format: * **Added vhost-user live migration support.** +* **i40e: Enabled extended tag.** + + It enabled extended tag by checking and writing corresponding PCI config + space bytes, to boost the performance. In the meanwhile, it deprecated the + legacy way via reading/writing sysfile supported by kernel module of igb_uio. +
Hi Helin,
does this really need to go into the release notes? Is it a user-visible change that affects the user experience in any way?
/Bruce
Quoted 40 lines
-----Original Message-----
From: Richardson, Bruce
Sent: Tuesday, February 23, 2016 6:45 PM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 1/3] i40e: enable extended tagQuoted 8 lines · Helin Zhang
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
Signed-off-by Helin Zhang <[email protected]>--- doc/guides/rel_notes/release_16_04.rst | 6 ++++ drivers/net/i40e/i40e_ethdev.c | 65++++++++++++++++++++++++++++++++--
doc/guides/rel_notes/release_16_04.rst This section should contain new features added in this
Quoted 11 lines
2 files changed, 68 insertions(+), 3 deletions(-)v2:
- Changed the type of return value ofi40e_enable_extended_tag()to 'void'.doc/guides/rel_notes/release_16_04.rst +0
-0@@ -46,6 +46,12 @@ This section should contain new features added in thisrelease. Sample format:
doc/guides/rel_notes/release_16_04.rst This section should contain new features added in this release. Sample format:
Quoted 8 lines
doc/guides/rel_notes/release_16_04.rst +5
-0* **Added vhost-user live migration support.** +* **i40e: Enabled extended tag.** + + It enabled extended tag by checking and writing corresponding PCI + config space bytes, to boost the performance. In the meanwhile, it + deprecated the legacy way via reading/writing sysfile supported by kernelmodule of
igb_uio.
Quoted 6 lines
doc/guides/rel_notes/release_16_04.rst This section should contain new features added in this · line 53
Quoted 1 line
doc/guides/rel_notes/release_16_04.rst +1
-0+Hi Helin,
does this really need to go into the release notes? Is it a user-visible change that affects the user experience in any way?
Previously we enable it in eal via igb_uio sys file (by default, it is disabled), which was deprecated now, and will be removed from next release. All now added into i40e PMD init only.
Yes, user might see the performance boost without doing anything, which is different from previous version of DPDK.
I think it should be mentioned somewhere. Any better idea? Thanks,
Helin
Quoted 2 lines
/Bruce
PATCH v2 2/3 eal: remove pci config of extended tag
In reply to Helin ZhangRemove pci configuration of 'extended tag' and 'max read request size', as they are not required by all devices and it lets PMD to configure them if neccessary.
In addition, 'pci_config_space_set()' is deprecated.
--- config/common_linuxapp | 1 + lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 4 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++------------------------------ 4 files changed, 10 insertions(+), 92 deletions(-)
v2:
- Fixed the compile warnings.
config/common_linuxapp +1 -0
@@ -110,6 +110,7 @@ CONFIG_RTE_EAL_PMD_PATH="" # # Special configurations in PCI Config Space for high performance +# They are all deprecated, and will be removed later. # CONFIG_RTE_PCI_CONFIG=n CONFIG_RTE_PCI_EXTENDED_TAG=""
lib/librte_eal/common/eal_common_pci.c +0 -7
@@ -180,13 +180,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d }if (dr->drv_flags &RTE_PCI_DRV_NEED_MAPPING ) { -#ifdef RTE_PCI_CONFIG -/* -* Set PCIe config space for high performance. -* Return value can be ignored. -*/ -pci_config_space_set (dev); -#endif /* map resources for devices that use igb_uio */ ret =rte_eal_pci_map_device (dev);if (ret !=0 )
lib/librte_eal/common/include/rte_pci.h +3 -1
@@ -580,12 +580,14 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,#ifdef RTE_PCI_CONFIG /** * Set special config space registers for performance purpose. +* It is deprecated, as all configurations have been moved into +* each PMDs respectively. * * @param dev * A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set (struct rte_pci_device *dev); +void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated;#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/eal/eal_pci.c +6 -84
98 lines not on this page · raw message
Signature · 1 line
1.9.3
Re: [PATCH v2 2/3] eal: remove pci config of extended tag
2016-02-22 11:59, Helin Zhang:
Quoted 5 lines
lib/librte_eal/common/include/rte_pci.h +0
-0@@ -580,12 +580,14 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,#ifdef RTE_PCI_CONFIG /**
lib/librte_eal/common/include/rte_pci.h void rte_eal_pci_ioport_write(struct rte_pci_ioport *p, · line 590
Quoted 10 lines
lib/librte_eal/common/include/rte_pci.h +3
-1* Set special config space registers for performance purpose. +* It is deprecated, as all configurations have been moved into +* each PMDs respectively. * * @param dev * A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set (struct rte_pci_device *dev); +void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated;
There is a missing prototype error because
#include <rte_common.h> is missing.
PATCH v2 3/3 igb_uio: deprecate sys files
In reply to Helin ZhangIt deprecated sys files of 'extended_tag' and 'max_read_request_size', and announced the planned ABI changes of them.
--- doc/guides/linux_gsg/enable_func.rst | 47 ------------------- doc/guides/nics/i40e.rst | 76 +++++++++++++++++++++++++++++++ doc/guides/rel_notes/deprecation.rst | 6 +++ lib/librte_eal/common/include/rte_pci.h | 2 +- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 ++++------------------------- 5 files changed, 91 insertions(+), 112 deletions(-) create mode 100644 doc/guides/nics/i40e.rst
v2:
- Kept the sys files as they were, and added ABI change announcement for them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
doc/guides/linux_gsg/enable_func.rst +0 -47
@@ -176,50 +176,3 @@ Also, if ``INTEL_IOMMU_DEFAULT_ON`` is not set in the kernel, the ``intel_iommu= This ensures that the Intel IOMMU is being initialized as expected. Please note that while using ``iommu=pt`` is compulsory for ``igb_uio driver``, the ``vfio-pci`` driver can actually work with both ``iommu=pt`` and ``iommu=on``. - -High Performance of Small Packets on 40G NIC --------------------------------------------- - -As there might be firmware fixes for performance enhancement in latest version -of firmware image, the firmware update might be needed for getting high performance. -Check with the local Intel's Network Division application engineers for firmware updates. -The base driver to support firmware version of FVL3E will be integrated in the next -DPDK release, so currently the validated firmware version is 4.2.6. - -Enabling Extended Tag and Setting Max Read Request Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -PCI configurations of ``extended_tag`` and max _read_requ st_size have big impacts on performance of small packets on 40G NIC. -Enabling extended_tag and setting ``max_read_request_size`` to small size such as 128 bytes provide great helps to high performance of small packets. - -* These can be done in some BIOS implementations. - -* For other BIOS implementations, PCI configurations can be changed by using command of ``setpci``, or special configurations in DPDK config file of ``common_linux``. - - * Bits 7:5 at address of 0xA8 of each PCI device is used for setting the max_read_request_size, - and bit 8 of 0xA8 of each PCI device is used for enabling/disabling the extended_tag. - lspci and setpci can be used to read the values of 0xA8 and then write it back after being changed. - - * In config file of common_linux, below three configurations can be changed for the same purpose. - - ``CONFIG_RTE_PCI_CONFIG`` - - ``CONFIG_RTE_PCI_EXTENDED_TAG`` - - ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` - -Use 16 Bytes RX Descriptor Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -As i40e PMD supports both 16 and 32 bytes RX descriptor sizes, and 16 bytes size can provide helps to high performance of small packets. -Configuration of ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC`` in config files can be changed to use 16 bytes size RX descriptors. - -High Performance and per Packet Latency Tradeoff -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Due to the hardware design, the interrupt signal inside NIC is needed for per -packet descriptor write-back. The minimum interval of interrupts could be set -at compile time by ``CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL`` in configuration files. -Though there is a default configuration, the interval could be tuned by the -users with that configuration item depends on what the user cares about more, -performance or per packet latency.
doc/guides/nics/i40e.rst new file +76 -0
76 lines not on this page · raw message
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -49,3 +49,9 @@ Deprecation Notices commands (such as RETA update in testpmd). This should impact CMDLINE_PARSE_RESULT_BUFSIZE, STR_TOKEN_SIZE and RDLINE_BUF_SIZE. It should be integrated in release 2.3. + +* ABI changes are planned for release 16.07. The eal function of + pci_config_space_set is deprecated in release 16.04, and will be removed + from 16.07. Macros of CONFIG_RTE_PCI_CONFIG, CONFIG_RTE_PCI_EXTENDED_TAG and + CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE will be removed. sysfile of extended_tag + and max_read_request_size created by kernel module igb_uio will be removed.
lib/librte_eal/common/include/rte_pci.h +1 -1
@@ -587,7 +587,7 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,* A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated; +void pci_config_space_set (struct rte_pci_device *dev);#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +8 -64
106 lines not on this page · raw message
Signature · 1 line
1.9.3
Re: [PATCH v2 3/3] igb_uio: deprecate sys files
2016-02-22 11:59, Helin Zhang:
doc/guides/nics/i40e.rst
Quoted 2 lines
doc/guides/nics/i40e.rst new file +0
-0
This file is not included in the index.
lib/librte_eal/common/include/rte_pci.h void rte_eal_pci_ioport_write(struct rte_pci_ioport *p, · line 590
Quoted 8 lines
lib/librte_eal/common/include/rte_pci.h +1
-1@@ -587,7 +587,7 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,* A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated; +void pci_config_space_set (struct rte_pci_device *dev);
Why the deprecated attribute is now removed?
Re: [PATCH v2 3/3] igb_uio: deprecate sys files
In reply to Helin Zhang2016-02-22 11:59, Helin Zhang:
Quoted 3 lines
It deprecated sys files of '
extended_tag' and 'max_read_request_size', and announced the planned ABI changes of them.
[...]
Quoted 1 line
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
This change is not related to extended tag only. Let's move the docs after Jingjing have created i40e.rst.
Re: [PATCH v2 0/3] enable extended tag for i40e
In reply to Helin ZhangQuoted 21 lines
-----Original Message-----
From: Zhang, Helin
Sent: Monday, February 22, 2016 12:00 PM
To: [email protected]
Cc: [email protected]; Wu, Jingjing; [email protected]; Zhang, Helin
Subject: [PATCH v2 0/3] enable extended tag for i40eIt enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in
igb_uio, and eal lib.v2:
- Changed the type of return value ofi40e_enable_extended_tag()to 'void'.
- Fixed the compile warnings.
- Kept the sys files as they were, and added ABI change announcement for
them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
Quoted 4 lines
Helin Zhang (3):
i40e: enable extended tag
eal: remove pci config of extended tag
igb_uio: deprecate sys files
Agree to add a doc i40e.rst to record i40e specific stuff.
I also sent a patch http://dpdk.org/dev/patchwork/patch/10173/, it will be great if they can be merged. :)
Quoted 3 lines
--
1.9.3
v3 cover enable extended tag for i40e
In reply to Helin ZhangIt enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in igb_uio, and eal lib.
v3:
- fix build with deprecated attribute
- keep deprecated attribute
- reword release notes a bit
- revert doc move from v2
- better split the patches
v2:
- Changed the type of return value of i40e_enable_extended_tag() to 'void'.
- Fixed the compile warnings.
- Kept the sys files as they were, and added ABI change announcement for them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
Helin Zhang (3):
i40e: enable extended tag
pci: remove config of extended tag
igb_uio: deprecate extended tag
config/common_base | 1 + doc/guides/linux_gsg/enable_func.rst | 27 ++++------ doc/guides/rel_notes/deprecation.rst | 7 +++ doc/guides/rel_notes/release_16_04.rst | 6 +++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++-- lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 5 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++---------------------------- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 +++---------------------- 9 files changed, 104 insertions(+), 176 deletions(-)
Signature · 1 line
2.7.0
PATCH v3 1/3 i40e: enable extended tag
From: Helin Zhang <[email protected]>
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
--- doc/guides/linux_gsg/enable_func.rst | 3 ++ doc/guides/rel_notes/release_16_04.rst | 6 ++++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++++++++++++++-- 3 files changed, 71 insertions(+), 3 deletions(-)
doc/guides/linux_gsg/enable_func.rst +3 -0
@@ -208,6 +208,9 @@ Enabling extended_tag and setting ``max_read_request_size`` to small size such a ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` +* From release 16.04, ``extended_tag`` is enabled by default during port + initialization, users don't need to care about that anymore. + Use 16 Bytes RX Descriptor Size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/rel_notes/release_16_04.rst +6 -0
@@ -57,6 +57,12 @@ This section should contain new features added in this release. Sample format: * **Added vhost-user live migration support.** +* **Enabled PCI extended tag for i40e.** + + It enabled extended tag by checking and writing corresponding PCI config + space bytes, to boost the performance. In the meanwhile, it deprecated the + legacy way via reading/writing sysfile supported by kernel module igb_uio. + Resolved Issues ---------------
drivers/net/i40e/i40e_ethdev.c +62 -3
95 lines not on this page · raw message
Signature · 1 line
2.7.0
PATCH v3 2/3 pci: remove config of extended tag
In reply to Thomas MonjalonFrom: Helin Zhang <[email protected]>
Remove pci configuration of 'extended tag' and 'max read request size', as they are not required by all devices and it lets PMD to configure them if necessary.
In addition, 'pci_config_space_set()' is deprecated.
--- config/common_base | 1 + doc/guides/rel_notes/deprecation.rst | 5 ++ lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 5 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++------------------------------ 5 files changed, 16 insertions(+), 92 deletions(-)
config/common_base +1 -0
@@ -102,6 +102,7 @@ CONFIG_RTE_EAL_PMD_PATH="" # # Special configurations in PCI Config Space for high performance +# They are all deprecated, and will be removed later. # CONFIG_RTE_PCI_CONFIG=n CONFIG_RTE_PCI_EXTENDED_TAG=""
doc/guides/rel_notes/deprecation.rst +5 -0
@@ -8,6 +8,11 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices ------------------- +* The EAL function pci_config_space_set is deprecated in release 16.04 + and will be removed from 16.07. + Macros CONFIG_RTE_PCI_CONFIG, CONFIG_RTE_PCI_EXTENDED_TAG and + CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE will be removed. + * The following fields have been deprecated in rte_eth_stats: ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff
lib/librte_eal/common/eal_common_pci.c +0 -7
@@ -180,13 +180,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d }if (dr->drv_flags &RTE_PCI_DRV_NEED_MAPPING ) { -#ifdef RTE_PCI_CONFIG -/* -* Set PCIe config space for high performance. -* Return value can be ignored. -*/ -pci_config_space_set (dev); -#endif /* map resources for devices that use igb_uio */ ret =rte_eal_pci_map_device (dev);if (ret !=0 )
lib/librte_eal/common/include/rte_pci.h +4 -1
@@ -578,14 +578,17 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p, const void *data, size_t len, off_t offset);#ifdef RTE_PCI_CONFIG +#include <rte_common.h> /** * Set special config space registers for performance purpose. +* It is deprecated, as all configurations have been moved into +* each PMDs respectively. * * @param dev * A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set (struct rte_pci_device *dev); +void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated;#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/eal/eal_pci.c +6 -84
98 lines not on this page · raw message
Signature · 1 line
2.7.0
PATCH v3 3/3 igb_uio: deprecate extended tag
In reply to Thomas MonjalonFrom: Helin Zhang <[email protected]>
It deprecates sys files of 'extended_tag' and
'max_read_request_size' which was not documented.
--- doc/guides/linux_gsg/enable_func.rst | 26 ++++------- doc/guides/rel_notes/deprecation.rst | 2 + lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 ++++--------------------------- 3 files changed, 18 insertions(+), 82 deletions(-)
doc/guides/linux_gsg/enable_func.rst +8 -18
@@ -186,27 +186,17 @@ Check with the local Intel's Network Division application engineers for firmware The base driver to support firmware version of FVL3E will be integrated in the next DPDK release, so currently the validated firmware version is 4.2.6. -Enabling Extended Tag and Setting Max Read Request Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Enabling Extended Tag +~~~~~~~~~~~~~~~~~~~~~ -PCI configurations of ``extended_tag`` and max _read_requ st_size have big impacts on performance of small packets on 40G NIC. -Enabling extended_tag and setting ``max_read_request_size`` to small size such as 128 bytes provide great helps to high performance of small packets. +PCI configuration of ``extended_tag`` has big impact on small packet size +performance of 40G ports. Enabling ``extended_tag`` can help 40G port to +achieve the best performance, especially for small packet size. -* These can be done in some BIOS implementations. +* Disabling/enabling ``extended_tag`` can be done in some BIOS implementations. -* For other BIOS implementations, PCI configurations can be changed by using command of ``setpci``, or special configurations in DPDK config file of ``common_linux``. - - * Bits 7:5 at address of 0xA8 of each PCI device is used for setting the max_read_request_size, - and bit 8 of 0xA8 of each PCI device is used for enabling/disabling the extended_tag. - lspci and setpci can be used to read the values of 0xA8 and then write it back after being changed. - - * In config file of common_linux, below three configurations can be changed for the same purpose. - - ``CONFIG_RTE_PCI_CONFIG`` - - ``CONFIG_RTE_PCI_EXTENDED_TAG`` - - ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` +* If BIOS does not enable it, and does not support changing it, tools + (e.g. ``setpci`` on Linux) can be used to enable or disable ``extended_tag``. * From release 16.04, ``extended_tag`` is enabled by default during port initialization, users don't need to care about that anymore.
doc/guides/rel_notes/deprecation.rst +2 -0
@@ -12,6 +12,8 @@ Deprecation Notices and will be removed from 16.07. Macros CONFIG_RTE_PCI_CONFIG, CONFIG_RTE_PCI_EXTENDED_TAG and CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE will be removed. + The /sys entries extended_tag and max_read_request_size created by igb_uio + will be removed. * The following fields have been deprecated in rte_eth_stats: ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss,
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +8 -64
106 lines not on this page · raw message
Signature · 1 line
2.7.0
Re: [PATCH v3 0/3] enable extended tag for i40e
In reply to Thomas Monjalon2016-03-08 19:38, Thomas Monjalon:
Quoted 10 lines
It enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in
igb_uio, and eal lib.v3:
- fix build with deprecated attribute
- keep deprecated attribute
- reword release notes a bit
- revert doc move from v2
- better split the patches
I've forgot the Acked-by: Jingjing Wu <[email protected]>
Helin, if you agree with this new revision, I'll apply it.
Re: [PATCH v3 0/3] enable extended tag for i40e
Quoted 21 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, March 9, 2016 2:41 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v3 0/3] enable extended tag for i40e2016-03-08 19:38, Thomas Monjalon:
Quoted 10 lines
It enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in
igb_uio, and eal lib.v3:
- fix build with deprecated attribute
- keep deprecated attribute
- reword release notes a bit
- revert doc move from v2
- better split the patches
Quoted 3 lines
I've forgot the Acked-by: Jingjing Wu <[email protected]>
Helin, if you agree with this new revision, I'll apply it.
Thomas
Yes, that's what I expected to be applied. Please apply it, thank you very much!
Regards,
Helin
Re: [PATCH v3 0/3] enable extended tag for i40e
2016-03-09 00:48, Zhang, Helin:
Quoted 20 lines
Quoted 20 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, March 9, 2016 2:41 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v3 0/3] enable extended tag for i40e2016-03-08 19:38, Thomas Monjalon:
Quoted 10 lines
It enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in
igb_uio, and eal lib.v3:
- fix build with deprecated attribute
- keep deprecated attribute
- reword release notes a bit
- revert doc move from v2
- better split the patches
Quoted 7 lines
Quoted 3 lines
I've forgot the Acked-by: Jingjing Wu <[email protected]>
Helin, if you agree with this new revision, I'll apply it.
Thomas
Yes, that's what I expected to be applied. Please apply it, thank you very much!
Note that reworking these patches was an investment for future, to show how better split patches ;)
Thomas Monjalon
AppliedRe: [PATCH v3 0/3] enable extended tag for i40e
In reply to Zhang, Helin2016-03-09 00:48, Zhang, Helin:
Quoted 12 lines
Quoted 12 lines
2016-03-08 19:38, Thomas Monjalon:
Quoted 10 lines
It enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in
igb_uio, and eal lib.v3:
- fix build with deprecated attribute
- keep deprecated attribute
- reword release notes a bit
- revert doc move from v2
- better split the patches
Quoted 7 lines
Quoted 3 lines
I've forgot the Acked-by: Jingjing Wu <[email protected]>
Helin, if you agree with this new revision, I'll apply it.
Thomas
Yes, that's what I expected to be applied. Please apply it, thank you very much!
Applied, thanks
PATCH 3/3 igb_uio: remove sys files for setting pci config space
In reply to Helin ZhangSys files of 'extended_tag' and 'max_read_request_size' are useless, as nobody will use them for setting pci config space.
--- doc/guides/linux_gsg/enable_func.rst | 22 ------ doc/guides/rel_notes/deprecation.rst | 3 + doc/guides/rel_notes/release_2_3.rst | 6 ++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 108 ------------------------------ 4 files changed, 9 insertions(+), 130 deletions(-)
doc/guides/linux_gsg/enable_func.rst +0 -22
@@ -186,28 +186,6 @@ Check with the local Intel's Network Division application engineers for firmware The base driver to support firmware version of FVL3E will be integrated in the next DPDK release, so currently the validated firmware version is 4.2.6. -Enabling Extended Tag and Setting Max Read Request Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -PCI configurations of ``extended_tag`` and max _read_requ st_size have big impacts on performance of small packets on 40G NIC. -Enabling extended_tag and setting ``max_read_request_size`` to small size such as 128 bytes provide great helps to high performance of small packets. - -* These can be done in some BIOS implementations. - -* For other BIOS implementations, PCI configurations can be changed by using command of ``setpci``, or special configurations in DPDK config file of ``common_linux``. - - * Bits 7:5 at address of 0xA8 of each PCI device is used for setting the max_read_request_size, - and bit 8 of 0xA8 of each PCI device is used for enabling/disabling the extended_tag. - lspci and setpci can be used to read the values of 0xA8 and then write it back after being changed. - - * In config file of common_linux, below three configurations can be changed for the same purpose. - - ``CONFIG_RTE_PCI_CONFIG`` - - ``CONFIG_RTE_PCI_EXTENDED_TAG`` - - ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` - Use 16 Bytes RX Descriptor Size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/rel_notes/deprecation.rst +3 -0
@@ -49,3 +49,6 @@ Deprecation Notices commands (such as RETA update in testpmd). This should impact CMDLINE_PARSE_RESULT_BUFSIZE, STR_TOKEN_SIZE and RDLINE_BUF_SIZE. It should be integrated in release 2.3. + +* The eal function of pci_config_space_set is deprecated in release 2.3, and + will be removed from 2.4.
doc/guides/rel_notes/release_2_3.rst +6 -0
@@ -16,6 +16,12 @@ Resolved Issues EAL ~~~ +* **eal/linux: removed sys files for pci config space.** + + Removed sys files of 'extended_tag' and 'max_read_request_size' and + their relavant operations, as they shouldn't be done in eal for all + possible devices. + Drivers ~~~~~~~
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0 -108
124 lines not on this page · raw message
Signature · 1 line
1.9.3
Re: [PATCH 3/3] igb_uio: remove sys files for setting pci config space
Quoted 192 lines · On Mon, 21 Dec 2015 10:38:06 +0800 Helin Zhang <[email protected]> wrote:
Sys files of '
extended_tag' and 'max_read_request_size' are useless, as nobody will use them for setting pci config space.Signed-off-by Helin Zhang <[email protected]>--- doc/guides/linux_gsg/enable_func.rst | 22 ------ doc/guides/rel_notes/deprecation.rst | 3 + doc/guides/rel_notes/release_2_3.rst | 6 ++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 108 ------------------------------ 4 files changed, 9 insertions(+), 130 deletions(-)doc/guides/linux_gsg/enable_func.rst +0
-22@@ -186,28 +186,6 @@ Check with the local Intel's Network Division application engineers for firmware The base driver to support firmware version of FVL3E will be integrated in the next DPDK release, so currently the validated firmware version is 4.2.6. -Enabling Extended Tag and Setting Max Read Request Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -PCI configurations of ``extended_tag`` and max _read_requ st_size have big impacts on performance of small packets on 40G NIC. -Enabling extended_tag and setting ``max_read_request_size`` to small size such as 128 bytes provide great helps to high performance of small packets. - -* These can be done in some BIOS implementations. - -* For other BIOS implementations, PCI configurations can be changed by using command of ``setpci``, or special configurations in DPDK config file of ``common_linux``. - - * Bits 7:5 at address of 0xA8 of each PCI device is used for setting the max_read_request_size, - and bit 8 of 0xA8 of each PCI device is used for enabling/disabling the extended_tag. - lspci and setpci can be used to read the values of 0xA8 and then write it back after being changed. - - * In config file of common_linux, below three configurations can be changed for the same purpose. - - ``CONFIG_RTE_PCI_CONFIG`` - - ``CONFIG_RTE_PCI_EXTENDED_TAG`` - - ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` - Use 16 Bytes RX Descriptor Size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~doc/guides/rel_notes/deprecation.rst +3
-0@@ -49,3 +49,6 @@ Deprecation Notices commands (such as RETA update in testpmd). This should impact CMDLINE_PARSE_RESULT_BUFSIZE, STR_TOKEN_SIZE and RDLINE_BUF_SIZE. It should be integrated in release 2.3. + +* The eal function of pci_config_space_set is deprecated in release 2.3, and + will be removed from 2.4.doc/guides/rel_notes/release_2_3.rst +6
-0@@ -16,6 +16,12 @@ Resolved Issues EAL ~~~ +* **eal/linux: removed sys files for pci config space.** + + Removed sys files of 'extended_tag' and 'max_read_request_size' and + their relavant operations, as they shouldn't be done in eal for all + possible devices. + Drivers ~~~~~~~lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-104@@ -40,15 +40,6 @@#include "compat.h" -#ifdef RTE_PCI_CONFIG -#define PCI_SYS_FILE_BUF_SIZE 10 -#define PCI_DEV_CAP_REG 0xA4 -#define PCI_DEV_CTRL_REG 0xA8 -#define PCI_DEV_CAP_EXT_TAG_MASK 0x20 -#define PCI_DEV_CTRL_EXT_TAG_SHIFT 8 -#define PCI_DEV_CTRL_EXT_TAG_MASK (1 << PCI_DEV_CTRL_EXT_TAG_SHIFT) -#endif -/** * A structure describing the private information for a uio device. */ @@ -90,109 +81,10 @@ store_max_vfs(struct device *dev, struct device_attribute *attr,return err ? err : count; } -#ifdef RTE_PCI_CONFIG -static ssize_t -show_extended_tag (struct device *dev,struct device_attribute *attr,char *buf) -{ -struct pci_dev *pci_dev =to_pci_dev (dev); -uint32_t val =0 ; - -pci_read_config_dword (pci_dev,PCI_DEV_CAP_REG , &val); -if (!(val &PCI_DEV_CAP_EXT_TAG_MASK ))/* Not supported */ -return snprintf (buf,PCI_SYS_FILE_BUF_SIZE ,"%s\n" ,"invalid" ); - - val =0 ; -pci_bus_read_config_dword (pci_dev->bus, pci_dev->devfn, -PCI_DEV_CTRL_REG , &val); - -return snprintf (buf,PCI_SYS_FILE_BUF_SIZE ,"%s\n" , - (val &PCI_DEV_CTRL_EXT_TAG_MASK ) ?"on" :"off" ); -} - -static ssize_t -store_extended_tag (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t count) -{ -struct pci_dev *pci_dev =to_pci_dev (dev); -uint32_t val =0 , enable; - -if (strncmp (buf,"on" ,2 ) ==0 ) - enable =1 ; -else if (strncmp (buf,"off" ,3 ) ==0 ) - enable =0 ; -else -return -EINVAL ; - -pci_cfg_access_lock (pci_dev); -pci_bus_read_config_dword (pci_dev->bus, pci_dev->devfn, -PCI_DEV_CAP_REG , &val); -if (!(val &PCI_DEV_CAP_EXT_TAG_MASK )) {/* Not supported */ -pci_cfg_access_unlock (pci_dev); -return -EPERM ; - } - - val =0 ; -pci_bus_read_config_dword (pci_dev->bus, pci_dev->devfn, -PCI_DEV_CTRL_REG , &val); -if (enable) - val |=PCI_DEV_CTRL_EXT_TAG_MASK ; -else - val &= ~PCI_DEV_CTRL_EXT_TAG_MASK ; -pci_bus_write_config_dword (pci_dev->bus, pci_dev->devfn, -PCI_DEV_CTRL_REG , val); -pci_cfg_access_unlock (pci_dev); - -return count; -} - -static ssize_t -show_max_read_request_size (struct device *dev, -struct device_attribute *attr, -char *buf) -{ -struct pci_dev *pci_dev =to_pci_dev (dev); -int val =pcie_get_readrq (pci_dev); - -return snprintf (buf,PCI_SYS_FILE_BUF_SIZE ,"%d\n" , val); -} - -static ssize_t -store_max_read_request_size (struct device *dev, -struct device_attribute *attr, -const char *buf, -size_t count) -{ -struct pci_dev *pci_dev =to_pci_dev (dev); -unsigned long size =0 ; -int ret; - -if (0 !=kstrtoul (buf,0 , &size)) -return -EINVAL ; - - ret =pcie_set_readrq (pci_dev, (int )size); -if (ret <0 ) -return ret; - -return count; -} -#endif - static DEVICE_ATTR(max_vfs, S_IRUGO | S_IWUSR, show_max_vfs, store_max_vfs); -#ifdef RTE_PCI_CONFIG -static DEVICE_ATTR(extended_tag, S_IRUGO | S_IWUSR, show_extended_tag, - store_extended_tag); -static DEVICE_ATTR(max_read_request_size, S_IRUGO | S_IWUSR, - show_max_read_request_size, store_max_read_request_size); -#endif
lib/librte_eal/linuxapp/igb_uio/igb_uio.c store_max_vfs(struct device *dev, struct device_attribute *attr, · line 90
Quoted 10 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-4static struct attribute *dev_attrs[] = { &dev_attr_max_vfs.attr, -#ifdef RTE_PCI_CONFIG - &dev_attr_extended_tag.attr, - &dev_attr_max_read_request_size.attr, -#endifNULL , };
Agreed, the current way was a mess and it is always possible to change pci settings easier with setpci anyway.
v2 cover enable extended tag for i40e
In reply to Helin ZhangIt enables 'extended tag' for i40e devices only during its port initialization, which is key for 40G performance. It also deprecates the similar in igb_uio, and eal lib.
v2:
- Changed the type of return value of i40e_enable_extended_tag() to 'void'.
- Fixed the compile warnings.
- Kept the sys files as they were, and added ABI change announcement for them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
Helin Zhang (3):
i40e: enable extended tag
eal: remove pci config of extended tag
igb_uio: deprecate sys files
config/common_linuxapp | 1 + doc/guides/linux_gsg/enable_func.rst | 47 ---------------- doc/guides/nics/i40e.rst | 76 ++++++++++++++++++++++++++ doc/guides/rel_notes/deprecation.rst | 6 +++ doc/guides/rel_notes/release_16_04.rst | 6 +++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++-- lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 2 + lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++---------------------------- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 +++---------------------- 10 files changed, 167 insertions(+), 205 deletions(-) create mode 100644 doc/guides/nics/i40e.rst
Signature · 1 line
1.9.3
PATCH v2 1/3 i40e: enable extended tag
PCIe feature of 'Extended Tag' is important for 40G performance. It adds its enabling during each port initialization, to ensure the high performance.
--- doc/guides/rel_notes/release_16_04.rst | 6 ++++ drivers/net/i40e/i40e_ethdev.c | 65 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-)
v2:
- Changed the type of return value of i40e_enable_extended_tag() to 'void'.
doc/guides/rel_notes/release_16_04.rst +6 -0
@@ -46,6 +46,12 @@ This section should contain new features added in this release. Sample format: * **Added vhost-user live migration support.** +* **i40e: Enabled extended tag.** + + It enabled extended tag by checking and writing corresponding PCI config + space bytes, to boost the performance. In the meanwhile, it deprecated the + legacy way via reading/writing sysfile supported by kernel module of igb_uio. + Resolved Issues ---------------
drivers/net/i40e/i40e_ethdev.c +62 -3
95 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH v2 2/3 eal: remove pci config of extended tag
In reply to Helin ZhangRemove pci configuration of 'extended tag' and 'max read request size', as they are not required by all devices and it lets PMD to configure them if neccessary.
In addition, 'pci_config_space_set()' is deprecated.
--- config/common_linuxapp | 1 + lib/librte_eal/common/eal_common_pci.c | 7 --- lib/librte_eal/common/include/rte_pci.h | 4 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 90 +++------------------------------ 4 files changed, 10 insertions(+), 92 deletions(-)
v2:
- Fixed the compile warnings.
config/common_linuxapp +1 -0
@@ -110,6 +110,7 @@ CONFIG_RTE_EAL_PMD_PATH="" # # Special configurations in PCI Config Space for high performance +# They are all deprecated, and will be removed later. # CONFIG_RTE_PCI_CONFIG=n CONFIG_RTE_PCI_EXTENDED_TAG=""
lib/librte_eal/common/eal_common_pci.c +0 -7
@@ -180,13 +180,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d }if (dr->drv_flags &RTE_PCI_DRV_NEED_MAPPING ) { -#ifdef RTE_PCI_CONFIG -/* -* Set PCIe config space for high performance. -* Return value can be ignored. -*/ -pci_config_space_set (dev); -#endif /* map resources for devices that use igb_uio */ ret =rte_eal_pci_map_device (dev);if (ret !=0 )
lib/librte_eal/common/include/rte_pci.h +3 -1
@@ -580,12 +580,14 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,#ifdef RTE_PCI_CONFIG /** * Set special config space registers for performance purpose. +* It is deprecated, as all configurations have been moved into +* each PMDs respectively. * * @param dev * A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set (struct rte_pci_device *dev); +void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated;#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/eal/eal_pci.c +6 -84
98 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH v2 3/3 igb_uio: deprecate sys files
In reply to Helin ZhangIt deprecated sys files of 'extended_tag' and 'max_read_request_size', and announced the planned ABI changes of them.
--- doc/guides/linux_gsg/enable_func.rst | 47 ------------------- doc/guides/nics/i40e.rst | 76 +++++++++++++++++++++++++++++++ doc/guides/rel_notes/deprecation.rst | 6 +++ lib/librte_eal/common/include/rte_pci.h | 2 +- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 72 ++++------------------------- 5 files changed, 91 insertions(+), 112 deletions(-) create mode 100644 doc/guides/nics/i40e.rst
v2:
- Kept the sys files as they were, and added ABI change announcement for them.
- Moved high performance part of i40e from 'GSG' to a new for .nics'.
doc/guides/linux_gsg/enable_func.rst +0 -47
@@ -176,50 +176,3 @@ Also, if ``INTEL_IOMMU_DEFAULT_ON`` is not set in the kernel, the ``intel_iommu= This ensures that the Intel IOMMU is being initialized as expected. Please note that while using ``iommu=pt`` is compulsory for ``igb_uio driver``, the ``vfio-pci`` driver can actually work with both ``iommu=pt`` and ``iommu=on``. - -High Performance of Small Packets on 40G NIC --------------------------------------------- - -As there might be firmware fixes for performance enhancement in latest version -of firmware image, the firmware update might be needed for getting high performance. -Check with the local Intel's Network Division application engineers for firmware updates. -The base driver to support firmware version of FVL3E will be integrated in the next -DPDK release, so currently the validated firmware version is 4.2.6. - -Enabling Extended Tag and Setting Max Read Request Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -PCI configurations of ``extended_tag`` and max _read_requ st_size have big impacts on performance of small packets on 40G NIC. -Enabling extended_tag and setting ``max_read_request_size`` to small size such as 128 bytes provide great helps to high performance of small packets. - -* These can be done in some BIOS implementations. - -* For other BIOS implementations, PCI configurations can be changed by using command of ``setpci``, or special configurations in DPDK config file of ``common_linux``. - - * Bits 7:5 at address of 0xA8 of each PCI device is used for setting the max_read_request_size, - and bit 8 of 0xA8 of each PCI device is used for enabling/disabling the extended_tag. - lspci and setpci can be used to read the values of 0xA8 and then write it back after being changed. - - * In config file of common_linux, below three configurations can be changed for the same purpose. - - ``CONFIG_RTE_PCI_CONFIG`` - - ``CONFIG_RTE_PCI_EXTENDED_TAG`` - - ``CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE`` - -Use 16 Bytes RX Descriptor Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -As i40e PMD supports both 16 and 32 bytes RX descriptor sizes, and 16 bytes size can provide helps to high performance of small packets. -Configuration of ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC`` in config files can be changed to use 16 bytes size RX descriptors. - -High Performance and per Packet Latency Tradeoff -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Due to the hardware design, the interrupt signal inside NIC is needed for per -packet descriptor write-back. The minimum interval of interrupts could be set -at compile time by ``CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL`` in configuration files. -Though there is a default configuration, the interval could be tuned by the -users with that configuration item depends on what the user cares about more, -performance or per packet latency.
doc/guides/nics/i40e.rst new file +76 -0
76 lines not on this page · raw message
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -49,3 +49,9 @@ Deprecation Notices commands (such as RETA update in testpmd). This should impact CMDLINE_PARSE_RESULT_BUFSIZE, STR_TOKEN_SIZE and RDLINE_BUF_SIZE. It should be integrated in release 2.3. + +* ABI changes are planned for release 16.07. The eal function of + pci_config_space_set is deprecated in release 16.04, and will be removed + from 16.07. Macros of CONFIG_RTE_PCI_CONFIG, CONFIG_RTE_PCI_EXTENDED_TAG and + CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE will be removed. sysfile of extended_tag + and max_read_request_size created by kernel module igb_uio will be removed.
lib/librte_eal/common/include/rte_pci.h +1 -1
@@ -587,7 +587,7 @@ void rte_eal_pci_ioport_write(struct rte_pci_ioport *p,* A pointer to a rte_pci_device structure describing the device * to use */ -void pci_config_space_set(struct rte_pci_device *dev) __rte_deprecated; +void pci_config_space_set (struct rte_pci_device *dev);#endif /* RTE_PCI_CONFIG */ #ifdef __cplusplus
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +8 -64
106 lines not on this page · raw message
Signature · 1 line
1.9.3