diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ffba6028a..101b928e6 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -604,6 +604,22 @@ "ImportPath": "github.com/contiv/contivmodel/client", "Rev": "e00f6dded54d05d37acb451c4533fe09fd40c69f" }, + { + "ImportPath": "github.com/contiv/libOpenflow/common", + "Rev": "a0b2f38509204a254a2f13c00b4663b9bd31559f" + }, + { + "ImportPath": "github.com/contiv/libOpenflow/openflow13", + "Rev": "a0b2f38509204a254a2f13c00b4663b9bd31559f" + }, + { + "ImportPath": "github.com/contiv/libOpenflow/protocol", + "Rev": "a0b2f38509204a254a2f13c00b4663b9bd31559f" + }, + { + "ImportPath": "github.com/contiv/libOpenflow/util", + "Rev": "a0b2f38509204a254a2f13c00b4663b9bd31559f" + }, { "ImportPath": "github.com/contiv/libovsdb", "Comment": "v0.1-12-gd0061a5", @@ -619,23 +635,23 @@ }, { "ImportPath": "github.com/contiv/ofnet", - "Rev": "fe7f8c6e5ad4ff02d171f2f77443ae1e6c26e2c9" + "Rev": "b44a11b0bcffa08b3a7546e76fa2709457396867" }, { "ImportPath": "github.com/contiv/ofnet/ofctrl", - "Rev": "fe7f8c6e5ad4ff02d171f2f77443ae1e6c26e2c9" + "Rev": "b44a11b0bcffa08b3a7546e76fa2709457396867" }, { "ImportPath": "github.com/contiv/ofnet/ovsdbDriver", - "Rev": "fe7f8c6e5ad4ff02d171f2f77443ae1e6c26e2c9" + "Rev": "b44a11b0bcffa08b3a7546e76fa2709457396867" }, { "ImportPath": "github.com/contiv/ofnet/pqueue", - "Rev": "fe7f8c6e5ad4ff02d171f2f77443ae1e6c26e2c9" + "Rev": "b44a11b0bcffa08b3a7546e76fa2709457396867" }, { "ImportPath": "github.com/contiv/ofnet/rpcHub", - "Rev": "fe7f8c6e5ad4ff02d171f2f77443ae1e6c26e2c9" + "Rev": "b44a11b0bcffa08b3a7546e76fa2709457396867" }, { "ImportPath": "github.com/contiv/remotessh", @@ -1176,22 +1192,6 @@ "ImportPath": "github.com/satori/go.uuid", "Rev": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048" }, - { - "ImportPath": "github.com/shaleman/libOpenflow/common", - "Rev": "ef74a407cc85370620a5515d627580b20f18a582" - }, - { - "ImportPath": "github.com/shaleman/libOpenflow/openflow13", - "Rev": "ef74a407cc85370620a5515d627580b20f18a582" - }, - { - "ImportPath": "github.com/shaleman/libOpenflow/protocol", - "Rev": "ef74a407cc85370620a5515d627580b20f18a582" - }, - { - "ImportPath": "github.com/shaleman/libOpenflow/util", - "Rev": "ef74a407cc85370620a5515d627580b20f18a582" - }, { "ImportPath": "github.com/spf13/afero", "Rev": "cc9c21814bb945440253108c4d3c65c85aac3c68" diff --git a/vendor/github.com/shaleman/libOpenflow/LICENSE b/vendor/github.com/contiv/libOpenflow/LICENSE similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/LICENSE rename to vendor/github.com/contiv/libOpenflow/LICENSE diff --git a/vendor/github.com/shaleman/libOpenflow/common/header.go b/vendor/github.com/contiv/libOpenflow/common/header.go similarity index 97% rename from vendor/github.com/shaleman/libOpenflow/common/header.go rename to vendor/github.com/contiv/libOpenflow/common/header.go index 6ff7dc2b4..842a13d32 100644 --- a/vendor/github.com/shaleman/libOpenflow/common/header.go +++ b/vendor/github.com/contiv/libOpenflow/common/header.go @@ -5,16 +5,17 @@ package common import ( "encoding/binary" "errors" + "sync/atomic" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) var messageXid uint32 = 1 func NewHeaderGenerator(ver int) func() Header { return func() Header { - messageXid += 1 - p := Header{uint8(ver), 0, 8, messageXid} + xid := atomic.AddUint32(&messageXid, 1) + p := Header{uint8(ver), 0, 8, xid} return p } } diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/action.go b/vendor/github.com/contiv/libOpenflow/openflow13/action.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/action.go rename to vendor/github.com/contiv/libOpenflow/openflow13/action.go index 8904f92ac..aba66818b 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/action.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/action.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "errors" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) // ofp_action_type 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/flowmod.go b/vendor/github.com/contiv/libOpenflow/openflow13/flowmod.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/flowmod.go rename to vendor/github.com/contiv/libOpenflow/openflow13/flowmod.go index cda7266ca..482dc3415 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/flowmod.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/flowmod.go @@ -4,7 +4,7 @@ import ( "encoding/binary" log "github.com/Sirupsen/logrus" - "github.com/shaleman/libOpenflow/common" + "github.com/contiv/libOpenflow/common" ) // ofp_flow_mod 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/group.go b/vendor/github.com/contiv/libOpenflow/openflow13/group.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/group.go rename to vendor/github.com/contiv/libOpenflow/openflow13/group.go index 04c46f05b..acaf6d316 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/group.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/group.go @@ -6,7 +6,7 @@ import ( "encoding/binary" log "github.com/Sirupsen/logrus" - "github.com/shaleman/libOpenflow/common" + "github.com/contiv/libOpenflow/common" ) const ( diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/instruction.go b/vendor/github.com/contiv/libOpenflow/openflow13/instruction.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/instruction.go rename to vendor/github.com/contiv/libOpenflow/openflow13/instruction.go index f08d2797a..bf943c195 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/instruction.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/instruction.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "errors" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) // ofp_instruction_type 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/match.go b/vendor/github.com/contiv/libOpenflow/openflow13/match.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/match.go rename to vendor/github.com/contiv/libOpenflow/openflow13/match.go index 940a5a84c..f6cbac28c 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/match.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/match.go @@ -5,7 +5,7 @@ import ( "log" "net" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) // ofp_match 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/multipart.go b/vendor/github.com/contiv/libOpenflow/openflow13/multipart.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/multipart.go rename to vendor/github.com/contiv/libOpenflow/openflow13/multipart.go index e3595edd7..38cb1bc0b 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/multipart.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/multipart.go @@ -5,8 +5,8 @@ import ( log "github.com/Sirupsen/logrus" - "github.com/shaleman/libOpenflow/common" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/common" + "github.com/contiv/libOpenflow/util" ) // ofp_multipart_request 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/openflow13.go b/vendor/github.com/contiv/libOpenflow/openflow13/openflow13.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/openflow13.go rename to vendor/github.com/contiv/libOpenflow/openflow13/openflow13.go index 6666f9c70..b84849971 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/openflow13.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/openflow13.go @@ -13,9 +13,9 @@ import ( "errors" "net" - "github.com/shaleman/libOpenflow/common" - "github.com/shaleman/libOpenflow/protocol" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/common" + "github.com/contiv/libOpenflow/protocol" + "github.com/contiv/libOpenflow/util" ) const ( diff --git a/vendor/github.com/shaleman/libOpenflow/openflow13/port.go b/vendor/github.com/contiv/libOpenflow/openflow13/port.go similarity index 99% rename from vendor/github.com/shaleman/libOpenflow/openflow13/port.go rename to vendor/github.com/contiv/libOpenflow/openflow13/port.go index 88fdb3ad1..57c6b30d6 100644 --- a/vendor/github.com/shaleman/libOpenflow/openflow13/port.go +++ b/vendor/github.com/contiv/libOpenflow/openflow13/port.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "net" - "github.com/shaleman/libOpenflow/common" + "github.com/contiv/libOpenflow/common" ) // ofp_port 1.3 diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/arp.go b/vendor/github.com/contiv/libOpenflow/protocol/arp.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/protocol/arp.go rename to vendor/github.com/contiv/libOpenflow/protocol/arp.go diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/dhcp.go b/vendor/github.com/contiv/libOpenflow/protocol/dhcp.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/protocol/dhcp.go rename to vendor/github.com/contiv/libOpenflow/protocol/dhcp.go diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/ethernet.go b/vendor/github.com/contiv/libOpenflow/protocol/ethernet.go similarity index 98% rename from vendor/github.com/shaleman/libOpenflow/protocol/ethernet.go rename to vendor/github.com/contiv/libOpenflow/protocol/ethernet.go index 45d64a214..f3878ae90 100644 --- a/vendor/github.com/shaleman/libOpenflow/protocol/ethernet.go +++ b/vendor/github.com/contiv/libOpenflow/protocol/ethernet.go @@ -5,7 +5,7 @@ import ( "errors" "net" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) // see http://en.wikipedia.org/wiki/EtherType diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/icmp.go b/vendor/github.com/contiv/libOpenflow/protocol/icmp.go similarity index 96% rename from vendor/github.com/shaleman/libOpenflow/protocol/icmp.go rename to vendor/github.com/contiv/libOpenflow/protocol/icmp.go index d9425680b..5b37d632c 100644 --- a/vendor/github.com/shaleman/libOpenflow/protocol/icmp.go +++ b/vendor/github.com/contiv/libOpenflow/protocol/icmp.go @@ -39,7 +39,7 @@ func (i *ICMP) UnmarshalBinary(data []byte) error { i.Code = data[1] i.Checksum = binary.BigEndian.Uint16(data[2:4]) - for n, _ := range data[4:] { + for n := range data[4:] { i.Data = append(i.Data, data[n]) } return nil diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/ip.go b/vendor/github.com/contiv/libOpenflow/protocol/ip.go similarity index 98% rename from vendor/github.com/shaleman/libOpenflow/protocol/ip.go rename to vendor/github.com/contiv/libOpenflow/protocol/ip.go index 8c5a06ebd..925d47807 100644 --- a/vendor/github.com/shaleman/libOpenflow/protocol/ip.go +++ b/vendor/github.com/contiv/libOpenflow/protocol/ip.go @@ -5,7 +5,7 @@ import ( "errors" "net" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/util" ) const ( diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/lldp.go b/vendor/github.com/contiv/libOpenflow/protocol/lldp.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/protocol/lldp.go rename to vendor/github.com/contiv/libOpenflow/protocol/lldp.go diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/tcp.go b/vendor/github.com/contiv/libOpenflow/protocol/tcp.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/protocol/tcp.go rename to vendor/github.com/contiv/libOpenflow/protocol/tcp.go diff --git a/vendor/github.com/shaleman/libOpenflow/protocol/udp.go b/vendor/github.com/contiv/libOpenflow/protocol/udp.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/protocol/udp.go rename to vendor/github.com/contiv/libOpenflow/protocol/udp.go diff --git a/vendor/github.com/shaleman/libOpenflow/util/stream.go b/vendor/github.com/contiv/libOpenflow/util/stream.go similarity index 82% rename from vendor/github.com/shaleman/libOpenflow/util/stream.go rename to vendor/github.com/contiv/libOpenflow/util/stream.go index e662e0434..ac6323059 100644 --- a/vendor/github.com/shaleman/libOpenflow/util/stream.go +++ b/vendor/github.com/contiv/libOpenflow/util/stream.go @@ -9,6 +9,8 @@ import ( log "github.com/Sirupsen/logrus" ) +const numParserGoroutines = 25 + type BufferPool struct { Empty chan *bytes.Buffer Full chan *bytes.Buffer @@ -35,6 +37,8 @@ type MessageStream struct { pool *BufferPool // Message parser parser Parser + // Channel to shut down the parser goroutine + parserShutdown chan bool // OpenFlow Version Version uint8 // Channel on which to publish connection errors @@ -54,6 +58,7 @@ func NewMessageStream(conn net.Conn, parser Parser) *MessageStream { conn, NewBufferPool(), parser, + make(chan bool, 1), // parserShutdown 0, make(chan error, 1), // Error make(chan Message, 1), // Inbound @@ -63,10 +68,10 @@ func NewMessageStream(conn net.Conn, parser Parser) *MessageStream { go m.outbound() go m.inbound() - - for i := 0; i < 25; i++ { + for i := 0; i < numParserGoroutines; i++ { go m.parse() } + return m } @@ -81,6 +86,9 @@ func (m *MessageStream) outbound() { case <-m.Shutdown: log.Infof("Closing OpenFlow message stream.") m.conn.Close() + for i := 0; i < numParserGoroutines; i++ { + m.parserShutdown <- true + } return case msg := <-m.Outbound: // Forward outbound messages to conn @@ -143,17 +151,21 @@ func (m *MessageStream) inbound() { // Parse incoming message func (m *MessageStream) parse() { + errMessage := "received: %v and encountered error: %v" for { - b := <-m.pool.Full - log.Debugf("Rcvd: %v", b.Bytes()) - msg, err := m.parser.Parse(b.Bytes()) - // Log all message parsing errors. - if err != nil { - log.Print(err) - } + select { + case b := <-m.pool.Full: + msg, err := m.parser.Parse(b.Bytes()) + // Log all message parsing errors. + if err != nil { + log.Errorf(errMessage, b.Bytes(), err) + } - m.Inbound <- msg - b.Reset() - m.pool.Empty <- b + m.Inbound <- msg + b.Reset() + m.pool.Empty <- b + case <-m.parserShutdown: + return + } } } diff --git a/vendor/github.com/shaleman/libOpenflow/util/util.go b/vendor/github.com/contiv/libOpenflow/util/util.go similarity index 100% rename from vendor/github.com/shaleman/libOpenflow/util/util.go rename to vendor/github.com/contiv/libOpenflow/util/util.go diff --git a/vendor/github.com/contiv/ofnet/Makefile b/vendor/github.com/contiv/ofnet/Makefile index 7cb5abf1b..a1d93c76e 100755 --- a/vendor/github.com/contiv/ofnet/Makefile +++ b/vendor/github.com/contiv/ofnet/Makefile @@ -20,9 +20,9 @@ test: build host-build: ./checks "./*.go ./libpkt/ ./ofctrl/ ./ovsdbDriver/ ./ovsSwitch/ ./pqueue/ ./rpcHub/" go get github.com/tools/godep - godep go install ./ ./ofctrl + go install ./ ./ofctrl host-test: - sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./ - sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./ofctrl - sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./pqueue + PATH=${PATH} sudo -E /usr/local/go/bin/go test -v ./ + PATH=${PATH} sudo -E /usr/local/go/bin/go test -v ./ofctrl + PATH=${PATH} sudo -E /usr/local/go/bin/go test -v ./pqueue diff --git a/vendor/github.com/contiv/ofnet/hostBridge.go b/vendor/github.com/contiv/ofnet/hostBridge.go index 2adc66338..5cfa09e01 100755 --- a/vendor/github.com/contiv/ofnet/hostBridge.go +++ b/vendor/github.com/contiv/ofnet/hostBridge.go @@ -20,10 +20,10 @@ import ( "time" log "github.com/Sirupsen/logrus" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" "github.com/contiv/ofnet/ovsdbDriver" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" ) // hostAgent state diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraph.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraph.go index 0932240c2..c03ee298e 100644 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraph.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraph.go @@ -17,7 +17,7 @@ package ofctrl // This file defines the forwarding graph API import ( - "github.com/shaleman/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/openflow13" ) // This implements a forwarding graph. diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlood.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlood.go index 00e39a0a0..3ebfba634 100644 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlood.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlood.go @@ -19,7 +19,7 @@ package ofctrl import ( "errors" - "github.com/shaleman/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/openflow13" log "github.com/Sirupsen/logrus" ) diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlow.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlow.go index 72a6e63d0..074b354f6 100644 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlow.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraphFlow.go @@ -23,7 +23,7 @@ import ( "sync" log "github.com/Sirupsen/logrus" - "github.com/shaleman/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/openflow13" ) // Small subset of openflow fields we currently support diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraphOutput.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraphOutput.go index c19598d88..c72cc152d 100644 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraphOutput.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraphOutput.go @@ -17,7 +17,7 @@ package ofctrl // This file implements the forwarding graph API for the output element import ( - "github.com/shaleman/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/openflow13" ) type Output struct { diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraphSwitch.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraphSwitch.go index 6a1009e69..e354c93a2 100644 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraphSwitch.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraphSwitch.go @@ -18,7 +18,8 @@ package ofctrl import ( "errors" - "github.com/shaleman/libOpenflow/openflow13" + + "github.com/contiv/libOpenflow/openflow13" ) // Initialize the fgraph elements on the switch diff --git a/vendor/github.com/contiv/ofnet/ofctrl/fgraphTable.go b/vendor/github.com/contiv/ofnet/ofctrl/fgraphTable.go index af7a83b61..bb66e0828 100755 --- a/vendor/github.com/contiv/ofnet/ofctrl/fgraphTable.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/fgraphTable.go @@ -18,9 +18,10 @@ package ofctrl import ( "fmt" - "github.com/shaleman/libOpenflow/openflow13" "sync" + "github.com/contiv/libOpenflow/openflow13" + log "github.com/Sirupsen/logrus" ) diff --git a/vendor/github.com/contiv/ofnet/ofctrl/ofSwitch.go b/vendor/github.com/contiv/ofnet/ofctrl/ofSwitch.go index c8362340a..e51281abb 100755 --- a/vendor/github.com/contiv/ofnet/ofctrl/ofSwitch.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/ofSwitch.go @@ -18,9 +18,9 @@ import ( "net" "time" - "github.com/shaleman/libOpenflow/common" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/common" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/util" log "github.com/Sirupsen/logrus" cmap "github.com/streamrail/concurrent-map" diff --git a/vendor/github.com/contiv/ofnet/ofctrl/ofctrl.go b/vendor/github.com/contiv/ofnet/ofctrl/ofctrl.go index b92f725a0..f9c1a3469 100755 --- a/vendor/github.com/contiv/ofnet/ofctrl/ofctrl.go +++ b/vendor/github.com/contiv/ofnet/ofctrl/ofctrl.go @@ -22,9 +22,9 @@ import ( "sync" "time" - "github.com/shaleman/libOpenflow/common" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/util" + "github.com/contiv/libOpenflow/common" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/util" log "github.com/Sirupsen/logrus" ) diff --git a/vendor/github.com/contiv/ofnet/ofnet.go b/vendor/github.com/contiv/ofnet/ofnet.go index aacde82c9..8a2a7270a 100755 --- a/vendor/github.com/contiv/ofnet/ofnet.go +++ b/vendor/github.com/contiv/ofnet/ofnet.go @@ -21,8 +21,8 @@ import ( "net" "time" + "github.com/contiv/libOpenflow/openflow13" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" ) const ( diff --git a/vendor/github.com/contiv/ofnet/ofnetAgent.go b/vendor/github.com/contiv/ofnet/ofnetAgent.go index 890f32613..4c5bf8afd 100755 --- a/vendor/github.com/contiv/ofnet/ofnetAgent.go +++ b/vendor/github.com/contiv/ofnet/ofnetAgent.go @@ -32,11 +32,11 @@ import ( "time" log "github.com/Sirupsen/logrus" + "github.com/contiv/libOpenflow/openflow13" "github.com/contiv/ofnet/ofctrl" "github.com/contiv/ofnet/ovsdbDriver" "github.com/contiv/ofnet/rpcHub" "github.com/jainvipin/bitset" - "github.com/shaleman/libOpenflow/openflow13" cmap "github.com/streamrail/concurrent-map" ) diff --git a/vendor/github.com/contiv/ofnet/ofnetSvcProxy.go b/vendor/github.com/contiv/ofnet/ofnetSvcProxy.go index 480b1b132..299c5ea9e 100644 --- a/vendor/github.com/contiv/ofnet/ofnetSvcProxy.go +++ b/vendor/github.com/contiv/ofnet/ofnetSvcProxy.go @@ -23,9 +23,9 @@ import ( "sync" "time" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/pqueue" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" log "github.com/Sirupsen/logrus" "github.com/contiv/ofnet/ofctrl" @@ -294,7 +294,7 @@ func (proxy *ServiceProxy) addService(svcName string) error { } // add all providers - for p, _ := range prov.Providers { + for p := range prov.Providers { oState.addProvHdl(p) } @@ -452,7 +452,7 @@ func (proxy *ServiceProxy) delProvider(svcIP, provIP string) error { } // Remove flows NAT'ed to this provider - for epIP, _ := range operEntry.ProvHdl[provIP].ClientEPs { + for epIP := range operEntry.ProvHdl[provIP].ClientEPs { for _, p := range operEntry.Ports { operEntry.delNATFlow(proxy, epIP, "Dst", &p) operEntry.delNATFlow(proxy, epIP, "Src", &p) @@ -526,7 +526,7 @@ func (proxy *ServiceProxy) ProviderUpdate(svcName string, providers []string) { } // Delete any providers that disappeared - for p, _ := range currProvs.Providers { + for p := range currProvs.Providers { _, found = newProvs[p] if !found { proxy.delProvider(sSpec.IpAddress, p) diff --git a/vendor/github.com/contiv/ofnet/ovsdbDriver/ovsdbDriver.go b/vendor/github.com/contiv/ofnet/ovsdbDriver/ovsdbDriver.go index 1fee29c6d..d57926655 100644 --- a/vendor/github.com/contiv/ofnet/ovsdbDriver/ovsdbDriver.go +++ b/vendor/github.com/contiv/ofnet/ovsdbDriver/ovsdbDriver.go @@ -181,7 +181,7 @@ func (self *OvsDriver) CreateBridge(bridgeName string) error { // Inserting/Deleting a Bridge row in Bridge table requires mutating // the open_vswitch table. - brUuid := []libovsdb.UUID{{namedUuidStr}} + brUuid := []libovsdb.UUID{{GoUuid: namedUuidStr}} mutateUuid := brUuid mutateSet, _ := libovsdb.NewOvsSet(mutateUuid) mutation := libovsdb.NewMutation("bridges", "insert", mutateSet) @@ -208,7 +208,7 @@ func (self *OvsDriver) DeleteBridge(bridgeName string) error { defer self.lock.RUnlock() namedUuidStr := "dummy" - brUuid := []libovsdb.UUID{{namedUuidStr}} + brUuid := []libovsdb.UUID{{GoUuid: namedUuidStr}} // simple insert/delete operation brOp := libovsdb.Operation{} @@ -223,7 +223,7 @@ func (self *OvsDriver) DeleteBridge(bridgeName string) error { for uuid, row := range self.ovsdbCache["Bridge"] { name := row.Fields["name"].(string) if name == bridgeName { - brUuid = []libovsdb.UUID{{uuid}} + brUuid = []libovsdb.UUID{{GoUuid: uuid}} break } } @@ -251,8 +251,8 @@ func (self *OvsDriver) DeleteBridge(bridgeName string) error { func (self *OvsDriver) CreatePort(intfName, intfType string, vlanTag uint) error { portUuidStr := intfName intfUuidStr := fmt.Sprintf("Intf%s", intfName) - portUuid := []libovsdb.UUID{{portUuidStr}} - intfUuid := []libovsdb.UUID{{intfUuidStr}} + portUuid := []libovsdb.UUID{{GoUuid: portUuidStr}} + intfUuid := []libovsdb.UUID{{GoUuid: intfUuidStr}} opStr := "insert" var err error = nil @@ -315,7 +315,7 @@ func (self *OvsDriver) DeletePort(intfName string) error { defer self.lock.RUnlock() portUuidStr := intfName - portUuid := []libovsdb.UUID{{portUuidStr}} + portUuid := []libovsdb.UUID{{GoUuid: portUuidStr}} opStr := "delete" // insert/delete a row in Interface table @@ -338,7 +338,7 @@ func (self *OvsDriver) DeletePort(intfName string) error { for uuid, row := range self.ovsdbCache["Port"] { name := row.Fields["name"].(string) if name == intfName { - portUuid = []libovsdb.UUID{{uuid}} + portUuid = []libovsdb.UUID{{GoUuid: uuid}} break } } @@ -363,8 +363,8 @@ func (self *OvsDriver) DeletePort(intfName string) error { func (self *OvsDriver) CreateVtep(intfName string, vtepRemoteIP string) error { portUuidStr := intfName intfUuidStr := fmt.Sprintf("Intf%s", intfName) - portUuid := []libovsdb.UUID{{portUuidStr}} - intfUuid := []libovsdb.UUID{{intfUuidStr}} + portUuid := []libovsdb.UUID{{GoUuid: portUuidStr}} + intfUuid := []libovsdb.UUID{{GoUuid: intfUuidStr}} opStr := "insert" intfType := "vxlan" var err error = nil @@ -437,7 +437,7 @@ func (self *OvsDriver) AddController(ipAddr string, portNo uint16) error { // Format target string target := fmt.Sprintf("tcp:%s:%d", ipAddr, portNo) ctrlerUuidStr := fmt.Sprintf("local") - ctrlerUuid := []libovsdb.UUID{{ctrlerUuidStr}} + ctrlerUuid := []libovsdb.UUID{{GoUuid: ctrlerUuidStr}} // If controller already exists, nothing to do if self.IsControllerPresent(ipAddr, portNo) { diff --git a/vendor/github.com/contiv/ofnet/util.go b/vendor/github.com/contiv/ofnet/util.go index 45f4ea784..76f57efd1 100755 --- a/vendor/github.com/contiv/ofnet/util.go +++ b/vendor/github.com/contiv/ofnet/util.go @@ -24,9 +24,9 @@ import ( "strconv" "strings" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" "github.com/vishvananda/netlink" log "github.com/Sirupsen/logrus" diff --git a/vendor/github.com/contiv/ofnet/vlanBridge.go b/vendor/github.com/contiv/ofnet/vlanBridge.go index d5d977bc8..bb0b3a35c 100755 --- a/vendor/github.com/contiv/ofnet/vlanBridge.go +++ b/vendor/github.com/contiv/ofnet/vlanBridge.go @@ -24,9 +24,9 @@ import ( "syscall" "time" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" cmap "github.com/streamrail/concurrent-map" "github.com/vishvananda/netlink" diff --git a/vendor/github.com/contiv/ofnet/vlrouter.go b/vendor/github.com/contiv/ofnet/vlrouter.go index 58b01a367..c8b8f40d1 100755 --- a/vendor/github.com/contiv/ofnet/vlrouter.go +++ b/vendor/github.com/contiv/ofnet/vlrouter.go @@ -34,9 +34,9 @@ import ( "strings" log "github.com/Sirupsen/logrus" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" cmap "github.com/streamrail/concurrent-map" ) diff --git a/vendor/github.com/contiv/ofnet/vrouter.go b/vendor/github.com/contiv/ofnet/vrouter.go index b89d76173..b1529e219 100755 --- a/vendor/github.com/contiv/ofnet/vrouter.go +++ b/vendor/github.com/contiv/ofnet/vrouter.go @@ -33,9 +33,9 @@ import ( "net/rpc" "strings" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" "github.com/spf13/pflag" log "github.com/Sirupsen/logrus" diff --git a/vendor/github.com/contiv/ofnet/vxlanBridge.go b/vendor/github.com/contiv/ofnet/vxlanBridge.go index 35a7c9c53..889f7d58e 100755 --- a/vendor/github.com/contiv/ofnet/vxlanBridge.go +++ b/vendor/github.com/contiv/ofnet/vxlanBridge.go @@ -23,9 +23,9 @@ import ( "net/rpc" "strings" + "github.com/contiv/libOpenflow/openflow13" + "github.com/contiv/libOpenflow/protocol" "github.com/contiv/ofnet/ofctrl" - "github.com/shaleman/libOpenflow/openflow13" - "github.com/shaleman/libOpenflow/protocol" log "github.com/Sirupsen/logrus" cmap "github.com/streamrail/concurrent-map"