History log of /dpdk/drivers/net/virtio/virtio_ethdev.c (Results 1 – 25 of 306)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1
# 0f7438e6 08-Jan-2022 Yunjian Wang <[email protected]>

net/virtio: fix uninitialized RSS key

This patch fixes an issue that uninitialized old_rss_key
is used for restoring the rss_key.

Coverity issue: 373866
Fixes: 0c9d66207054 ("net/virtio: support RS

net/virtio: fix uninitialized RSS key

This patch fixes an issue that uninitialized old_rss_key
is used for restoring the rss_key.

Coverity issue: 373866
Fixes: 0c9d66207054 ("net/virtio: support RSS")
Cc: [email protected]

Signed-off-by: Yunjian Wang <[email protected]>
Reviewed-by: Chenbo Xia <[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, v21.11-rc2, v21.11-rc1
# 3c3c54cf 22-Oct-2021 Ivan Ilchenko <[email protected]>

net/virtio: fix link update in speed feature

Link update callback reports speed/duplex based on data
filled on device initialization. This is wrong in case of
VIRTIO_NET_F_SPEED_DUPLEX is negotiated

net/virtio: fix link update in speed feature

Link update callback reports speed/duplex based on data
filled on device initialization. This is wrong in case of
VIRTIO_NET_F_SPEED_DUPLEX is negotiated since link could
be down at this time. Fix this function to actually
update the HW data in this case with respect to the fact
that specifying speed via devarg is a highest priority.

Fixes: 1357b4b36246 ("net/virtio: support Virtio link speed feature")
Cc: [email protected]

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 64ac7e08 25-Oct-2021 Miao Li <[email protected]>

net/virtio: support power monitor

According to current semantics of power monitor, this commit adds a
callback function to decide whether aborts the sleep by checking
current value against the expec

net/virtio: support power monitor

According to current semantics of power monitor, this commit adds a
callback function to decide whether aborts the sleep by checking
current value against the expected value and virtio_get_monitor_addr
to provide address to monitor. When no packet come in, the value of
address will not be changed and the running core will sleep. Once
packets arrive, the value of address will be changed and the running
core will wakeup.

Signed-off-by: Miao Li <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 0c9d6620 27-Oct-2021 Maxime Coquelin <[email protected]>

net/virtio: support RSS

Provide the capability to update the hash key, hash types
and RETA table on the fly (without needing to stop/start
the device). However, the key length and the number of RETA

net/virtio: support RSS

Provide the capability to update the hash key, hash types
and RETA table on the fly (without needing to stop/start
the device). However, the key length and the number of RETA
entries are fixed to 40B and 128 entries respectively. This
is done in order to simplify the design, but may be
revisited later as the Virtio spec provides this
flexibility.

Note that only VIRTIO_NET_F_RSS support is implemented,
VIRTIO_NET_F_HASH_REPORT, which would enable reporting the
packet RSS hash calculated by the device into mbuf.rss, is
not yet supported.

Regarding the default RSS configuration, it has been
chosen to use the default Intel ixgbe key as default key,
and default RETA is a simple modulo between the hash and
the number of Rx queues.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

show more ...


# d61138d4 22-Oct-2021 Harman Kalra <[email protected]>

drivers: remove direct access to interrupt handle

Removing direct access to interrupt handle structure fields,
rather use respective get set APIs for the same.
Making changes to all the drivers acce

drivers: remove direct access to interrupt handle

Removing direct access to interrupt handle structure fields,
rather use respective get set APIs for the same.
Making changes to all the drivers access the interrupt handle fields.

Signed-off-by: Harman Kalra <[email protected]>
Acked-by: Hyong Youb Kim <[email protected]>
Signed-off-by: David Marchand <[email protected]>
Tested-by: Raslan Darawsheh <[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 ...


# 84cc857b 08-Oct-2021 Zhihong Peng <[email protected]>

net/virtio: fix check scatter on all Rx queues

This patch fixes the wrong way to obtain virtqueue.
The end of virtqueue cannot be judged based on whether
the array is NULL.

Fixes: 4e8169eb0d2d ("ne

net/virtio: fix check scatter on all Rx queues

This patch fixes the wrong way to obtain virtqueue.
The end of virtqueue cannot be judged based on whether
the array is NULL.

Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")
Cc: [email protected]

Signed-off-by: Zhihong Peng <[email protected]>
Reviewed-by: Maxime Coquelin <[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 ...


# 6c31a8c2 11-Oct-2021 Andrew Rybchenko <[email protected]>

ethdev: remove legacy Rx descriptor done API

rte_eth_rx_descriptor_status() should be used as a replacement.

Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigi

ethdev: remove legacy Rx descriptor done API

rte_eth_rx_descriptor_status() should be used as a replacement.

Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>

show more ...


# 49ed3224 06-Oct-2021 Xueming Li <[email protected]>

ethdev: make queue release callback optional

Some drivers don't need Rx and Tx queue release callback, make them
optional. Clean up empty queue release callbacks for some drivers.

Signed-off-by: Xu

ethdev: make queue release callback optional

Some drivers don't need Rx and Tx queue release callback, make them
optional. Clean up empty queue release callbacks for some drivers.

Signed-off-by: Xueming Li <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
Acked-by: Hemant Agrawal <[email protected]>

show more ...


# ba55c94a 30-Sep-2021 Maxime Coquelin <[email protected]>

net/virtio: revert forcing IOVA as VA mode for virtio-user

This patch removes the simplification in Virtio descriptors
handling, where their buffer addresses are IOVAs for Virtio
PCI devices, and VA

net/virtio: revert forcing IOVA as VA mode for virtio-user

This patch removes the simplification in Virtio descriptors
handling, where their buffer addresses are IOVAs for Virtio
PCI devices, and VA-only for Virtio-user devices, which
added a requirement on Virtio-user that it only supported
IOVA as VA.

This change introduced a regression for applications using
Virtio-user and other physical PMDs that require IOVA as PA
because they don't use an IOMMU.

This patch reverts to the old behaviour, but needed to be
reworked because of the refactoring that happened in v21.02.

Fixes: 17043a2909bb ("net/virtio: force IOVA as VA mode for virtio-user")
Cc: [email protected]

Reported-by: Olivier Matz <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Tested-by: Olivier Matz <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# f3854eba 16-Sep-2021 Thomas Monjalon <[email protected]>

net/virtio: remove blank lines in log

The macros PMD_*_LOG already include the line feed character.
Redundant \n are removed.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: David

net/virtio: remove blank lines in log

The macros PMD_*_LOG already include the line feed character.
Redundant \n are removed.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: David Marchand <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


# 492a239c 15-Sep-2021 Ivan Ilchenko <[email protected]>

net/virtio: report Tx descriptor limits in dev info

Report max/min/align Tx descriptors limits in device info get callback.
Before calling the callback, rte_eth_dev_info_get() provides
default value

net/virtio: report Tx descriptor limits in dev info

Report max/min/align Tx descriptors limits in device info get callback.
Before calling the callback, rte_eth_dev_info_get() provides
default values of nb_min as zero and nb_max as UINT16_MAX that are
not correct for the driver, so one can't rely on them.

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 9de76dfb 15-Sep-2021 Ivan Ilchenko <[email protected]>

net/virtio: fix Tx completed mbuf leak on device stop

Free Tx completed mbufs on device stop. Not completed Tx mbufs cannot be
freed since they are still in use.

Fixes: c1f86306a026 ("virtio: add n

net/virtio: fix Tx completed mbuf leak on device stop

Free Tx completed mbufs on device stop. Not completed Tx mbufs cannot be
freed since they are still in use.

Fixes: c1f86306a026 ("virtio: add new driver")
Cc: [email protected]

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 580f3af3 02-Sep-2021 Ivan Ilchenko <[email protected]>

net/virtio: fix device configure without jumbo Rx offload

Use max-pkt-len only if jumbo frames offload is requested
since otherwise this field isn't valid.

Fixes: 8b90e4358112 ("net/virtio: set off

net/virtio: fix device configure without jumbo Rx offload

Use max-pkt-len only if jumbo frames offload is requested
since otherwise this field isn't valid.

Fixes: 8b90e4358112 ("net/virtio: set offload flag for jumbo frames")
Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")
Cc: [email protected]

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 5d903aee 31-Aug-2021 Gaoxiang Liu <[email protected]>

net/virtio: fix repeated freeing of virtqueue

When virtio_init_queue returns error, the memory of vq is freed.
But the value of hw->vqs[queue_idx] does not restore.
If virtio_init_queue returns erro

net/virtio: fix repeated freeing of virtqueue

When virtio_init_queue returns error, the memory of vq is freed.
But the value of hw->vqs[queue_idx] does not restore.
If virtio_init_queue returns error, the memory of vq is freed again
in virtio_free_queues.

Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")
Cc: [email protected]

Signed-off-by: Gaoxiang Liu <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


# 5be2325e 31-Aug-2021 David Marchand <[email protected]>

net/virtio: avoid unneeded link interrupt configuration

There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when

net/virtio: avoid unneeded link interrupt configuration

There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when asking for Rx interrupts without LSC interrupt.

Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Cc: [email protected]

Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 31136836 20-Aug-2021 Ivan Ilchenko <[email protected]>

net/virtio: report max/min/align Rx descriptor limits

Report max/min/align descriptors limits in device info get callback.
Before calling the callback, rte_eth_dev_info_get() provides
default values

net/virtio: report max/min/align Rx descriptor limits

Report max/min/align descriptors limits in device info get callback.
Before calling the callback, rte_eth_dev_info_get() provides
default values of nb_min as zero and nb_max as UINT16_MAX that are
not correct for the driver, so one can't rely on them.

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[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
# 1e9221ae 27-Jul-2021 Chenbo Xia <[email protected]>

net/virtio: fix default duplex mode

When virtio front-end initializes, the duplex mode should be set
unknown before reading any duplex mode information from configuration
space. This patch fixes the

net/virtio: fix default duplex mode

When virtio front-end initializes, the duplex mode should be set
unknown before reading any duplex mode information from configuration
space. This patch fixes the issue that duplex mode is by default set
to zero, which equals ETH_LINK_HALF_DUPLEX. This will lead to duplex
mode being half duplex when front-end does not have the feature
named VIRTIO_NET_F_SPEED_DUPLEX.

Fixes: 1357b4b36246 ("net/virtio: support Virtio link speed feature")
Cc: [email protected]

Signed-off-by: Chenbo Xia <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


Revision tags: v21.08-rc2
# 11d7bc9f 21-Jul-2021 Ivan Ilchenko <[email protected]>

net/virtio: report maximum MTU in device info

Fix the driver to report maximum MTU obtained from config if
VIRTIO_NET_F_MTU is supported or calculated based on maximum
Rx packet length.

Fixes: ad97

net/virtio: report maximum MTU in device info

Fix the driver to report maximum MTU obtained from config if
VIRTIO_NET_F_MTU is supported or calculated based on maximum
Rx packet length.

Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
Cc: [email protected]

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 4e8169eb 20-Jul-2021 Ivan Ilchenko <[email protected]>

net/virtio: fix Rx scatter offload

Report Rx scatter offload capability depending on VIRTIO_NET_F_MRG_RXBUF.

If Rx scatter is not requested, ensure that provided Rx buffers on
each Rx queue are big

net/virtio: fix Rx scatter offload

Report Rx scatter offload capability depending on VIRTIO_NET_F_MRG_RXBUF.

If Rx scatter is not requested, ensure that provided Rx buffers on
each Rx queue are big enough to fit Rx packets up to configured MTU.

Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Cc: [email protected]

Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[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
# eeded204 26-Apr-2021 David Marchand <[email protected]>

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
used in a component. It is associated to the default name provided
by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
while read file; do
pattern=${file##drivers/};
class=${pattern%%/*};
pattern=${pattern#$class/};
drv=${pattern%%/*};
case "$class" in
baseband) pattern=pmd.bb.$drv;;
bus) pattern=bus.$drv;;
mempool) pattern=mempool.$drv;;
*) pattern=pmd.$class.$drv;;
esac
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

$ git grep -l RTE_LOG_REGISTER lib/ |
while read file; do
pattern=${file##lib/};
pattern=lib.${pattern%%/*};
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

show more ...


12345678910>>...13