History log of /dpdk/drivers/net/pfe/pfe_ethdev.c (Results 1 – 25 of 33)
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
# a41f593f 11-Feb-2022 Ferruh Yigit <[email protected]>

ethdev: introduce generic dummy packet burst function

Multiple PMDs have dummy/noop Rx/Tx packet burst functions.

These dummy functions are very simple, introduce a common function in
the ethdev an

ethdev: introduce generic dummy packet burst function

Multiple PMDs have dummy/noop Rx/Tx packet burst functions.

These dummy functions are very simple, introduce a common function in
the ethdev and update drivers to use it instead of each driver having
its own functions.

Signed-off-by: Ferruh Yigit <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Viacheslav Ovsiienko <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>

show more ...


# a7380933 03-Jan-2022 Apeksha Gupta <[email protected]>

net/pfe: remove unused link status setting

remove setting link status where it is not being used

Signed-off-by: Apeksha Gupta <[email protected]>
Acked-by: Hemant Agrawal <[email protected]

net/pfe: remove unused link status setting

remove setting link status where it is not being used

Signed-off-by: Apeksha Gupta <[email protected]>
Acked-by: Hemant Agrawal <[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
# 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 ...


# 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 ...


# 64c952ec 28-Sep-2021 Andrew Rybchenko <[email protected]>

drivers/net: remove queue xstats auto-fill flag

Some drivers do not provide per-queue statistics. So, there is no point
to have these misleading zeros in xstats.

Fixes: f30e69b41f94 ("ethdev: add d

drivers/net: remove queue xstats auto-fill flag

Some drivers do not provide per-queue statistics. So, there is no point
to have these misleading zeros in xstats.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")
Cc: [email protected]

Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[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 ...


Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1
# 01bfb518 24-May-2021 Thierry Herbelot <[email protected]>

net/pfe: remove unnecessary null check

ethdev library does the check of dev before calling the link update.

Fixes: acd4818ea2a45 ("net/pfe: add link status update")
Cc: [email protected]

Signed-off-

net/pfe: remove unnecessary null check

ethdev library does the check of dev before calling the link update.

Fixes: acd4818ea2a45 ("net/pfe: add link status update")
Cc: [email protected]

Signed-off-by: Thierry Herbelot <[email protected]>
Acked-by: Gagandeep Singh <[email protected]>

show more ...


Revision tags: 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 ...


Revision tags: v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2
# df96fd0d 29-Jan-2021 Bruce Richardson <[email protected]>

ethdev: make driver-only headers private

The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are
for drivers only and should be a private to DPDK and not installed.

Signed-off-by:

ethdev: make driver-only headers private

The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are
for drivers only and should be a private to DPDK and not installed.

Signed-off-by: Bruce Richardson <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
Acked-by: Steven Webster <[email protected]>

show more ...


Revision tags: v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2, v20.11-rc1
# f30e69b4 14-Oct-2020 Ferruh Yigit <[email protected]>

ethdev: add device flag to bypass auto-filled queue xstats

Queue stats are stored in 'struct rte_eth_stats' as array and array size
is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.

As

ethdev: add device flag to bypass auto-filled queue xstats

Queue stats are stored in 'struct rte_eth_stats' as array and array size
is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.

As a result of technical board discussion, decided to remove the queue
statistics from 'struct rte_eth_stats' in the long term.

Instead PMDs should represent the queue statistics via xstats, this
gives more flexibility on the number of the queues supported.

Currently queue stats in the xstats are filled by ethdev layer, using
some basic stats, when queue stats removed from basic stats the
responsibility to fill the relevant xstats will be pushed to the PMDs.

During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
device flag is created. Initially all PMDs using xstats set this flag.
The PMDs implemented queue stats in the xstats should clear the flag.

When all PMDs switch to the xstats for the queue stats, queue stats
related fields from 'struct rte_eth_stats' will be removed, as well as
'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
removed.

Signed-off-by: Ferruh Yigit <[email protected]>
Acked-by: Haiyue Wang <[email protected]>
Acked-by: Xiao Wang <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>

show more ...


# 62024eb8 15-Oct-2020 Ivan Ilchenko <[email protected]>

ethdev: change stop operation callback to return int

Change eth_dev_stop_t return value from void to int.
Make eth_dev_stop_t implementations across all drivers to return
negative errno values if ca

ethdev: change stop operation callback to return int

Change eth_dev_stop_t return value from void to int.
Make eth_dev_stop_t implementations across all drivers to return
negative errno values if case of error conditions.

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

show more ...


# b8f5d2ae 16-Oct-2020 Thomas Monjalon <[email protected]>

ethdev: remove forcing stopped state upon close

When closing a port, it is supposed to be already stopped,
and marked as such with "dev_started" state zeroed by the stop API.

Resetting "dev_started

ethdev: remove forcing stopped state upon close

When closing a port, it is supposed to be already stopped,
and marked as such with "dev_started" state zeroed by the stop API.

Resetting "dev_started" before calling the driver close operation
was hiding the case of not properly stopped port being closed.
The flag "dev_started" is not changed anymore in "rte_eth_dev_close()".

In case the "dev_stop" function is called from "dev_close",
bypassing "rte_eth_dev_stop()" API,
the "dev_started" state must be explicitly reset in the PMD
in order to keep the same behaviour.

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

show more ...


# 30410493 28-Sep-2020 Thomas Monjalon <[email protected]>

drivers/net: check process type in close operation

The secondary processes are not allowed to release shared resources.
Only process-private resources should be freed in a secondary process.
Most of

drivers/net: check process type in close operation

The secondary processes are not allowed to release shared resources.
Only process-private resources should be freed in a secondary process.
Most of the time, there is no process-private resource,
so the close operation is just forbidden in a secondary process.

After adding proper check in the port close functions,
some redundant checks in the device remove functions are dropped.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>
Reviewed-by: Sachin Saxena <[email protected]>
Reviewed-by: Ajit Khaparde <[email protected]>
Reviewed-by: Liron Himi <[email protected]>
Reviewed-by: Haiyue Wang <[email protected]>
Acked-by: Jeff Guo <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>

show more ...


# fbd19135 28-Sep-2020 Thomas Monjalon <[email protected]>

ethdev: remove old close behaviour

The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed.
It was introduced in DPDK 18.11 in order to give time for PMDs to migrate.

The old behaviour was to free o

ethdev: remove old close behaviour

The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed.
It was introduced in DPDK 18.11 in order to give time for PMDs to migrate.

The old behaviour was to free only queues when closing a port.
The new behaviour is calling rte_eth_dev_release_port() which does
three more tasks:
- trigger event callback
- reset state and few pointers
- free all generic port resources

The private port resources must be released in the .dev_close callback.

The .remove callback should:
- call .dev_close callback
- call rte_eth_dev_release_port()
- free multi-port device shared resources

Despite waiting two years, some drivers have not migrated,
so they may hit issues with the incompatible new behaviour.
After sending emails, adding logs, and announcing the deprecation,
the only last solution is to declare these drivers as unmaintained:
ionic, liquidio, nfp
Below is a summary of what to implement in those drivers.

* The freeing of private port resources must be moved
from the ".remove(device)" function to the ".dev_close(port)" function.

* If a generic resource (.mac_addrs or .hash_mac_addrs) cannot be freed,
it must be set to NULL in ".dev_close" function to protect from
subsequent rte_eth_dev_release_port() freeing.

* Note 1:
The generic resources are freed in rte_eth_dev_release_port(),
after ".dev_close" is called in rte_eth_dev_close(), but not when
calling ".dev_close" directly from the ".remove" PMD function.
That's why rte_eth_dev_release_port() must still be called explicitly
from ".remove(device)" after calling the ".dev_close" PMD function.

* Note 2:
If a device can have multiple ports, the common resources must be freed
only in the ".remove(device)" function.

* Note 3:
The port is supposed to be in a stopped state when it is closed.
If it is not the case, it is free to the PMD implementation
how to react when trying to close a non-stopped port:
either try to stop it automatically or just return an error.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Liron Himi <[email protected]>
Reviewed-by: Haiyue Wang <[email protected]>
Acked-by: Jeff Guo <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>

show more ...


# 57803c5e 28-Sep-2020 Sachin Saxena <[email protected]>

net/pfe: release port upon close

With removal of old close behavior, the private
port resources must be released in the .dev_close callback.
Freeing of port private resources is moved from
the ".rem

net/pfe: release port upon close

With removal of old close behavior, the private
port resources must be released in the .dev_close callback.
Freeing of port private resources is moved from
the ".remove(device)" to the ".dev_close(port)" operation

Signed-off-by: Sachin Saxena <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>

show more ...


# b142387b 28-Sep-2020 Thomas Monjalon <[email protected]>

ethdev: allow drivers to return error on close

The device operation .dev_close was returning void.
This driver interface is changed to return an int.

Note that the API rte_eth_dev_close() is still

ethdev: allow drivers to return error on close

The device operation .dev_close was returning void.
This driver interface is changed to return an int.

Note that the API rte_eth_dev_close() is still returning void,
although a deprecation notice is pending to change it as well.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>
Reviewed-by: Sachin Saxena <[email protected]>
Reviewed-by: Liron Himi <[email protected]>
Reviewed-by: Haiyue Wang <[email protected]>
Acked-by: Jeff Guo <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>

show more ...


# 3351a103 14-Sep-2020 Sachin Saxena <[email protected]>

net/pfe: fix misuse of interface index

Pfe pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: fe38ad9ba73e ("net/pfe: add device start/st

net/pfe: fix misuse of interface index

Pfe pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: fe38ad9ba73e ("net/pfe: add device start/stop")
Cc: [email protected]

Reported-by: Stephen Hemminger <[email protected]>
Signed-off-by: Sachin Saxena <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1
# 9c99878a 01-Jul-2020 Jerin Jacob <[email protected]>

log: introduce logtype register macro

Introduce the RTE_LOG_REGISTER macro to avoid the code duplication
in the logtype registration process.

It is a wrapper macro for declaring the logtype, regist

log: introduce logtype register macro

Introduce the RTE_LOG_REGISTER macro to avoid the code duplication
in the logtype registration process.

It is a wrapper macro for declaring the logtype, registering it and
setting its level in the constructor context.

Signed-off-by: Jerin Jacob <[email protected]>
Acked-by: Adam Dybkowski <[email protected]>
Acked-by: Sachin Saxena <[email protected]>
Acked-by: Akhil Goyal <[email protected]>

show more ...


Revision tags: v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1
# 611faa5f 29-Feb-2020 Luca Boccassi <[email protected]>

fix various typos found by Lintian

Cc: [email protected]

Signed-off-by: Luca Boccassi <[email protected]>


# 497eb88c 09-Apr-2020 Yunjian Wang <[email protected]>

net/pfe: fix double free of MAC address

The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(),
so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and
will cause double

net/pfe: fix double free of MAC address

The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(),
so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and
will cause double free.

Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions")
Cc: [email protected]

Signed-off-by: Yunjian Wang <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


# b8907ccf 31-Mar-2020 Stephen Hemminger <[email protected]>

net/pfe: do not use PMD log type

The PMD logtype is a legacy from original DPDK logging.
All drivers must use their own dynamic log type.

Fixes: b1bc1afa4a0e ("net/pfe: support dynamic logging")
Cc

net/pfe: do not use PMD log type

The PMD logtype is a legacy from original DPDK logging.
All drivers must use their own dynamic log type.

Fixes: b1bc1afa4a0e ("net/pfe: support dynamic logging")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


Revision tags: v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2
# f513f620 06-Nov-2019 Sachin Saxena <[email protected]>

drivers: update copyright for NXP files

Signed-off-by: Sachin Saxena <[email protected]>
Acked-by: Hemant Agrawal <[email protected]>


Revision tags: v19.11-rc1
# acd4818e 10-Oct-2019 Gagandeep Singh <[email protected]>

net/pfe: add link status update

This patch add link related operations like
link update, up and down.

Signed-off-by: Gagandeep Singh <[email protected]>
Acked-by: Nipun Gupta <[email protected]>
Ac

net/pfe: add link status update

This patch add link related operations like
link update, up and down.

Signed-off-by: Gagandeep Singh <[email protected]>
Acked-by: Nipun Gupta <[email protected]>
Acked-by: Akhil Goyal <[email protected]>

show more ...


# ff64beab 10-Oct-2019 Gagandeep Singh <[email protected]>

net/pfe: add allmulticast and promiscuous

This patch adds support to enable multicast and
promiscuous mode.

Signed-off-by: Gagandeep Singh <[email protected]>
Acked-by: Nipun Gupta <[email protected]

net/pfe: add allmulticast and promiscuous

This patch adds support to enable multicast and
promiscuous mode.

Signed-off-by: Gagandeep Singh <[email protected]>
Acked-by: Nipun Gupta <[email protected]>
Acked-by: Akhil Goyal <[email protected]>

show more ...


12