From a7a6f0f1629537072764848deaa37709b0301b66 Mon Sep 17 00:00:00 2001 From: Yuta HIGUCHI Date: Thu, 9 Mar 2017 11:22:14 -0800 Subject: [PATCH] Fix optical port description to align to standard See tx_pwr_min, tx_pwr_max type. According to OpenFlow spec, those fields are defined as uint16_t, but loxigen definition was defined as uint32_t. /* Optical port description property. */ struct ofp_port_desc_prop_optical { uint16_t type; /* OFPPDPT_3OPTICAL. */ uint16_t length; /* Length in bytes of this property. */ uint8_t pad[4]; /* Align to 64 bits. */ uint32_t supported; /* Features supported by the port. */ uint32_t tx_min_freq_lmda; /* Minimum TX Frequency/Wavelength */ uint32_t tx_max_freq_lmda; /* Maximum TX Frequency/Wavelength */ uint32_t tx_grid_freq_lmda; /* TX Grid Spacing Frequency/Wavelength */ uint32_t rx_min_freq_lmda; /* Minimum RX Frequency/Wavelength */ uint32_t rx_max_freq_lmda; /* Maximum RX Frequency/Wavelength */ uint32_t rx_grid_freq_lmda; /* RX Grid Spacing Frequency/Wavelength */ uint16_t tx_pwr_min; /* Minimum TX power */ uint16_t tx_pwr_max; /* Maximum TX power */ }; OFP_ASSERT(sizeof(struct ofp_port_desc_prop_optical) == 40); --- openflow_input/standard-1.4 | 4 ++-- openflow_input/standard-1.5 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openflow_input/standard-1.4 b/openflow_input/standard-1.4 index 51a1a1906..af657d190 100644 --- a/openflow_input/standard-1.4 +++ b/openflow_input/standard-1.4 @@ -872,8 +872,8 @@ struct of_port_desc_prop_optical : of_port_desc_prop { uint32_t rx_min_freq_lmda; uint32_t rx_max_freq_lmda; uint32_t rx_grid_freq_lmda; - uint32_t tx_pwr_min; - uint32_t tx_pwr_max; + uint16_t tx_pwr_min; + uint16_t tx_pwr_max; }; struct of_port_desc_prop_experimenter : of_port_desc_prop { diff --git a/openflow_input/standard-1.5 b/openflow_input/standard-1.5 index a875c5ad7..cf0a8eca5 100644 --- a/openflow_input/standard-1.5 +++ b/openflow_input/standard-1.5 @@ -239,8 +239,8 @@ struct of_port_desc_prop_optical : of_port_desc_prop { uint32_t rx_min_freq_lmda; uint32_t rx_max_freq_lmda; uint32_t rx_grid_freq_lmda; - uint32_t tx_pwr_min; - uint32_t tx_pwr_max; + uint16_t tx_pwr_min; + uint16_t tx_pwr_max; }; /* Ingress pipeline fields description property */