From b76000ec6bb61640fb012e2163c7bca8326235ef Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 26 Sep 2013 13:08:08 +0900 Subject: [PATCH] ofproto: remove unused definitions g/c unused OF1.2/1.3 OFP_PACKET_IN_DATA_OFFSET definitions. they seem to be copy-and-paste leftover from OF1.0. Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_2.py | 1 - ryu/ofproto/ofproto_v1_3.py | 1 - ryu/tests/unit/ofproto/test_ofproto_v12.py | 1 - 3 files changed, 3 deletions(-) diff --git a/ryu/ofproto/ofproto_v1_2.py b/ryu/ofproto/ofproto_v1_2.py index 16cf205e..104c585d 100644 --- a/ryu/ofproto/ofproto_v1_2.py +++ b/ryu/ofproto/ofproto_v1_2.py @@ -545,7 +545,6 @@ OFPCR_ROLE_SLAVE = 3 # Read-only access. # struct ofp_packet_in OFP_PACKET_IN_PACK_STR = '!IHBB' # the last 2x is for ofp_packet_in::data OFP_PACKET_IN_SIZE = 24 -OFP_PACKET_IN_DATA_OFFSET = 18 assert (calcsize(OFP_PACKET_IN_PACK_STR) + OFP_MATCH_SIZE + OFP_HEADER_SIZE == OFP_PACKET_IN_SIZE) diff --git a/ryu/ofproto/ofproto_v1_3.py b/ryu/ofproto/ofproto_v1_3.py index bba98ba8..c476c0a1 100644 --- a/ryu/ofproto/ofproto_v1_3.py +++ b/ryu/ofproto/ofproto_v1_3.py @@ -733,7 +733,6 @@ assert (calcsize(OFP_ASYNC_CONFIG_PACK_STR) + OFP_HEADER_SIZE == # struct ofp_packet_in OFP_PACKET_IN_PACK_STR = '!IHBBQ' OFP_PACKET_IN_SIZE = 32 -OFP_PACKET_IN_DATA_OFFSET = 18 assert (calcsize(OFP_PACKET_IN_PACK_STR) + OFP_MATCH_SIZE + OFP_HEADER_SIZE == OFP_PACKET_IN_SIZE) diff --git a/ryu/tests/unit/ofproto/test_ofproto_v12.py b/ryu/tests/unit/ofproto/test_ofproto_v12.py index 245d4e77..1d7551f3 100644 --- a/ryu/tests/unit/ofproto/test_ofproto_v12.py +++ b/ryu/tests/unit/ofproto/test_ofproto_v12.py @@ -475,7 +475,6 @@ class TestOfprot12(unittest.TestCase): def test_struct_ofp_packet_in(self): eq_(OFP_PACKET_IN_PACK_STR, '!IHBB') eq_(OFP_PACKET_IN_SIZE, 24) - eq_(OFP_PACKET_IN_DATA_OFFSET, 18) def test_enum_ofp_packet_in_reason(self): eq_(OFPR_NO_MATCH, 0)