#
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
#
ad5050e4 |
| 24-Sep-2021 |
Wenwu Ma <wenwux.ma@intel.com> |
examples/vhost: fix use after free on drain
When a vdev is removed in destroy_device function, the corresponding vhost TX buffer will also be freed, but the vhost TX buffer may still be used in the
examples/vhost: fix use after free on drain
When a vdev is removed in destroy_device function, the corresponding vhost TX buffer will also be freed, but the vhost TX buffer may still be used in the drain_vhost function, which will cause an error of heap-use-after-free. Therefore, before accessing vhost TX buffer, we need to check whether the vdev has been removed, if so, let's skip this vdev.
Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path") Cc: stable@dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
b563c142 |
| 18-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_in
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_info.max_mtu' or 'dev_info.max_rx_pktlen'.
And instead of application setting this flag explicitly to enable jumbo frames, this can be deduced by driver by comparing requested 'mtu' to 'RTE_ETHER_MTU'.
Removing this additional configuration for simplification.
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Huisong Li <lihuisong@huawei.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
show more ...
|
#
1bb4a528 |
| 18-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_p
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_pkt_len' field of the config struct 'struct rte_eth_conf'.
Also 'rte_eth_dev_set_mtu()' API can be used to set the MTU, and result stored into '(struct rte_eth_dev)->data->mtu'.
These two APIs are related but they work in a disconnected way, they store the set values in different variables which makes hard to figure out which one to use, also having two different method for a related functionality is confusing for the users.
Other issues causing confusion is: * maximum transmission unit (MTU) is payload of the Ethernet frame. And 'max_rx_pkt_len' is the size of the Ethernet frame. Difference is Ethernet frame overhead, and this overhead may be different from device to device based on what device supports, like VLAN and QinQ. * 'max_rx_pkt_len' is only valid when application requested jumbo frame, which adds additional confusion and some APIs and PMDs already discards this documented behavior. * For the jumbo frame enabled case, 'max_rx_pkt_len' is an mandatory field, this adds configuration complexity for application.
As solution, both APIs gets MTU as parameter, and both saves the result in same variable '(struct rte_eth_dev)->data->mtu'. For this 'max_rx_pkt_len' updated as 'mtu', and it is always valid independent from jumbo frame.
For 'rte_eth_dev_configure()', 'dev->data->dev_conf.rxmode.mtu' is user request and it should be used only within configure function and result should be stored to '(struct rte_eth_dev)->data->mtu'. After that point both application and PMD uses MTU from this variable.
When application doesn't provide an MTU during 'rte_eth_dev_configure()' default 'RTE_ETHER_MTU' value is used.
Additional clarification done on scattered Rx configuration, in relation to MTU and Rx buffer size. MTU is used to configure the device for physical Rx/Tx size limitation, Rx buffer is where to store Rx packets, many PMDs use mbuf data buffer size as Rx buffer size. PMDs compare MTU against Rx buffer size to decide enabling scattered Rx or not. If scattered Rx is not supported by device, MTU bigger than Rx buffer size should fail.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Huisong Li <lihuisong@huawei.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
show more ...
|
#
04d43857 |
| 07-Oct-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr`
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr` as a macro. Rename `s_addr` to `src_addr` and `d_addr` to `dst_addr` to avoid the conflict and remove the workaround. Deprecation notice: https://mails.dpdk.org/archives/dev/2021-July/215270.html
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
#
abeb8652 |
| 20-Aug-2021 |
Jiayu Hu <jiayu.hu@intel.com> |
vhost: remove copy threshold for async path
Copy threshold has been introduced in async vhost data path to select the appropriate copy engine to do copies for higher efficiency.
However, it may cau
vhost: remove copy threshold for async path
Copy threshold has been introduced in async vhost data path to select the appropriate copy engine to do copies for higher efficiency.
However, it may cause packets ordering issues and also introduces performance unpredictability.
Therefore, this patch removes copy threshold support in async vhost data path.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com> Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
a7db3afc |
| 25-Aug-2021 |
Aman Deep Singh <aman.deep.singh@intel.com> |
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: A
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: Aman Deep Singh <aman.deep.singh@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
c2c4f87b |
| 25-Aug-2021 |
Aman Deep Singh <aman.deep.singh@intel.com> |
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower ca
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower case MAC address, the user may need to make a change in such test case after this patch.
Signed-off-by: Aman Deep Singh <aman.deep.singh@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
b9f23bee |
| 23-Jul-2021 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: handle memory hotplug for async vhost
When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the g
examples/vhost: handle memory hotplug for async vhost
When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory.
To accomplish that, we need to do these changes in the vhost sample: 1. add inflight packets count. 2. add vring_state_changed() callback. 3. add inflight packets clear process in destroy_device() and vring_state_changed().
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
acbc3888 |
| 19-Jul-2021 |
Jiayu Hu <jiayu.hu@intel.com> |
vhost: rework async configuration structure
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future us
vhost: rework async configuration structure
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future usage.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
ca7036b4 |
| 03-May-2021 |
David Marchand <david.marchand@redhat.com> |
vhost: fix offload flags in Rx path
The vhost library currently configures Tx offloading (PKT_TX_*) on any packet received from a guest virtio device which asks for some offloading.
This is problem
vhost: fix offload flags in Rx path
The vhost library currently configures Tx offloading (PKT_TX_*) on any packet received from a guest virtio device which asks for some offloading.
This is problematic, as Tx offloading is something that the application must ask for: the application needs to configure devices to support every used offloads (ip, tcp checksumming, tso..), and the various l2/l3/l4 lengths must be set following any processing that happened in the application itself.
On the other hand, the received packets are not marked wrt current packet l3/l4 checksumming info.
Copy virtio rx processing to fix those offload flags with some differences: - accept VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP, - ignore anything but the VIRTIO_NET_HDR_F_NEEDS_CSUM flag (to comply with the virtio spec),
Some applications might rely on the current behavior, so it is left untouched by default. A new RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS flag is added to enable the new behavior.
The vhost example has been updated for the new behavior: TSO is applied to any packet marked LRO.
Fixes: 859b480d5afd ("vhost: add guest offload setting") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
47afdbbe |
| 27-Apr-2021 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: fix overflow in argument parsing
Change the way passing args to fix potential overflow in args process.
Coverity issue: 363741 Fixes: 965b06f03582 ("examples/vhost: enhance getopt_l
examples/vhost: fix overflow in argument parsing
Change the way passing args to fix potential overflow in args process.
Coverity issue: 363741 Fixes: 965b06f03582 ("examples/vhost: enhance getopt_long usage")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
10aa3757 |
| 15-Apr-2021 |
Chengchang Tang <tangchengchang@huawei.com> |
examples: add eal cleanup to examples
According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.
This patch add rte_eal_cleanup to examples to encourage new use
examples: add eal cleanup to examples
According to the programming guide, the rte_eal_init should be used pairs with rte_eal_cleanup.
This patch add rte_eal_cleanup to examples to encourage new users of DPDK to use it.
Fixes: aec9c13c5257 ("eal: add function to release internal resources") Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver") Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines") Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Fixes: c5eebf85badc ("examples/ntb: add example for NTB") Fixes: b77f66002812 ("examples/pipeline: add new example application") Fixes: edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA") Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
show more ...
|
#
965b06f0 |
| 04-Feb-2021 |
Ibtisam Tariq <ibtisam.tariq@emumba.com> |
examples/vhost: enhance getopt_long usage
Instead of using getopt_long return value, strcmp was used to compare the input parameters with the struct option array. This patch get rid of all those str
examples/vhost: enhance getopt_long usage
Instead of using getopt_long return value, strcmp was used to compare the input parameters with the struct option array. This patch get rid of all those strcmp by directly binding each longopt with an int enum. This is to improve readability and consistency in all examples.
Bugzilla ID: 238
Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
ee6e451f |
| 02-Feb-2021 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: fix potentially overflowing expression
Change the type of buff_idx from uint64_t to uint32_t to fix coverity issue.
Coverity issue: 366264 Fixes: a68ba8e0a6b6 ("examples/vhost: refa
examples/vhost: fix potentially overflowing expression
Change the type of buff_idx from uint64_t to uint32_t to fix coverity issue.
Coverity issue: 366264 Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
d4d4c6fe |
| 02-Feb-2021 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: remove async inflight packet counter
Remove async inflight packet counter since there is no need to keep tracking it. Increase MAX_ENQUEUED_SIZE to prevent packet segment number trac
examples/vhost: remove async inflight packet counter
Remove async inflight packet counter since there is no need to keep tracking it. Increase MAX_ENQUEUED_SIZE to prevent packet segment number tracking ring from being exhausted.
Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
a68ba8e0 |
| 12-Jan-2021 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: refactor vhost data path
Change the vm2vm data path to batch enqueue for better performance. Support latest async vhost API, refactor vhost async data path, replace rte_atomicNN_xxx
examples/vhost: refactor vhost data path
Change the vm2vm data path to batch enqueue for better performance. Support latest async vhost API, refactor vhost async data path, replace rte_atomicNN_xxx to __atomic_XXX and clean some codes.
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Jiayu Hu <jiayu.hu@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
1b7b2438 |
| 11-Jan-2021 |
Jiayu Hu <jiayu.hu@intel.com> |
vhost: enhance async enqueue for small packets
Async enqueue offloads large copies to DMA devices, and small copies are still performed by the CPU. However, it requires users to get enqueue complete
vhost: enhance async enqueue for small packets
Async enqueue offloads large copies to DMA devices, and small copies are still performed by the CPU. However, it requires users to get enqueue completed packets by rte_vhost_poll_enqueue_completed(), even if they are completed by the CPU when rte_vhost_submit_enqueue_burst() returns. This design incurs extra overheads of tracking completed pktmbufs and function calls, thus degrading performance on small packets.
This patch enhances async enqueue for small packets by enabling rte_vhost_submit_enqueue_burst() to return completed packets.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com> Tested-by: Yinan Wang <yinan.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
6e9a9d2a |
| 12-Nov-2020 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: fix ioat dependency
Fix vhost-switch compiling issue when ioat dependency is missing. Change 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file. Use 'RTE_RAW_IOAT' to cont
examples/vhost: fix ioat dependency
Fix vhost-switch compiling issue when ioat dependency is missing. Change 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file. Use 'RTE_RAW_IOAT' to control conditional compiling in source file. Clean some codes.
Fixes: abec60e7115d ("examples/vhost: support vhost async data path") Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Tested-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
2b7126f5 |
| 06-Nov-2020 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: check argument length
Add args length check before copying to fix the coverity issue.
Coverity issue: 363741 Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Si
examples/vhost: check argument length
Add args length check before copying to fix the coverity issue.
Coverity issue: 363741 Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
abec60e7 |
| 22-Oct-2020 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: support vhost async data path
This patch is to implement vhost DMA operation callbacks for CBDMA PMD and add vhost async data-path in vhost sample. With providing callback implementa
examples/vhost: support vhost async data path
This patch is to implement vhost DMA operation callbacks for CBDMA PMD and add vhost async data-path in vhost sample. With providing callback implementation for CBDMA, vswitch can leverage IOAT to accelerate vhost async data-path.
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
3a04ecb2 |
| 22-Oct-2020 |
Cheng Jiang <cheng1.jiang@intel.com> |
examples/vhost: add async vhost args parsing
This patch is to add async vhost driver arguments parsing function for CBDMA channel, DMA initiation function and args description. The meson build file
examples/vhost: add async vhost args parsing
This patch is to add async vhost driver arguments parsing function for CBDMA channel, DMA initiation function and args description. The meson build file is changed to fix dependency problem. With these arguments vhost device can be set to use CBDMA or CPU for enqueue operation and bind vhost device with specific CBDMA channel to accelerate data copy.
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
cb056611 |
| 15-Oct-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
T
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
The "--master-lcore" command line option is also deprecated and any usage will print a warning and use "--main-lcore" as replacement.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
9ea8d289 |
| 28-Sep-2020 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
examples/vhost: remove dequeue zero-copy support
Dequeue zero-copy feature is being removed from the Vhost library. This preliminary patch removes its uses in the Vhost example application.
Signed-
examples/vhost: remove dequeue zero-copy support
Dequeue zero-copy feature is being removed from the Vhost library. This preliminary patch removes its uses in the Vhost example application.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
ce6b8c31 |
| 11-Jun-2020 |
Sarosh Arif <sarosh.arif@emumba.com> |
examples: fix port mask parsing failure handling
Giving invalid or zero portmask as command line option to these applications will have an unexpected response. The reason behind this is that the ret
examples: fix port mask parsing failure handling
Giving invalid or zero portmask as command line option to these applications will have an unexpected response. The reason behind this is that the return value of function that parses portmask is stored in a variable whose datatype is unsigned int, hence returning -1 in case of zero or invalid portmask causes an unexpected behaviour. If we return 0 instead of -1 this issue can be resolved. The program already contains the functionality to print "invalid portmask" and program usage if zero is returned.
Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|