[ovs-discuss] Reg. ofproto: ofproto_rule_insert__

2018-06-12 Thread Vishal Deep Ajmera
Hi,

In bundle based resync, we try to apply all rules from the bundle one-by-one. 
If a rule encounters any error, we revert back (undo) rules which were applied 
successfully. This is accomplished in function add_flow_revert() -> 
replace_rule_revert() -> ofproto_rule_insert__() using old_rule pointer. The 
old_rule state in this case would be RULE_REMOVED since the rule has been 
successfully replaced by new_rule. However, function ofproto_rule_insert__() is 
asserting when rule->state != RULE_INITIALIZED. Is this correct ? I think 
assert condition should be: ovs_assert(rule->state != RULE_INSERTED).

Does this make sense ? I am not very familiar with bundle based resync's 
though. If the change looks ok, I will post a patch in dev-list.

Warm Regards,
Vishal Ajmera

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


Re: [ovs-discuss] VXLAN - MAC address learning/propagation through EVPN/FRR

2018-06-12 Thread Raymond Burkholder

On 06/12/2018 02:40 AM, Nicola Bucci wrote:

Would you be able to provide a fully functional example with configs? That 
would be awesome.


Rather than a fully functional config, here are some config extracts:

Part of a shell script to configure and connect the ovs/kernel bridges, 
vxlan interface, and regular vlan.  You define how you want to map local 
vlans to global vni numbering.


VNI=$1
NAME=$2
TYPE=$3
VLAN=$4
# kernel bridge, bring it up without spanning tree
brctl addbr br${NAME}
ip link set dev br${NAME} up
brctl stp br${NAME} off
# create vxlan interface, where VNI is tied to vni in FRR, lo is a loopback
# nolearning is on the same line, but line-wrapped in email
ip link add vx${NAME} type vxlan id ${VNI} dstport 4789 local ${lo} 
nolearning

# add the vxlan interface to kernel bridge, bring itup
brctl addif br${NAME} vx${NAME}
ip link set dev vx${NAME} up
# add a veth to tie kernel bridge to ovs
ip link add vo${NAME} type veth peer name vb${NAME}
# add veth to kernel bridge
brctl addif br${NAME} vb${NAME}
# add veth to ovs bridge
ovs-vsctl --if-exists del-port ovsbr0 vo${NAME}
ovs-vsctl add-port ovsbr0 vo${NAME} ${TYPE}=${VLAN}
# bring up both ends of veth
ip link set dev vo${NAME} up
ip link set dev vb${NAME} up
# container and kvm links are then added to the ovs bridge



Here is an extract from an FRR EVPN configuration in the BGP 
configuration file.  For this example, there are two FRR instances 
involved for sharing VNI information.  This configuration is for one of 
the two.  For scaling, you choose the import/export statements based 
upon selecting which instances the VNI needs to be associated (where the 
vlan needs to be 'stretched')


In my case, the relationships are defined in a separate master file, and 
I use SaltStack to build the specific configs for each instance.


The addresses in the RD/RT are the instance loopbacks.

  address-family l2vpn evpn
neighbor 10.20.3.2 activate
vni 1012
  rd 10.20.1.1:1012
  route-target export 10.20.1.1:1012
  route-target import 10.20.1.2:1012
exit-vni
vni 1101
  rd 10.20.1.1:1101
  route-target export 10.20.1.1:1101
  route-target import 10.20.1.2:1101
exit-vni
vni 1421
  rd 10.20.1.1:1421
  route-target export 10.20.1.1:1421
  route-target import 10.20.1.2:1421
exit-vni
advertise-all-vni
  exit-address-family

Some more reading material I have gathered:

https://blog.raymond.burkholder.net/index.php?/archives/799-EVPN-Reading-Material.html


Thanks


I hope the above is some value


Nico


--
Raymond Burkholder
r...@oneunified.net
https://blog.raymond.burkholder.net

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


[ovs-discuss] Bonded interface on ovs bridge configuration

2018-06-12 Thread Tejali Bhujbal
Hi Guys ,
I am trying to configure bonded interface on ovs bridge but somehow bonding
doesn't up.
can you see any mistake in my configuration?


auto lo
iface lo inet loopback
dns-nameservers 129.241.0.200
dns-search dev.iaas.ntnu.no mass

# Bond enp7s0f0 and enp7s0f1 together
allow-vmbr0 bond0
iface bond0 inet static
  ovs_bridge vmbr0
  ovs_type OVSBond
  ovs_bonds enp7s0f0 enp7s0f1
  address 10.212.28.11/22
  # Force the MTU of the physical interfaces to be jumbo-frame capable.
  # This doesn't mean that any OVSIntPorts must be jumbo-capable.
  # We cannot, however set up definitions for eth0 and eth1 directly due
  # to what appear to be bugs in the initialization process.
  pre-up ( ifconfig enp7s0f0 mtu 9000 && ifconfig enp7s0f1 mtu 9000 )
  ovs_options bond_mode=balance-slb lacp=active other_config:lacp-time=fast
  mtu 9000

# Bridge for our bond and vlan virtual interfaces (our VMs will
# also attach to this bridge)
auto vmbr0
allow-ovs vmbr0
iface vmbr0 inet manual
  ovs_type OVSBridge
  # NOTE: we MUST mention bond0, vlan50, and vlan55 even though each
  #   of them lists ovs_bridge vmbr0!  Not sure why it needs this
  #   kind of cross-referencing but it won't work without it!
  ovs_ports bond0 vlan1529 vlan1530
  mtu 9000

# Proxmox cluster communication vlan
allow-vmbr0 vlan1529
iface vlan1529 inet static
  ovs_type OVSIntPort
  ovs_bridge vmbr0
  ovs_options tag=1529
  ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname
-s)-${IFACE}-vif
  address 10.212.36.11
  netmask 255.255.252.0
  gateway 10.212.36.1
  mtu 1500

# Ceph cluster communication vlan (jumbo frames)
allow-vmbr0 vlan1530
iface vlan1530 inet static
  ovs_type OVSIntPort
  ovs_bridge vmbr0
  ovs_options tag=1530
  ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname
-s)-${IFACE}-vif
  address 10.212.40.11
  netmask 255.255.252.0
  mtu 9000

auto eno1
iface eno1 inet static
address 10.212.48.11/22
mtu 1500

auto eno2
iface eno2 inet manual
mtu 1500

auto eno3
iface eno3 inet manual
mtu 1500

auto eno4
iface eno4 inet manual
mtu 1500










Kind regards

Tejali Sonawane-Bhujbal
Department Engineer - NTNU IT
Byggteknisk, s-226, Gløshaugen
Contact- +47-96708171
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss