Skip to content

Commit

Permalink
udpate
Browse files Browse the repository at this point in the history
Signed-off-by: Hang Yan <[email protected]>
  • Loading branch information
hangyan committed Apr 7, 2024
1 parent 7131e9e commit 3c39276
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/agent/openflow/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ func (c *client) generatePipelines() {
c.enableL7FlowExporter)
c.activatedFeatures = append(c.activatedFeatures, c.featurePodConnectivity)
c.traceableFeatures = append(c.traceableFeatures, c.featurePodConnectivity)
c.sampleFeatures = append(c.sampleFeatures, c.featurePodConnectivity)
c.samplingFeatures = append(c.samplingFeatures, c.featurePodConnectivity)

c.featureService = newFeatureService(c.cookieAllocator,
c.nodeIPChecker,
Expand All @@ -950,7 +950,7 @@ func (c *client) generatePipelines() {
c.connectUplinkToBridge)
c.activatedFeatures = append(c.activatedFeatures, c.featureService)
c.traceableFeatures = append(c.traceableFeatures, c.featureService)
c.sampleFeatures = append(c.sampleFeatures, c.featureService)
c.samplingFeatures = append(c.samplingFeatures, c.featureService)
}

if c.nodeType == config.ExternalNode {
Expand Down Expand Up @@ -1249,8 +1249,8 @@ func (c *client) InstallPacketSamplingFlows(dataplaneTag uint8, senderOnly, rece
cacheKey := fmt.Sprintf("%x", dataplaneTag)
var flows []binding.Flow

for _, f := range c.sampleFeatures {
flows = append(flows, f.flowsToSample(dataplaneTag,
for _, f := range c.samplingFeatures {
flows = append(flows, f.flowsToSampling(dataplaneTag,
c.ovsMetersAreSupported,
senderOnly,
receiverOnly,
Expand Down
10 changes: 5 additions & 5 deletions pkg/agent/openflow/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ type client struct {
traceableFeatures []traceableFeature

featurePacketSampling *featurePacketSampling
samplingFeatures []samplingFeature
samplingFeatures []samplingFeature

pipelines map[binding.PipelineID]binding.Pipeline

Expand Down Expand Up @@ -886,9 +886,9 @@ func matchTransportHeader(packet *binding.Packet, flowBuilder binding.FlowBuilde
return flowBuilder
}

// flowsToSample generates flows for packet sampling. DSCP flag is used as a mark for the target flow.
// flowsToSampling generates flows for packet sampling. DSCP flag is used as a mark for the target flow.
// When output, the flag will be cleared.
func (f *featurePodConnectivity) flowsToSample(dataplaneTag uint8,
func (f *featurePodConnectivity) flowsToSampling(dataplaneTag uint8,
ovsMetersAreSupported,
senderOnly bool,
receiverOnly bool,
Expand Down Expand Up @@ -1242,8 +1242,8 @@ func (f *featurePodConnectivity) flowsToTrace(dataplaneTag uint8,
return flows
}

// flowsToTrace is used to generate flows for PacketSampling in featureService.
func (f *featureService) flowsToSample(dataplaneTag uint8,
// flowsToSampling is used to generate flows for PacketSampling in featureService.
func (f *featureService) flowsToSampling(dataplaneTag uint8,
ovsMetersAreSupported,
senderOnly bool,
receiverOnly bool,
Expand Down

0 comments on commit 3c39276

Please sign in to comment.