[ovs-dev] [PATCH 1/2] netdev-dpdk: Drop offload API for vhost ports.
Stokes, Ian
ian.stokes at intel.com
Wed Oct 31 10:42:12 UTC 2018
> vhost ports are not DPDK eth ports and has no rte_flow API.
> Stop calling this API with DPDK_ETH_PORT_ID_INVALID to avoid time wasting
> and errors in log.
>
> Additionally, DPDK_FLOW_OFFLOAD_API definition moved to .c file, because
> there is no need to expose it in header.
Adding Ophir and Tiago as they are both looking at the HWOL work at the moment.
>
> CC: Finn Christensen <fc at napatech.com>
> Fixes: e8a2b5bf92bb ("netdev-dpdk: implement flow offload with rte flow")
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---
> lib/netdev-dpdk.c | 10 +++++++---
> lib/netdev-dpdk.h | 4 ----
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
> f91aa27cd..7fe5eb087 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -4696,6 +4696,10 @@ netdev_dpdk_flow_del(struct netdev *netdev, const
> ovs_u128 *ufid,
> ufid, rte_flow); }
>
> +#define DPDK_FLOW_OFFLOAD_API \
> + .flow_put = netdev_dpdk_flow_put, \
> + .flow_del = netdev_dpdk_flow_del
> +
> #define NETDEV_DPDK_CLASS_COMMON \
> .is_pmd = true, \
> .alloc = netdev_dpdk_alloc, \
> @@ -4717,8 +4721,7 @@ netdev_dpdk_flow_del(struct netdev *netdev, const
> ovs_u128 *ufid,
> .rxq_alloc = netdev_dpdk_rxq_alloc, \
> .rxq_construct = netdev_dpdk_rxq_construct, \
> .rxq_destruct = netdev_dpdk_rxq_destruct, \
> - .rxq_dealloc = netdev_dpdk_rxq_dealloc, \
> - DPDK_FLOW_OFFLOAD_API
> + .rxq_dealloc = netdev_dpdk_rxq_dealloc
>
> #define NETDEV_DPDK_CLASS_BASE \
> NETDEV_DPDK_CLASS_COMMON, \
> @@ -4731,7 +4734,8 @@ netdev_dpdk_flow_del(struct netdev *netdev, const
> ovs_u128 *ufid,
> .get_features = netdev_dpdk_get_features, \
> .get_status = netdev_dpdk_get_status, \
> .reconfigure = netdev_dpdk_reconfigure, \
> - .rxq_recv = netdev_dpdk_rxq_recv
> + .rxq_recv = netdev_dpdk_rxq_recv, \
> + DPDK_FLOW_OFFLOAD_API
>
> static const struct netdev_class dpdk_class = {
> .type = "dpdk",
> diff --git a/lib/netdev-dpdk.h b/lib/netdev-dpdk.h index
> cc0501d68..b7d02a77d 100644
> --- a/lib/netdev-dpdk.h
> +++ b/lib/netdev-dpdk.h
> @@ -25,10 +25,6 @@ struct dp_packet;
>
> #ifdef DPDK_NETDEV
>
> -#define DPDK_FLOW_OFFLOAD_API \
> - .flow_put = netdev_dpdk_flow_put, \
> - .flow_del = netdev_dpdk_flow_del
> -
I believe the original reason for placing them here was to keep the approach uniform across the netdevs WRT where the APIs are defined.
I believe the expectation is that they will be shared outside of netdev-dpdk at some point. That work in ongoing.
https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/350510.html
We can remove it from mast but FYI it will be back I suspect.
Ian
> void netdev_dpdk_register(void);
> void free_dpdk_buf(struct dp_packet *);
>
> --
> 2.17.1
More information about the dev
mailing list