Skip to content

Commit e4fa1c5

Browse files
bremlmdlayher
authored andcommitted
bpf: fix type of Extension constants
Fixes golang/go#20559 Change-Id: Ieb794badb56c6830e32028133f67223424323ea2 Reviewed-on: https://go-review.googlesource.com/44710 Reviewed-by: Matt Layher <[email protected]> Run-TryBot: Matt Layher <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 3da985c commit e4fa1c5

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

bpf/constants.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,54 +76,54 @@ const (
7676
// ExtLen returns the length of the packet.
7777
ExtLen Extension = 1
7878
// ExtProto returns the packet's L3 protocol type.
79-
ExtProto = 0
79+
ExtProto Extension = 0
8080
// ExtType returns the packet's type (skb->pkt_type in the kernel)
8181
//
8282
// TODO: better documentation. How nice an API do we want to
8383
// provide for these esoteric extensions?
84-
ExtType = 4
84+
ExtType Extension = 4
8585
// ExtPayloadOffset returns the offset of the packet payload, or
8686
// the first protocol header that the kernel does not know how to
8787
// parse.
88-
ExtPayloadOffset = 52
88+
ExtPayloadOffset Extension = 52
8989
// ExtInterfaceIndex returns the index of the interface on which
9090
// the packet was received.
91-
ExtInterfaceIndex = 8
91+
ExtInterfaceIndex Extension = 8
9292
// ExtNetlinkAttr returns the netlink attribute of type X at
9393
// offset A.
94-
ExtNetlinkAttr = 12
94+
ExtNetlinkAttr Extension = 12
9595
// ExtNetlinkAttrNested returns the nested netlink attribute of
9696
// type X at offset A.
97-
ExtNetlinkAttrNested = 16
97+
ExtNetlinkAttrNested Extension = 16
9898
// ExtMark returns the packet's mark value.
99-
ExtMark = 20
99+
ExtMark Extension = 20
100100
// ExtQueue returns the packet's assigned hardware queue.
101-
ExtQueue = 24
101+
ExtQueue Extension = 24
102102
// ExtLinkLayerType returns the packet's hardware address type
103103
// (e.g. Ethernet, Infiniband).
104-
ExtLinkLayerType = 28
104+
ExtLinkLayerType Extension = 28
105105
// ExtRXHash returns the packets receive hash.
106106
//
107107
// TODO: figure out what this rxhash actually is.
108-
ExtRXHash = 32
108+
ExtRXHash Extension = 32
109109
// ExtCPUID returns the ID of the CPU processing the current
110110
// packet.
111-
ExtCPUID = 36
111+
ExtCPUID Extension = 36
112112
// ExtVLANTag returns the packet's VLAN tag.
113-
ExtVLANTag = 44
113+
ExtVLANTag Extension = 44
114114
// ExtVLANTagPresent returns non-zero if the packet has a VLAN
115115
// tag.
116116
//
117117
// TODO: I think this might be a lie: it reads bit 0x1000 of the
118118
// VLAN header, which changed meaning in recent revisions of the
119119
// spec - this extension may now return meaningless information.
120-
ExtVLANTagPresent = 48
120+
ExtVLANTagPresent Extension = 48
121121
// ExtVLANProto returns 0x8100 if the frame has a VLAN header,
122122
// 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some
123123
// other value if no VLAN information is present.
124-
ExtVLANProto = 60
124+
ExtVLANProto Extension = 60
125125
// ExtRand returns a uniformly random uint32.
126-
ExtRand = 56
126+
ExtRand Extension = 56
127127
)
128128

129129
// The following gives names to various bit patterns used in opcode construction.

0 commit comments

Comments
 (0)