Skip to content

Commit 2e77804

Browse files
authored
Remove GetOffloadInfo() (#32)
* Remove GetOffloadInfo() * Remove GetOffloadInfo() from bind_windows as well * Allow lightweight tags to be used in the version
1 parent 87d8c00 commit 2e77804

File tree

6 files changed

+1
-15
lines changed

6 files changed

+1
-15
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MAKEFLAGS += --no-print-directory
99

1010
generate-version-and-build:
1111
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
12-
tag="$$(git describe --dirty 2>/dev/null)" && \
12+
tag="$$(git describe --tags --dirty 2>/dev/null)" && \
1313
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
1414
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
1515
echo "$$ver" > version.go && \

conn/bind_std.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,6 @@ func (s *StdNetBind) BatchSize() int {
298298
return 1
299299
}
300300

301-
func (s *StdNetBind) GetOffloadInfo() string {
302-
return fmt.Sprintf("ipv4TxOffload: %v, ipv4RxOffload: %v\nipv6TxOffload: %v, ipv6RxOffload: %v",
303-
s.ipv4TxOffload, s.ipv4RxOffload, s.ipv6TxOffload, s.ipv6RxOffload)
304-
}
305-
306301
func (s *StdNetBind) Close() error {
307302
s.mu.Lock()
308303
defer s.mu.Unlock()

conn/bind_windows.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,6 @@ func (bind *WinRingBind) BatchSize() int {
328328
return 1
329329
}
330330

331-
func (bind *WinRingBind) GetOffloadInfo() string {
332-
return ""
333-
}
334-
335331
func (bind *WinRingBind) SetMark(mark uint32) error {
336332
return nil
337333
}

conn/bindtest/bindtest.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ func (c *ChannelBind) Close() error {
9191

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

94-
func (c *ChannelBind) GetOffloadInfo() string { return "" }
95-
9694
func (c *ChannelBind) SetMark(mark uint32) error { return nil }
9795

9896
func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc {

conn/conn.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ type Bind interface {
5555
// BatchSize is the number of buffers expected to be passed to
5656
// the ReceiveFuncs, and the maximum expected to be passed to SendBatch.
5757
BatchSize() int
58-
59-
GetOffloadInfo() string
6058
}
6159

6260
// BindSocketToInterface is implemented by Bind objects that support being

device/device.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ func (device *Device) BindUpdate() error {
547547
}
548548

549549
device.log.Verbosef("UDP bind has been updated")
550-
device.log.Verbosef(netc.bind.GetOffloadInfo())
551550
return nil
552551
}
553552

0 commit comments

Comments
 (0)