Skip to content

Commit

Permalink
support for changing max number of flows
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoles committed Jun 18, 2024
1 parent f719b57 commit a7804c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/davidcoles/cue v0.0.13
github.com/davidcoles/xvs v0.1.14
github.com/davidcoles/xvs v0.1.15
github.com/elastic/go-elasticsearch/v7 v7.17.10
)

Expand Down
10 changes: 8 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ func main() {
sock := flag.String("s", "", "socket") // used internally
addr := flag.String("a", "", "address")
native := flag.Bool("n", false, "Native mode XDP")
asn := flag.Uint("A", 0, "Autonomous system number for loopback peer")
delay := flag.Uint("D", 0, "Delay between initialisaton of interfaces")
asn := flag.Uint("A", 0, "Autonomous system number for loopback peer") // experimental - may change
delay := flag.Uint("D", 0, "Delay between initialisaton of interfaces") // experimental - may change
flows := flag.Uint("F", 0, "Set maximum number of flows") // experimental - may change

// Changing number of flows will only work on some kernels
// Not supported: 5.4.0-171-generic
// Supported: 5.15.0-112-generic

flag.Parse()

Expand Down Expand Up @@ -154,6 +159,7 @@ func main() {
InitDelay: uint8(*delay),
NAT: true,
Debug: &Debug{Log: logs.sub("xvs")},
MaxFlows: uint32(*flows),
}

err = client.Start()
Expand Down

0 comments on commit a7804c9

Please sign in to comment.