mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 00:35:33 +00:00
netdev-dpdk: Getter function for dpdk port id API.
Add a getter function for using the dpdk port id outside the scope of netdev-dpdk.c to be used for HW offload. Signed-off-by: Eli Britstein <elibr@mellanox.com> Reviewed-by: Oz Shlomo <ozsh@mellanox.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
319a9bb338
commit
2f7f9284bd
@@ -5019,6 +5019,24 @@ unlock:
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
netdev_dpdk_get_port_id(struct netdev *netdev)
|
||||
{
|
||||
struct netdev_dpdk *dev;
|
||||
int ret = -1;
|
||||
|
||||
if (!is_dpdk_class(netdev->netdev_class)) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = netdev_dpdk_cast(netdev);
|
||||
ovs_mutex_lock(&dev->mutex);
|
||||
ret = dev->port_id;
|
||||
ovs_mutex_unlock(&dev->mutex);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool
|
||||
netdev_dpdk_flow_api_supported(struct netdev *netdev)
|
||||
{
|
||||
|
Reference in New Issue
Block a user