Skip to content

Commit

Permalink
Upgrade to go-ipfix v0.5.12 (#3352)
Browse files Browse the repository at this point in the history
Signed-off-by: Yanjun Zhou <zhouya@vmware.com>
  • Loading branch information
yanjunz97 committed Feb 28, 2022
1 parent 06d3b14 commit b147eb2
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ci/kind/test-e2e-kind.sh
Expand Up @@ -129,7 +129,7 @@ COMMON_IMAGES_LIST=("k8s.gcr.io/e2e-test-images/agnhost:2.29" \
"projects.registry.vmware.com/library/busybox" \
"projects.registry.vmware.com/antrea/nginx:1.21.6-alpine" \
"projects.registry.vmware.com/antrea/perftool" \
"projects.registry.vmware.com/antrea/ipfix-collector:v0.5.11" \
"projects.registry.vmware.com/antrea/ipfix-collector:v0.5.12" \
"projects.registry.vmware.com/antrea/wireguard-go:0.0.20210424")
for image in "${COMMON_IMAGES_LIST[@]}"; do
for i in `seq 3`; do
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -46,7 +46,7 @@ require (
github.com/stretchr/testify v1.7.0
github.com/ti-mo/conntrack v0.4.0
github.com/vishvananda/netlink v1.1.1-0.20210510164352-d17758a128bf
github.com/vmware/go-ipfix v0.5.11
github.com/vmware/go-ipfix v0.5.12
go.uber.org/multierr v1.6.0
golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -747,8 +747,8 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vmware/go-ipfix v0.5.11 h1:1731EiUCTkhrK0YTxVbpT3YVyfyIj3ACua+QjL+9eq0=
github.com/vmware/go-ipfix v0.5.11/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/vmware/go-ipfix v0.5.12 h1:mqQknlvnvDY25apPNy9c27ri3FMDFIhzvO68Kk5Qp58=
github.com/vmware/go-ipfix v0.5.12/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/flowaggregator/flowaggregator.go
Expand Up @@ -475,7 +475,7 @@ func (fa *flowAggregator) sendFlowKeyRecord(key ipfixintermediate.FlowKey, recor
if err != nil {
return err
}
if err = fa.aggregationProcess.ResetStatElementsInRecord(record.Record); err != nil {
if err = fa.aggregationProcess.ResetStatAndThroughputElementsInRecord(record.Record); err != nil {
return err
}
klog.V(4).Infof("Data set sent successfully: %d Bytes sent", sentBytes)
Expand Down
2 changes: 1 addition & 1 deletion pkg/flowaggregator/flowaggregator_test.go
Expand Up @@ -147,7 +147,7 @@ func TestFlowAggregator_sendFlowKeyRecord(t *testing.T) {
mockRecord.EXPECT().GetOrderedElementList().Return(elementList)
mockDataSet.EXPECT().AddRecord(elementList, templateID).Return(nil)
mockIPFIXExpProc.EXPECT().SendSet(mockDataSet).Return(0, nil)
mockAggregationProcess.EXPECT().ResetStatElementsInRecord(mockRecord).Return(nil)
mockAggregationProcess.EXPECT().ResetStatAndThroughputElementsInRecord(mockRecord).Return(nil)
mockAggregationProcess.EXPECT().AreCorrelatedFieldsFilled(*tc.flowRecord).Return(false)
emptyStr := make([]byte, 0)
sourcePodNameElem, _ := ipfixentities.DecodeAndCreateInfoElementWithValue(ipfixentities.NewInfoElement("sourcePodName", 0, 0, ipfixregistry.AntreaEnterpriseID, 0), emptyStr)
Expand Down
6 changes: 3 additions & 3 deletions pkg/ipfix/ipfix_intermediate.go
Expand Up @@ -31,7 +31,7 @@ type IPFIXAggregationProcess interface {
ForAllExpiredFlowRecordsDo(callback ipfixintermediate.FlowKeyRecordMapCallBack) error
GetExpiryFromExpirePriorityQueue() time.Duration
GetRecords(flowKey *ipfixintermediate.FlowKey) []map[string]interface{}
ResetStatElementsInRecord(record ipfixentities.Record) error
ResetStatAndThroughputElementsInRecord(record ipfixentities.Record) error
SetCorrelatedFieldsFilled(record *ipfixintermediate.AggregationFlowRecord)
AreCorrelatedFieldsFilled(record ipfixintermediate.AggregationFlowRecord) bool
IsAggregatedRecordIPv4(record ipfixintermediate.AggregationFlowRecord) bool
Expand Down Expand Up @@ -76,8 +76,8 @@ func (ap *ipfixAggregationProcess) GetRecords(flowKey *ipfixintermediate.FlowKey
return ap.AggregationProcess.GetRecords(flowKey)
}

func (ap *ipfixAggregationProcess) ResetStatElementsInRecord(record ipfixentities.Record) error {
return ap.AggregationProcess.ResetStatElementsInRecord(record)
func (ap *ipfixAggregationProcess) ResetStatAndThroughputElementsInRecord(record ipfixentities.Record) error {
return ap.AggregationProcess.ResetStatAndThroughputElementsInRecord(record)
}

func (ap *ipfixAggregationProcess) SetCorrelatedFieldsFilled(record *ipfixintermediate.AggregationFlowRecord) {
Expand Down
14 changes: 7 additions & 7 deletions pkg/ipfix/testing/mock_ipfix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/octant/go.sum
Expand Up @@ -1032,7 +1032,7 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vmware-tanzu/octant v0.24.0 h1:PMLU2QG6czSdCl6/xn7lHkHGi+Dv43rxL+AZL6sPJ24=
github.com/vmware-tanzu/octant v0.24.0/go.mod h1:yK0Nu7wzzvV25/T8nf4NQFMUUA7sLcp0gk96CjOTUiQ=
github.com/vmware/go-ipfix v0.5.11/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/vmware/go-ipfix v0.5.12/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework.go
Expand Up @@ -120,7 +120,7 @@ const (
netshootImage = "projects.registry.vmware.com/antrea/netshoot:v0.1"
nginxImage = "projects.registry.vmware.com/antrea/nginx:1.21.6-alpine"
perftoolImage = "projects.registry.vmware.com/antrea/perftool"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.5.11"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.5.12"
ipfixCollectorPort = "4739"

nginxLBService = "nginx-loadbalancer"
Expand Down

0 comments on commit b147eb2

Please sign in to comment.