aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gpe/decap.c
AgeCommit message (Expand)AuthorFilesLines
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-1/+1
2019-03-06vxlan*: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar1-33/+44
2018-10-23c11 safe string handling supportDave Barach1-2/+2
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-6/+3
2018-07-11avoid using thread local storage for thread indexDamjan Marion1-1/+1
2017-12-13make "test-all" target pass againGabriel Ganne1-0/+9
2017-12-13VPP-275 Coding standards cleanup - vnet/vnet/vxlan-gpesharath reddy1-587/+652
2017-07-14vnet_buffer_t flags cleanupDamjan Marion1-9/+9
2017-06-06Rework vxlan-gpe to support FIB 2.0 and bypass modeHongjun Ni1-17/+462
2017-04-06Use thread local storage for thread indexDamjan Marion1-5/+5
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+733
t: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
from vpp_object import VppObject
from vpp_interface import VppInterface


class VppBondInterface(VppInterface):
    """VPP bond interface."""

    def __init__(self, test, mode, lb=0, numa_only=0, enable_gso=0,
                 use_custom_mac=0, mac_address='', id=0xFFFFFFFF):

        """ Create VPP Bond interface """
        super(VppBondInterface, self).__init__(test)
        self.mode = mode
        self.lb = lb
        self.numa_only = numa_only
        self.enable_gso = enable_gso
        self.use_custom_mac = use_custom_mac
        self.mac_address = mac_address
        self.id = id

    def add_vpp_config(self):
        r = self.test.vapi.bond_create2(self.mode,
                                        self.lb,
                                        self.numa_only,
                                        self.enable_gso,
                                        self.use_custom_mac,
                                        self.mac_address,
                                        self.id)
        self.set_sw_if_index(r.sw_if_index)

    def remove_vpp_config(self):
        self.test.vapi.bond_delete(self.sw_if_index)

    def add_member_vpp_bond_interface(self,
                                      sw_if_index,
                                      is_passive=0,
                                      is_long_timeout=0):
        self.test.vapi.bond_add_member(sw_if_index,
                                       self.sw_if_index,
                                       is_passive,
                                       is_long_timeout)

    def detach_vpp_bond_interface(self,
                                  sw_if_index):
        self.test.vapi.bond_detach_member(sw_if_index)

    def is_interface_config_in_dump(self, dump):
        for i in dump:
            if i.sw_if_index == self.sw_if_index:
                return True
        else:
            return False