func (r *of10Session) OnFeaturesReply(f openflow.Factory, w trans.Writer, v openflow.FeaturesReply) error { ports := v.Ports() for _, p := range ports { if p.Number() > of10.OFPP_MAX { continue } r.device.addPort(p.Number(), p) if !p.IsPortDown() && !p.IsLinkDown() && r.device.isValid() { // Send LLDP to update network topology if err := sendLLDP(r.device.ID(), f, w, p); err != nil { r.log.Err(fmt.Sprintf("OF10Session: failed to send LLDP: %v", err)) } } r.log.Debug(fmt.Sprintf("OF10Session: PortNum=%v, AdminUp=%v, LinkUp=%v", p.Number(), !p.IsPortDown(), !p.IsLinkDown())) if err := sendQueueConfigRequest(f, w, p.Number()); err != nil { r.log.Err(fmt.Sprintf("OF10Session: sending queue config request: %v", err)) } } return nil }