Git SHA: 553e638daa71143c666eaaec8b98c35177982256
Author: Eelco Chaudron <[email protected]>
Subject: netdev-offload: Fold netdev-offload APIs and files into dpif-offload.
This commit renames netdev-offload-tc|dpdk.c files to corresponding
dpif-offload-tc|dpdk-netdev.c files and moves netdev_set|get_hw_info()
APIs from netdev-offload.c to netdev.c, allowing netdev-offload.c file
to be removed.
> diff --git a/lib/automake.mk b/lib/automake.mk
> index c0edef8e9..9634bed7b 100644
> --- a/lib/automake.mk
> +++ b/lib/automake.mk
> @@ -210,8 +210,6 @@ lib_libopenvswitch_la_SOURCES = \
> lib/namemap.c \
> lib/netdev-dpdk.h \
> lib/netdev-dummy.c \
> - lib/netdev-offload.c \
> - lib/netdev-offload.h \
> lib/netdev-provider.h \
> lib/netdev-vport.c \
> lib/netdev-vport.h \
[ ... ]
> diff --git a/lib/netdev.h b/lib/netdev.h
> index df56c9071..03aa4bed1 100644
> --- a/lib/netdev.h
> +++ b/lib/netdev.h
> @@ -19,6 +19,8 @@
>
> #include "openvswitch/netdev.h"
> #include "openvswitch/types.h"
> +#include "ovs-atomic.h"
> +#include "ovs-rcu.h"
> #include "packets.h"
> #include "flow.h"
>
> @@ -392,6 +394,25 @@ int netdev_get_addrs(const char dev[], struct in6_addr
> **paddr,
> struct in6_addr **pmask, int *n_in6);
> #endif
>
> +/* Offload-capable (HW) netdev information. */
> +struct netdev_hw_info {
> + bool oor; /* Out of Offload Resources (OOR)? */
> + /* Is hw_miss_packet_postprocess() supported.*/
> + atomic_bool postprocess_api_supported;
> + int offload_count; /* Offloaded flow count. */
> + int pending_count; /* Pending (non-offloaded) flow count.
> */
> + OVSRCU_TYPE(void *) offload_data; /* Offload metadata. */
> +};
> +
> +enum hw_info_type {
> + HW_INFO_TYPE_OOR = 1, /* Out of Offload Resources (OOR) state.
> */
> + HW_INFO_TYPE_PEND_COUNT = 2, /* Pending(non-offloaded) flow count. */
> + HW_INFO_TYPE_OFFL_COUNT = 3 /* Offloaded flow count. */
> +};
The comment spacing looks inconsistent. Should there be a space before
the closing comment marker on line with postprocess_api_supported, similar
to the other comment lines?
Does this code have a whitespace issue with HW_INFO_TYPE_OFFL_COUNT? It
appears to use a tab character instead of spaces for alignment.
> +
> +int netdev_get_hw_info(struct netdev *, int type);
> +void netdev_set_hw_info(struct netdev *, int type, int val);
> +
[ ... ]
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev