This commit is contained in:
Matthias Radestock committed 2016-01-13 11:39:32 +00:00
1 parent 28561237ab
commit 80df5a7906
1 file changed
+7 -10
+7 -10
View File
@@ -28,18 +28,11 @@ type bridgeSender func(key PacketKey, lock *fastDatapathLock) FlowOp
type missHandler func(fks odp.FlowKeys, lock *fastDatapathLock) FlowOp type missHandler func(fks odp.FlowKeys, lock *fastDatapathLock) FlowOp
type FastDatapath struct { type FastDatapath struct {
dpname string dpname string
lock sync.Mutex // guards state and synchronises use of dpif
// The mtu from the datapath netdev (which should match the
// mtus on all the veths hooked up to the datapath). We
// validate that we are able to support that mtu.
mtu int
// The lock guards the FastDatapath state, and also
// synchronizes use of the dpif
lock sync.Mutex
dpif *odp.Dpif dpif *odp.Dpif
dp odp.DatapathHandle dp odp.DatapathHandle
mtu int // [1]
deleteFlowsCount uint64 deleteFlowsCount uint64
missCount uint64 missCount uint64
missHandlers map[odp.VportID]missHandler missHandlers map[odp.VportID]missHandler
@@ -66,6 +59,10 @@ type FastDatapath struct {
// forwarders by remote peer // forwarders by remote peer
forwarders map[mesh.PeerName]*fastDatapathForwarder forwarders map[mesh.PeerName]*fastDatapathForwarder
// [1] The mtu from the datapath netdev (which should match the
// mtus on all the veths hooked up to the datapath). We validate
// that we are able to support that mtu.
} }
func NewFastDatapath(dpName string, port int) (*FastDatapath, error) { func NewFastDatapath(dpName string, port int) (*FastDatapath, error) {