From 7131e9e1875b75524fbc60286a4784c457f27815 Mon Sep 17 00:00:00 2001 From: Hang Yan Date: Sun, 7 Apr 2024 15:45:11 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lan --- pkg/agent/openflow/framework.go | 4 ++-- pkg/agent/openflow/packetin.go | 2 +- pkg/agent/openflow/packetsampling.go | 2 +- pkg/agent/openflow/pipeline.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/agent/openflow/framework.go b/pkg/agent/openflow/framework.go index cf551b8e125..d64073e8c0e 100644 --- a/pkg/agent/openflow/framework.go +++ b/pkg/agent/openflow/framework.go @@ -341,8 +341,8 @@ type traceableFeature interface { timeoutSeconds uint16) []binding.Flow } -type sampleFeature interface { - flowsToSample(dataplaneTag uint8, +type samplingFeature interface { + flowsToSampling(dataplaneTag uint8, ovsMetersAreSupported, senderOnly bool, receiverOnly bool, diff --git a/pkg/agent/openflow/packetin.go b/pkg/agent/openflow/packetin.go index 91cee1a9738..cc4cdf5d0ea 100644 --- a/pkg/agent/openflow/packetin.go +++ b/pkg/agent/openflow/packetin.go @@ -53,7 +53,7 @@ const ( // PacketInCategorySvcReject is used to process the Service packets not matching any // Endpoints within packetIn message. PacketInCategorySvcReject - // PacketSampling is used for packetIn messages related to sampling. + // PacketInCategoryPS is used for packetIn messages related to sampling. PacketInCategoryPS // PacketIn operations below are used to decide which operation(s) should be diff --git a/pkg/agent/openflow/packetsampling.go b/pkg/agent/openflow/packetsampling.go index a3988e1e9f8..9605ebfe7f6 100644 --- a/pkg/agent/openflow/packetsampling.go +++ b/pkg/agent/openflow/packetsampling.go @@ -1,4 +1,4 @@ -// Copyright 2022 Antrea Authors +// Copyright 2024 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/agent/openflow/pipeline.go b/pkg/agent/openflow/pipeline.go index 596f1a64696..6c743c94752 100644 --- a/pkg/agent/openflow/pipeline.go +++ b/pkg/agent/openflow/pipeline.go @@ -422,7 +422,7 @@ type client struct { traceableFeatures []traceableFeature featurePacketSampling *featurePacketSampling - sampleFeatures []sampleFeature + samplingFeatures []samplingFeature pipelines map[binding.PipelineID]binding.Pipeline