Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 16 | |
Scott Baker | dbd960e | 2020-02-28 08:57:51 -0800 | [diff] [blame] | 17 | //Package core provides the utility for olt devices, flows and statistics |
| 18 | package core |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 19 | |
| 20 | import ( |
Esin Karaman | ccb714b | 2019-11-29 15:02:06 +0000 | [diff] [blame] | 21 | "github.com/opencord/voltha-lib-go/v3/pkg/flows" |
| 22 | "github.com/opencord/voltha-lib-go/v3/pkg/log" |
Thomas Lee S | 94109f1 | 2020-03-03 16:39:29 +0530 | [diff] [blame] | 23 | "github.com/opencord/voltha-openolt-adapter/internal/pkg/olterrors" |
Esin Karaman | ccb714b | 2019-11-29 15:02:06 +0000 | [diff] [blame] | 24 | ofp "github.com/opencord/voltha-protos/v3/go/openflow_13" |
| 25 | "github.com/opencord/voltha-protos/v3/go/voltha" |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 26 | ) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 27 | |
| 28 | /*===================================================================== |
| 29 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 30 | @TODO: Looks like this Flow id concept below is not used anywhere |
| 31 | Propose to remove the below documentation of Flow Id on confirmation |
| 32 | of the same |
| 33 | |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 34 | Flow id |
| 35 | |
| 36 | Identifies a flow within a single OLT |
| 37 | Flow Id is unique per OLT |
| 38 | Multiple GEM ports can map to same flow id |
| 39 | |
| 40 | 13 11 4 0 |
| 41 | +--------+--------------+------+ |
| 42 | | pon id | onu id | Flow | |
| 43 | | | | idx | |
| 44 | +--------+--------------+------+ |
| 45 | |
| 46 | 14 bits = 16384 flows (per OLT). |
| 47 | |
| 48 | pon id = 4 bits = 16 PON ports |
| 49 | onu id = 7 bits = 128 ONUss per PON port |
| 50 | Flow index = 3 bits = 4 bi-directional flows per ONU |
| 51 | = 8 uni-directional flows per ONU |
| 52 | |
| 53 | |
| 54 | Logical (OF) UNI port number |
| 55 | |
| 56 | OpenFlow port number corresponding to PON UNI |
| 57 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 58 | 20 12 4 0 |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 59 | +--+--------+--------------+------+ |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 60 | |0 | pon id | onu id |uni id| |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 61 | +--+--------+--------------+------+ |
| 62 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 63 | pon id = 8 bits = 256 PON ports |
| 64 | onu id = 8 bits = 256 ONUs per PON port |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 65 | |
| 66 | Logical (OF) NNI port number |
| 67 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 68 | OpenFlow port number corresponding to PON NNI |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 69 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 70 | 20 0 |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 71 | +--+----------------------------+ |
| 72 | |1 | intf_id | |
| 73 | +--+----------------------------+ |
| 74 | |
| 75 | No overlap with UNI port number space |
| 76 | |
| 77 | |
| 78 | PON OLT (OF) port number |
| 79 | |
| 80 | OpenFlow port number corresponding to PON OLT ports |
| 81 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 82 | 31 28 0 |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 83 | +--------+------------------------~~~------+ |
| 84 | | 0x2 | pon intf id | |
| 85 | +--------+------------------------~~~------+ |
| 86 | */ |
| 87 | |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 88 | const ( |
| 89 | // Number of bits for the physical UNI of the ONUs |
| 90 | bitsForUniID = 4 |
| 91 | // Number of bits for the ONU ID |
| 92 | bitsForONUID = 8 |
| 93 | // Number of bits for PON ID |
| 94 | bitsForPONID = 8 |
| 95 | // Number of bits to differentiate between UNI and NNI Logical Port |
| 96 | bitsForUNINNIDiff = 1 |
| 97 | //MaxOnusPerPon is Max number of ONUs on any PON port |
| 98 | MaxOnusPerPon = (1 << bitsForONUID) |
| 99 | //MaxPonsPerOlt is Max number of PON ports on any OLT |
| 100 | MaxPonsPerOlt = (1 << bitsForPONID) |
| 101 | //MaxUnisPerOnu is the Max number of UNI ports on any ONU |
| 102 | MaxUnisPerOnu = (1 << bitsForUniID) |
| 103 | //Bit position where the differentiation bit is located |
| 104 | nniUniDiffPos = (bitsForUniID + bitsForONUID + bitsForPONID) |
| 105 | //Bit position where the marker for PON port type of OF port is present |
| 106 | ponIntfMarkerPos = 28 |
| 107 | //Value of marker used to distinguish PON port type of OF port |
| 108 | ponIntfMarkerValue = 0x2 |
David K. Bainbridge | 794735f | 2020-02-11 21:01:37 -0800 | [diff] [blame] | 109 | // Number of bits for NNI ID |
| 110 | bitsforNNIID = 20 |
| 111 | // minNniIntPortNum is used to store start range of nni port number (1 << 20) 1048576 |
| 112 | minNniIntPortNum = (1 << bitsforNNIID) |
| 113 | // maxNniPortNum is used to store the maximum range of nni port number ((1 << 21)-1) 2097151 |
| 114 | maxNniPortNum = ((1 << (bitsforNNIID + 1)) - 1) |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 115 | ) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 116 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 117 | //MinUpstreamPortID value |
| 118 | var MinUpstreamPortID = 0xfffd |
manikkaraj k | 17652a7 | 2019-05-06 09:06:36 -0400 | [diff] [blame] | 119 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 120 | //MaxUpstreamPortID value |
| 121 | var MaxUpstreamPortID = 0xfffffffd |
| 122 | |
| 123 | var controllerPorts = []uint32{0xfffd, 0x7ffffffd, 0xfffffffd} |
| 124 | |
| 125 | //MkUniPortNum returns new UNIportNum based on intfID, inuID and uniID |
| 126 | func MkUniPortNum(intfID, onuID, uniID uint32) uint32 { |
gerardo.laurenzi | 72c8438 | 2019-07-11 15:03:46 +0000 | [diff] [blame] | 127 | var limit = int(onuID) |
| 128 | if limit > MaxOnusPerPon { |
Shrey Baid | 2691297 | 2020-04-16 21:02:31 +0530 | [diff] [blame] | 129 | logger.Warn("exceeded-the-max-onus-per-pon") |
gerardo.laurenzi | 72c8438 | 2019-07-11 15:03:46 +0000 | [diff] [blame] | 130 | } |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 131 | return (intfID << (bitsForUniID + bitsForONUID)) | (onuID << bitsForUniID) | uniID |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 132 | } |
| 133 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 134 | //OnuIDFromPortNum returns ONUID derived from portNumber |
| 135 | func OnuIDFromPortNum(portNum uint32) uint32 { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 136 | return (portNum >> bitsForUniID) & (MaxOnusPerPon - 1) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 137 | } |
| 138 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 139 | //IntfIDFromUniPortNum returns IntfID derived from portNum |
| 140 | func IntfIDFromUniPortNum(portNum uint32) uint32 { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 141 | return (portNum >> (bitsForUniID + bitsForONUID)) & (MaxPonsPerOlt - 1) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 142 | } |
| 143 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 144 | //UniIDFromPortNum return UniID derived from portNum |
| 145 | func UniIDFromPortNum(portNum uint32) uint32 { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 146 | return (portNum) & (MaxUnisPerOnu - 1) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 147 | } |
| 148 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 149 | //IntfIDToPortNo returns portId derived from intftype, intfId and portType |
| 150 | func IntfIDToPortNo(intfID uint32, intfType voltha.Port_PortType) uint32 { |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 151 | if (intfType) == voltha.Port_ETHERNET_NNI { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 152 | return (1 << nniUniDiffPos) | intfID |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 153 | } |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 154 | if (intfType) == voltha.Port_PON_OLT { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 155 | return (ponIntfMarkerValue << ponIntfMarkerPos) | intfID |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 156 | } |
| 157 | return 0 |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 158 | } |
| 159 | |
Naga Manjunath | 7615e55 | 2019-10-11 22:35:47 +0530 | [diff] [blame] | 160 | //PortNoToIntfID returns portnumber derived from interfaceID |
| 161 | func PortNoToIntfID(portno uint32, intfType voltha.Port_PortType) uint32 { |
| 162 | if (intfType) == voltha.Port_ETHERNET_NNI { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 163 | return (1 << nniUniDiffPos) ^ portno |
Naga Manjunath | 7615e55 | 2019-10-11 22:35:47 +0530 | [diff] [blame] | 164 | } |
| 165 | if (intfType) == voltha.Port_PON_OLT { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 166 | return (ponIntfMarkerValue << ponIntfMarkerPos) ^ portno |
Naga Manjunath | 7615e55 | 2019-10-11 22:35:47 +0530 | [diff] [blame] | 167 | } |
| 168 | return 0 |
| 169 | } |
| 170 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 171 | //IntfIDFromNniPortNum returns Intf ID derived from portNum |
David K. Bainbridge | 794735f | 2020-02-11 21:01:37 -0800 | [diff] [blame] | 172 | func IntfIDFromNniPortNum(portNum uint32) (uint32, error) { |
| 173 | if portNum < minNniIntPortNum || portNum > maxNniPortNum { |
Shrey Baid | 2691297 | 2020-04-16 21:02:31 +0530 | [diff] [blame] | 174 | logger.Errorw("nniportnumber-is-not-in-valid-range", log.Fields{"portnum": portNum}) |
Thomas Lee S | 94109f1 | 2020-03-03 16:39:29 +0530 | [diff] [blame] | 175 | return uint32(0), olterrors.ErrInvalidPortRange |
David K. Bainbridge | 794735f | 2020-02-11 21:01:37 -0800 | [diff] [blame] | 176 | } |
| 177 | return (portNum & 0xFFFF), nil |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 178 | } |
| 179 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 180 | //IntfIDToPortTypeName returns port type derived from the intfId |
| 181 | func IntfIDToPortTypeName(intfID uint32) voltha.Port_PortType { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 182 | if ((ponIntfMarkerValue << ponIntfMarkerPos) ^ intfID) < MaxPonsPerOlt { |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 183 | return voltha.Port_PON_OLT |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 184 | } |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 185 | if (intfID & (1 << nniUniDiffPos)) == (1 << nniUniDiffPos) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 186 | return voltha.Port_ETHERNET_NNI |
| 187 | } |
| 188 | return voltha.Port_ETHERNET_UNI |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 189 | } |
| 190 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 191 | //ExtractAccessFromFlow returns AccessDevice information |
| 192 | func ExtractAccessFromFlow(inPort, outPort uint32) (uint32, uint32, uint32, uint32) { |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 193 | if IsUpstream(outPort) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 194 | return inPort, IntfIDFromUniPortNum(inPort), OnuIDFromPortNum(inPort), UniIDFromPortNum(inPort) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 195 | } |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 196 | return outPort, IntfIDFromUniPortNum(outPort), OnuIDFromPortNum(outPort), UniIDFromPortNum(outPort) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 197 | } |
| 198 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 199 | //IsUpstream returns true for Upstream and false for downstream |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 200 | func IsUpstream(outPort uint32) bool { |
manikkaraj k | 17652a7 | 2019-05-06 09:06:36 -0400 | [diff] [blame] | 201 | for _, port := range controllerPorts { |
| 202 | if port == outPort { |
| 203 | return true |
| 204 | } |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 205 | } |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 206 | return (outPort & (1 << nniUniDiffPos)) == (1 << nniUniDiffPos) |
Manjunath Vanaraj | 39ecd41 | 2019-03-15 20:05:41 +0530 | [diff] [blame] | 207 | } |
manikkaraj k | 17652a7 | 2019-05-06 09:06:36 -0400 | [diff] [blame] | 208 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 209 | //IsControllerBoundFlow returns true/false |
manikkaraj k | 17652a7 | 2019-05-06 09:06:36 -0400 | [diff] [blame] | 210 | func IsControllerBoundFlow(outPort uint32) bool { |
| 211 | for _, port := range controllerPorts { |
| 212 | if port == outPort { |
| 213 | return true |
| 214 | } |
| 215 | } |
| 216 | return false |
| 217 | } |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 218 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 219 | //OnuIDFromUniPortNum returns onuId from give portNum information. |
| 220 | func OnuIDFromUniPortNum(portNum uint32) uint32 { |
Amit Ghosh | d4cbe48 | 2019-11-21 12:07:14 +0000 | [diff] [blame] | 221 | return (portNum >> bitsForUniID) & (MaxOnusPerPon - 1) |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 222 | } |
| 223 | |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 224 | //FlowExtractInfo fetches uniport from the flow, based on which it gets and returns ponInf, onuID, uniID, inPort and ethType |
| 225 | func FlowExtractInfo(flow *ofp.OfpFlowStats, flowDirection string) (uint32, uint32, uint32, uint32, uint32, uint32, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 226 | var uniPortNo uint32 |
| 227 | var ponIntf uint32 |
| 228 | var onuID uint32 |
| 229 | var uniID uint32 |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 230 | var inPort uint32 |
| 231 | var ethType uint32 |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 232 | |
| 233 | if flowDirection == "upstream" { |
Scott Baker | 355d174 | 2019-10-24 10:57:52 -0700 | [diff] [blame] | 234 | if uniPortNo = flows.GetChildPortFromTunnelId(flow); uniPortNo == 0 { |
| 235 | for _, field := range flows.GetOfbFields(flow) { |
| 236 | if field.GetType() == flows.IN_PORT { |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 237 | uniPortNo = field.GetPort() |
| 238 | break |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | } else if flowDirection == "downstream" { |
Scott Baker | 355d174 | 2019-10-24 10:57:52 -0700 | [diff] [blame] | 243 | if uniPortNo = flows.GetChildPortFromTunnelId(flow); uniPortNo == 0 { |
| 244 | for _, field := range flows.GetOfbFields(flow) { |
| 245 | if field.GetType() == flows.METADATA { |
| 246 | for _, action := range flows.GetActions(flow) { |
| 247 | if action.Type == flows.OUTPUT { |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 248 | if out := action.GetOutput(); out != nil { |
| 249 | uniPortNo = out.GetPort() |
| 250 | } |
| 251 | break |
| 252 | } |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 253 | } |
Scott Baker | 355d174 | 2019-10-24 10:57:52 -0700 | [diff] [blame] | 254 | } else if field.GetType() == flows.IN_PORT { |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 255 | inPort = field.GetPort() |
Scott Baker | 355d174 | 2019-10-24 10:57:52 -0700 | [diff] [blame] | 256 | } else if field.GetType() == flows.ETH_TYPE { |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 257 | ethType = field.GetEthType() |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 258 | } |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | if uniPortNo == 0 { |
Shrey Baid | 2691297 | 2020-04-16 21:02:31 +0530 | [diff] [blame] | 264 | return 0, 0, 0, 0, 0, 0, olterrors.NewErrNotFound("pon-interface", log.Fields{"flow-direction": flowDirection}, nil) |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 265 | } |
| 266 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 267 | ponIntf = IntfIDFromUniPortNum(uniPortNo) |
| 268 | onuID = OnuIDFromUniPortNum(uniPortNo) |
| 269 | uniID = UniIDFromPortNum(uniPortNo) |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 270 | |
Shrey Baid | 2691297 | 2020-04-16 21:02:31 +0530 | [diff] [blame] | 271 | logger.Debugw("flow-extract-info-result", |
| 272 | log.Fields{ |
| 273 | "uniportno": uniPortNo, |
| 274 | "pon-intf": ponIntf, |
| 275 | "onu-id": onuID, |
| 276 | "uni-id": uniID, |
| 277 | "inport": inPort, |
| 278 | "ethtype": ethType}) |
Girish Gowdra | 3d63303 | 2019-12-10 16:37:05 +0530 | [diff] [blame] | 279 | |
Humera Kouser | 94d7a84 | 2019-08-25 19:04:32 -0400 | [diff] [blame] | 280 | return uniPortNo, ponIntf, onuID, uniID, inPort, ethType, nil |
Manjunath Vanarajulu | 28c3e82 | 2019-05-16 11:14:28 -0400 | [diff] [blame] | 281 | } |