[ovs-dev] [PATCH] After the packet completes the table lookup in the slow path, if the set mac operation is performed, I think we should compare whether the source and destination mac address are the same after the set mac operation, and they should not be the same.

Ben Pfaff blp at ovn.org
Thu Jun 24 21:46:22 UTC 2021


On Thu, Jun 24, 2021 at 01:44:34AM +0000, laixiangwu wrote:
> ---
>  ofproto/ofproto-dpif-xlate.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index a6f4ea334..544f47ea5 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -7169,6 +7169,12 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
>              break;
>          }
>      }
> +	/* After SET_ETH action is executed, the source and destination mac address of same flow 
> +	   should be different. */
> +    if (eth_addr_to_uint64(flow->dl_src) == eth_addr_to_uint64(flow->dl_dst)) {
> +        VLOG_ERR("The source and destination mac address of same flow should be different.");
> +        ctx->error = XLATE_FORWARDING_DISABLED;
> +    }
>  }

I am going to reject this patch.  Someone might want to do this.


More information about the dev mailing list