Skip to content

Commit

Permalink
Remove GetOffloadInfo() (#32)
Browse files Browse the repository at this point in the history
* Remove GetOffloadInfo()
* Remove GetOffloadInfo() from bind_windows as well
* Allow lightweight tags to be used in the version
  • Loading branch information
leninalive authored May 24, 2024
1 parent 87d8c00 commit 2e77804
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MAKEFLAGS += --no-print-directory

generate-version-and-build:
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
tag="$$(git describe --dirty 2>/dev/null)" && \
tag="$$(git describe --tags --dirty 2>/dev/null)" && \
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
echo "$$ver" > version.go && \
Expand Down
5 changes: 0 additions & 5 deletions conn/bind_std.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@ func (s *StdNetBind) BatchSize() int {
return 1
}

func (s *StdNetBind) GetOffloadInfo() string {
return fmt.Sprintf("ipv4TxOffload: %v, ipv4RxOffload: %v\nipv6TxOffload: %v, ipv6RxOffload: %v",
s.ipv4TxOffload, s.ipv4RxOffload, s.ipv6TxOffload, s.ipv6RxOffload)
}

func (s *StdNetBind) Close() error {
s.mu.Lock()
defer s.mu.Unlock()
Expand Down
4 changes: 0 additions & 4 deletions conn/bind_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,6 @@ func (bind *WinRingBind) BatchSize() int {
return 1
}

func (bind *WinRingBind) GetOffloadInfo() string {
return ""
}

func (bind *WinRingBind) SetMark(mark uint32) error {
return nil
}
Expand Down
2 changes: 0 additions & 2 deletions conn/bindtest/bindtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ func (c *ChannelBind) Close() error {

func (c *ChannelBind) BatchSize() int { return 1 }

func (c *ChannelBind) GetOffloadInfo() string { return "" }

func (c *ChannelBind) SetMark(mark uint32) error { return nil }

func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc {
Expand Down
2 changes: 0 additions & 2 deletions conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ type Bind interface {
// BatchSize is the number of buffers expected to be passed to
// the ReceiveFuncs, and the maximum expected to be passed to SendBatch.
BatchSize() int

GetOffloadInfo() string
}

// BindSocketToInterface is implemented by Bind objects that support being
Expand Down
1 change: 0 additions & 1 deletion device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ func (device *Device) BindUpdate() error {
}

device.log.Verbosef("UDP bind has been updated")
device.log.Verbosef(netc.bind.GetOffloadInfo())
return nil
}

Expand Down

0 comments on commit 2e77804

Please sign in to comment.