Re: [ovs-dev] [PATCH ovn v4 07/15] Use get_port_binding_tun instead of chassis_tunnel_find

2022-04-17 Thread Numan Siddique
On Tue, Mar 29, 2022 at 8:48 PM Ihar Hrachyshka  wrote:
>
> Right now consider_port_binding first extracts *a* tunnel for a
> chassis, then later in put_remote_port_redirect_overlay it fetches
> *the* proper tunnel before configuring encapsulation.
>
> Instead of doing it in two steps, just extract the proper tunnel info
> earlier.
>
> Signed-off-by: Ihar Hrachyshka 

Thanks for this patch series.  I applied the patches 1 - 7 of this
series to the main branch.

I've some comments about other patches which I'll comment on in patch 0.

Thanks
Numan

> ---
>  controller/physical.c | 11 ---
>  1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/controller/physical.c b/controller/physical.c
> index 0426098b2..6f5197955 100644
> --- a/controller/physical.c
> +++ b/controller/physical.c
> @@ -301,17 +301,14 @@ put_remote_port_redirect_overlay(const struct
>  {
>  if (!is_ha_remote) {
>  /* Setup encapsulation */
> -const struct chassis_tunnel *rem_tun =
> -get_port_binding_tun(binding->encap, binding->chassis,
> -chassis_tunnels);
> -if (!rem_tun) {
> +if (!tun) {
>  return;
>  }
>  put_encapsulation(mff_ovn_geneve, tun, binding->datapath, port_key,
>!strcmp(binding->type, "vtep"),
>ofpacts_p);
>  /* Output to tunnel. */
> -ofpact_put_OUTPUT(ofpacts_p)->port = rem_tun->ofport;
> +ofpact_put_OUTPUT(ofpacts_p)->port = tun->ofport;
>  } else {
>  /* Make sure all tunnel endpoints use the same encapsulation,
>   * and set it up */
> @@ -1079,8 +1076,8 @@ consider_port_binding(struct ovsdb_idl_index 
> *sbrec_port_binding_by_name,
>  if (!binding->chassis) {
>  goto out;
>  }
> -tun = chassis_tunnel_find(chassis_tunnels,
> -  binding->chassis->name, NULL);
> +tun = get_port_binding_tun(binding->encap, binding->chassis,
> +   chassis_tunnels);
>  if (!tun) {
>  goto out;
>  }
> --
> 2.34.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] docs: Note ALLOW_EXPERIMENTAL_API for tunnel offloads

2022-04-17 Thread Eli Britstein via dev
Tunnel offload APIs have '__rte_experimental' attribute, therefore
available only if ALLOW_EXPERIMENTAL_API is defined. Documente it.

Signed-off-by: Eli Britstein 
---
 Documentation/howto/dpdk.rst | 4 
 1 file changed, 4 insertions(+)

diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 81f236d3b..04609b20b 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -402,6 +402,10 @@ Supported actions for hardware offload are:
 - Clone/output (tnl_push and output) for encapsulating over a tunnel.
 - Tunnel pop, for packets received on physical ports.
 
+.. note::
+  Tunnel offloads are experimental APIs in DPDK. In order to enable it,
+  compile with -DALLOW_EXPERIMENTAL_API.
+
 Multiprocess
 
 
-- 
2.26.2.1730.g385c171

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev