[ovs-discuss] Which function/struct can I use to parse the Src/Dst IP in OVS source code while using DPDK?

2017-11-08 Thread 施谷燁
Hi,

I'm trying to add a sketch in OVS to get statistics for source and
destination IP address while using DPDK.

As I know the packet will first arrive Network Interface Card(NIC) then use
Poll Mode Drive(PMD)(library in *netdev-dpdk.c*) to pass the packet to
*dpif-netdev.c* then go through match process like *emc_processing(),
fast_path_processing() and packet_batch_per_flow_excute()*.

I want to get the Src/Dst IP information ASAP after DPDK pass the packet
into user space. What I guess is the function or struct to parse the
Src/Dst IP is in *dpif-netdev.c*.
Is anyone know which exact function/struct can I use to get the IP
information here?

Thanks
Glenn
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN patch port for localnet can't be created

2017-11-08 Thread Numan Siddique
Is this openstack setup with networking-ovn ?

Can you run "ovn-nbctl list logical_router_port | grep redirect-chassis"
and make sure that networking-ovn has scheduled the gateway router port to
the desired chassis ?

May be the gateway router port is scheduled to some other chassis.

You can can run "ovn-nbctl set logical_router_port
options:redirect-chassis="CHASSIS_UUID_WHERE_YOU_WANT_TO_SCHEDULE" to
schedule it to your desired chassis.

Thanks
Numan



On Wed, Nov 8, 2017 at 8:41 AM, Ben Pfaff  wrote:

> Is update_sb_monitors() in ovn-controller.c not doing the right thing to
> ensure that localnet ports are present?  That is the first place to
> look, I think.
>
> On Tue, Nov 07, 2017 at 04:36:12PM +0800, Hui Xiang wrote:
> > Hi folks,
> >
> >   When I am running ovn in one of my node having the gateway port
> connected
> > external network via localnet, the patch port can't be created between
> > br-ex(set by ovn-bridge-mappings) with br-int, after gdb, it seems the
> > result get from SBREC_PORT_BINDING_FOR_EACH (binding, ctx->ovnsb_idl)
> > doesn't include 'localnet' binding type, however it does exist from
> > ovn-sbctl list port_binding, either I am missing any configuration to
> make
> > it work or this is a bug.
> >
> >   Please have a look and thank much.
> >
> > external_ids: {hostname="node-1.domain.tld",
> > ovn-bridge-mappings="physnet1:br-ex", ovn-encap-ip="168.254.101.10",
> > ovn-encap-type=geneve, ovn-remote="tcp:192.168.0.2:6642",
> > rundir="/var/run/openvswitch",
> > system-id="88596f9f-e326-4e15-ae91-8cc014e7be86"}
> > iface_types : [geneve, gre, internal, lisp, patch, stt, system,
> > tap, vxlan]
> >
> > (gdb) n
> > 181 if (!strcmp(binding->type, "localnet")) {
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb) display binding->logical_port
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > (gdb) n
> > 183 } else if (!strcmp(binding->type, "l2gateway")) {
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb)
> > 193 continue;
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb)
> > 179 SBREC_PORT_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb)
> > 181 if (!strcmp(binding->type, "localnet")) {
> > 5: binding->logical_port = 0x55e7189622d0
> > "lrp-3a938edc-8809-4b79-b1a6-8145066e4fe3"
> > 4: binding->type = 0x55e718962380 "patch"
> > (gdb)
> > 183 } else if (!strcmp(binding->type, "l2gateway")) {
> > 5: binding->logical_port = 0x55e7189622d0
> > "lrp-3a938edc-8809-4b79-b1a6-8145066e4fe3"
> > 4: binding->type = 0x55e718962380 "patch"
> > (gdb)
> > 193 continue;
> > 5: binding->logical_port = 0x55e7189622d0
> > "lrp-3a938edc-8809-4b79-b1a6-8145066e4fe3"
> > 4: binding->type = 0x55e718962380 "patch"
> > (gdb)
> > 179 SBREC_PORT_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
> > 5: binding->logical_port = 0x55e7189622d0
> > "lrp-3a938edc-8809-4b79-b1a6-8145066e4fe3"
> > 4: binding->type = 0x55e718962380 "patch"
> > (gdb)
> > 181 if (!strcmp(binding->type, "localnet")) {
> > 5: binding->logical_port = 0x55e718962820
> > "lrp-b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189628d0 "patch"
> > (gdb)
> > 183 } else if (!strcmp(binding->type, "l2gateway")) {
> > 5: binding->logical_port = 0x55e718962820
> > "lrp-b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189628d0 "patch"
> > (gdb)
> > 193 continue;
> > 5: binding->logical_port = 0x55e718962820
> > "lrp-b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189628d0 "patch"
> > (gdb)
> > 179 SBREC_PORT_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
> > 5: binding->logical_port = 0x55e718962820
> > "lrp-b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > (gdb) n
> > 181 if (!strcmp(binding->type, "localnet")) {
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb) display binding->logical_port
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > (gdb) n 183 } else if (!strcmp(binding->type, "l2gateway")) {
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb)
> > 193 continue;
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: binding->type = 0x55e7189608b0 "patch"
> > (gdb)
> > 179 SBREC_PORT_BINDING_FOR_EACH (binding, ctx->ovnsb_idl) {
> > 5: binding->logical_port = 0x55e718960650
> > "b3edbc9a-3248-43e5-b84e-01689a9c83e2"
> > 4: 

Re: [ovs-discuss] (no subject)

2017-11-08 Thread Flavio Leitner
On Wed, 8 Nov 2017 15:17:46 +0530
Neelakantam Gaddam  wrote:

> Hi All,
> 
> I want to configure the flows for vlan access ports with connection
> tracking. Is there any example in the ovs source where can I find these
> configurations.
> I would appreciate if any one share the example configuration or point me
> to the information link.

http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
and look for the Flow Syntax section.

Also:
http://openvswitch.org/support/dist-docs/ovs-fields.7.txt

Here is the tutorial:
http://docs.openvswitch.org/en/latest/tutorials/ovs-advanced/#implementing-table-1-vlan-input-processing

HTH,
-- 
Flavio

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss