Skip to content

Commit

Permalink
Remove unuse comment and add new comment for xdp.NewSocket()
Browse files Browse the repository at this point in the history
  • Loading branch information
kerwenwwer committed Apr 8, 2024
1 parent 6a550be commit 47b7bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func ProgramHandler(LinkName string, obj *bpf.BpfObjects, debug bool) (*xdp.Prog
log.Fatalf("[BPF Handler]: Failed to attach XDP: %v", err)
}

// Create AF_XDP socket
xsk, err := xdp.NewSocket(link.Attrs().Index, 0, &xdp.SocketOptions{
NumFrames: 128,
FrameSize: 2048,
Expand All @@ -53,7 +54,6 @@ func ProgramHandler(LinkName string, obj *bpf.BpfObjects, debug bool) (*xdp.Prog
}

return program, xsk
//return nil, nil
}

type MyPacket common.Packet

0 comments on commit 47b7bc2

Please sign in to comment.