Re: [ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-13 Thread Hui Xiang
Thanks Ben, that is much helpful explanation.

On Fri, Oct 13, 2017 at 11:42 PM, Ben Pfaff  wrote:

> On Fri, Oct 13, 2017 at 06:04:16PM +0800, Hui Xiang wrote:
> > Is the patch port output logistic within function
> apply_nested_clone_actions
> > ? Sorry, I have not totally understood the whole picture on how a packet
> > through
> > the datapath flow on the case that goes from netdev datapath patch port_B
> > to system datapath port_C. Is it such a procedure:
> > When a packet arrives at patch port_B of netdev datapath br1, the xlate
> ctx
> > switch to system datapath br2, and try to find a
> > rule, the rule probably missed, but I didn't find where this rule should
> be
> > preloaded, and why does it not work in this case.
> >
> > Coud you help to guide?
>
> Patch port output happens in patch_port_output() in ofproto-dpif-xlate.c.
>
> Patch ports are implemented entirely within a datapath.  Output to one
> happens by simply doing a nested translation of the actions that would
> happen at the other end of the patch port.  This can't really happen if
> the packet would pass to another datapath entirely.  One could implement
> some feature for hopping from one datapath to another.  We have not done
> this because the value of the feature seems limited; most installations
> of OVS use only a single datapath.
>
> > In additions, does it work with veth connected netdev datapath with
> system
> > datapath? It seems OVN will bridge the br-int with
> > the external network having another bridge with patch port, in this case,
> > if br-int is netdev, but external bridge is system,
> > then it doesn't work as what I understand so far.
>
> veths should be able to hop from one datapath to another, at least for
> datapaths that support veths.
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-13 Thread Ben Pfaff
On Fri, Oct 13, 2017 at 06:04:16PM +0800, Hui Xiang wrote:
> Is the patch port output logistic within function apply_nested_clone_actions
> ? Sorry, I have not totally understood the whole picture on how a packet
> through
> the datapath flow on the case that goes from netdev datapath patch port_B
> to system datapath port_C. Is it such a procedure:
> When a packet arrives at patch port_B of netdev datapath br1, the xlate ctx
> switch to system datapath br2, and try to find a
> rule, the rule probably missed, but I didn't find where this rule should be
> preloaded, and why does it not work in this case.
> 
> Coud you help to guide?

Patch port output happens in patch_port_output() in ofproto-dpif-xlate.c.

Patch ports are implemented entirely within a datapath.  Output to one
happens by simply doing a nested translation of the actions that would
happen at the other end of the patch port.  This can't really happen if
the packet would pass to another datapath entirely.  One could implement
some feature for hopping from one datapath to another.  We have not done
this because the value of the feature seems limited; most installations
of OVS use only a single datapath.

> In additions, does it work with veth connected netdev datapath with system
> datapath? It seems OVN will bridge the br-int with
> the external network having another bridge with patch port, in this case,
> if br-int is netdev, but external bridge is system,
> then it doesn't work as what I understand so far.

veths should be able to hop from one datapath to another, at least for
datapaths that support veths.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-13 Thread Hui Xiang
Thanks Ben.

Is the patch port output logistic within function apply_nested_clone_actions
? Sorry, I have not totally understood the whole picture on how a packet
through
the datapath flow on the case that goes from netdev datapath patch port_B
to system datapath port_C. Is it such a procedure:
When a packet arrives at patch port_B of netdev datapath br1, the xlate ctx
switch to system datapath br2, and try to find a
rule, the rule probably missed, but I didn't find where this rule should be
preloaded, and why does it not work in this case.

Coud you help to guide?

In additions, does it work with veth connected netdev datapath with system
datapath? It seems OVN will bridge the br-int with
the external network having another bridge with patch port, in this case,
if br-int is netdev, but external bridge is system,
then it doesn't work as what I understand so far.

Thanks much.

On Thu, Oct 12, 2017 at 11:48 PM, Ben Pfaff  wrote:

> On Thu, Oct 12, 2017 at 05:22:14PM +0800, Hui Xiang wrote:
> >Seems it works with the same datapath type during the discussion in
> [1]
> > by finally done a flow of leaving two kernel netdev port communicate
> > together.
> >
> >But in my case I have a setup with two bridges has different datapath
> > type, netdev and system, need to be connected, port_A(in netdev datapath)
> > is in running in the userspace, port_D(in system datapath), will the flow
> > be port_A  port_D directly and packets go through userspace to
> > kernelspace and so on in the reverse direction,
> >  does patch port can make it work?
>
> No, that doesn't work.  (I should document that.)
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-12 Thread Ben Pfaff
On Thu, Oct 12, 2017 at 05:22:14PM +0800, Hui Xiang wrote:
>Seems it works with the same datapath type during the discussion in [1]
> by finally done a flow of leaving two kernel netdev port communicate
> together.
> 
>But in my case I have a setup with two bridges has different datapath
> type, netdev and system, need to be connected, port_A(in netdev datapath)
> is in running in the userspace, port_D(in system datapath), will the flow
> be port_A  port_D directly and packets go through userspace to
> kernelspace and so on in the reverse direction,
>  does patch port can make it work?

No, that doesn't work.  (I should document that.)
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Does it work if netdev datapath connect system datapath through patch ports

2017-10-12 Thread Hui Xiang
Hi folks,

   Seems it works with the same datapath type during the discussion in [1]
by finally done a flow of leaving two kernel netdev port communicate
together.

   But in my case I have a setup with two bridges has different datapath
type, netdev and system, need to be connected, port_A(in netdev datapath)
is in running in the userspace, port_D(in system datapath), will the flow
be port_A  port_D directly and packets go through userspace to
kernelspace and so on in the reverse direction,
 does patch port can make it work?

The topology is
*port_A --- br1(netdev) --- port_B (patch)  port_C (patch) ---
br2(system) --- port_D*



*[1]
https://mail.openvswitch.org/pipermail/ovs-dev/2015-September/303675.html
*

*Thanks much for your help.*
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss