| #
a548f7d5 |
| 08-Apr-2022 |
Xuan Ding <[email protected]> |
examples/vhost: use API to check in-flight packets
In async data path, call rte_vhost_async_get_inflight_thread_unsafe() API to directly return the number of in-flight packets instead of maintaining
examples/vhost: use API to check in-flight packets
In async data path, call rte_vhost_async_get_inflight_thread_unsafe() API to directly return the number of in-flight packets instead of maintaining a local variable.
Signed-off-by: Xuan Ding <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3 |
|
| #
917229c2 |
| 04-Mar-2022 |
Wenwu Ma <[email protected]> |
examples/vhost: fix launch with physical port
dpdk-vhost will fail to launch with a 40G i40e port because there are not enough mbufs. This patch adds a new option --total-num-mbufs, through which th
examples/vhost: fix launch with physical port
dpdk-vhost will fail to launch with a 40G i40e port because there are not enough mbufs. This patch adds a new option --total-num-mbufs, through which the user can set larger mbuf pool to avoid this problem.
Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application") Cc: [email protected]
Signed-off-by: Wenwu Ma <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v22.03-rc2 |
|
| #
73d16d66 |
| 17-Feb-2022 |
Chengwen Feng <[email protected]> |
examples/vhost: remove DMA type option help info
The dma-type parameter was not supported when dmadev was integrated in vhost, but the help info still exists. This patch deletes it.
Fixes: 53d3f477
examples/vhost: remove DMA type option help info
The dma-type parameter was not supported when dmadev was integrated in vhost, but the help info still exists. This patch deletes it.
Fixes: 53d3f4778c1d ("vhost: integrate dmadev in asynchronous data-path")
Signed-off-by: Chengwen Feng <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v22.03-rc1 |
|
| #
53d3f477 |
| 09-Feb-2022 |
Jiayu Hu <[email protected]> |
vhost: integrate dmadev in asynchronous data-path
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dma
vhost: integrate dmadev in asynchronous data-path
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path.
Signed-off-by: Jiayu Hu <[email protected]> Signed-off-by: Sunil Pai G <[email protected]> Tested-by: Yvonne Yang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
7be78d02 |
| 29-Nov-2021 |
Josh Soref <[email protected]> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3 |
|
| #
25cf2630 |
| 17-Nov-2021 |
Ferruh Yigit <[email protected]> |
net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove the redundancy defining macro in the ether header. And updated drivers to use the new mac
net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove the redundancy defining macro in the ether header. And updated drivers to use the new macro.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Haiyue Wang <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Jiawen Wu <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc2 |
|
| #
5932109a |
| 04-Nov-2021 |
Chenbo Xia <[email protected]> |
examples/vhost: fix port init in mergeable mode
When the example starts in mergeable mode with an i40e port, it fails to launch because the examples use default mtu MAX_MTU to configure ethdev. The
examples/vhost: fix port init in mergeable mode
When the example starts in mergeable mode with an i40e port, it fails to launch because the examples use default mtu MAX_MTU to configure ethdev. The root cause is some devices have Ethernet frame overhead and then MAX_MTU will be larger than device's max mtu, so the ethdev configure will fail.
This patch checks the device's max MTU before setting the ethdev configuration. If the device has a max MTU, use that value to configure.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Reported-by: Xingguang He <[email protected]> Signed-off-by: Chenbo Xia <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
ab4bb424 |
| 02-Nov-2021 |
Maxime Coquelin <[email protected]> |
vhost: rename driver callbacks struct
As previously announced, this patch renames struct vhost_device_ops to struct rte_vhost_device_ops.
Signed-off-by: Maxime Coquelin <[email protected]>
vhost: rename driver callbacks struct
As previously announced, this patch renames struct vhost_device_ops to struct rte_vhost_device_ops.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc1 |
|
| #
daa02b5c |
| 15-Oct-2021 |
Olivier Matz <[email protected]> |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Sign
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| #
5b634932 |
| 15-Oct-2021 |
Olivier Matz <[email protected]> |
mbuf: mark old VLAN offload flags as deprecated
The flags PKT_TX_VLAN_PKT and PKT_TX_QINQ_PKT are marked as deprecated since commit 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags") (2017). But th
mbuf: mark old VLAN offload flags as deprecated
The flags PKT_TX_VLAN_PKT and PKT_TX_QINQ_PKT are marked as deprecated since commit 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags") (2017). But they were not using the RTE_DEPRECATED macro, because it did not exist at this time. Add it, and replace usage of these flags.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]>
show more ...
|
| #
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <[email protected]> |
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 <[email protected]> Acked-by: Tyler Retzlaff <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Jerin Jacob <[email protected]> Acked-by: Wisam Jaddo <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Chenbo Xia <[email protected]> Acked-by: Hemant Agrawal <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| #
ad5050e4 |
| 24-Sep-2021 |
Wenwu Ma <[email protected]> |
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: [email protected]
Signed-off-by: Wenwu Ma <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
| #
b563c142 |
| 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
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 <[email protected]> Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Reviewed-by: Rosen Xu <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Hyong Youb Kim <[email protected]> Acked-by: Michal Krawczyk <[email protected]>
show more ...
|
| #
1bb4a528 |
| 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
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 <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Hyong Youb Kim <[email protected]>
show more ...
|
| #
04d43857 |
| 07-Oct-2021 |
Dmitry Kozlyuk <[email protected]> |
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 <[email protected]>
show more ...
|
| #
abeb8652 |
| 20-Aug-2021 |
Jiayu Hu <[email protected]> |
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 <[email protected]> Signed-off-by: Cheng Jiang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
a7db3afc |
| 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
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 <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
c2c4f87b |
| 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
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 <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2 |
|
| #
b9f23bee |
| 23-Jul-2021 |
Cheng Jiang <[email protected]> |
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 <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
acbc3888 |
| 19-Jul-2021 |
Jiayu Hu <[email protected]> |
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 <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2 |
|
| #
ca7036b4 |
| 03-May-2021 |
David Marchand <[email protected]> |
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: [email protected]
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
47afdbbe |
| 27-Apr-2021 |
Cheng Jiang <[email protected]> |
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 <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v21.05-rc1 |
|
| #
10aa3757 |
| 15-Apr-2021 |
Chengchang Tang <[email protected]> |
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: [email protected]
Signed-off-by: Chengchang Tang <[email protected]>
show more ...
|
|
Revision tags: v21.02, v21.02-rc4, v21.02-rc3 |
|
| #
965b06f0 |
| 04-Feb-2021 |
Ibtisam Tariq <[email protected]> |
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 <[email protected]> Signed-off-by: Ibtisam Tariq <[email protected]> Reviewed-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
ee6e451f |
| 02-Feb-2021 |
Cheng Jiang <[email protected]> |
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 <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|