mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-25 10:32:03 +01:00
oxm_fields: Add Nicira Extended Match (NXM) support
Note: It wasn't clear to me which NXM stands for "Extensible" or "Extended". I chose the latter because it's in the primary specification. (nicira-ext.h) Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
73e336e74e
commit
be892f863b
@ -87,6 +87,8 @@ class UnknownType(TypeDescr):
|
||||
from_user = staticmethod(base64.b64decode)
|
||||
|
||||
|
||||
OFPXMC_NXM_0 = 0 # Nicira Extended Match (NXM_OF_)
|
||||
OFPXMC_NXM_1 = 1 # Nicira Extended Match (NXM_NX_)
|
||||
OFPXMC_OPENFLOW_BASIC = 0x8000
|
||||
OFPXMC_EXPERIMENTER = 0xffff
|
||||
|
||||
@ -95,16 +97,15 @@ class _OxmClass(object):
|
||||
def __init__(self, name, num, type_):
|
||||
self.name = name
|
||||
self.oxm_type = num | (self._class << 7)
|
||||
# TODO(yamamoto): Clean this up later.
|
||||
# Probably when we drop EXT-256 style experimenter OXMs.
|
||||
self.num = self.oxm_type
|
||||
self.type = type_
|
||||
|
||||
|
||||
class OpenFlowBasic(_OxmClass):
|
||||
_class = OFPXMC_OPENFLOW_BASIC
|
||||
|
||||
def __init__(self, name, num, type_):
|
||||
super(OpenFlowBasic, self).__init__(name, num, type_)
|
||||
self.num = self.oxm_type
|
||||
|
||||
|
||||
class _Experimenter(_OxmClass):
|
||||
_class = OFPXMC_EXPERIMENTER
|
||||
@ -119,6 +120,24 @@ class ONFExperimenter(_Experimenter):
|
||||
self.exp_type = num
|
||||
|
||||
|
||||
class NiciraExtended0(_OxmClass):
|
||||
"""Nicira Extended Match (NXM_0)
|
||||
|
||||
NXM header format is same as 32-bit (non-experimenter) OXMs.
|
||||
"""
|
||||
|
||||
_class = OFPXMC_NXM_0
|
||||
|
||||
|
||||
class NiciraExtended1(_OxmClass):
|
||||
"""Nicira Extended Match (NXM_1)
|
||||
|
||||
NXM header format is same as 32-bit (non-experimenter) OXMs.
|
||||
"""
|
||||
|
||||
_class = OFPXMC_NXM_1
|
||||
|
||||
|
||||
def generate(modname):
|
||||
import sys
|
||||
import string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user