diff options
| author | Daniel Borkmann <dborkman@redhat.com> | 2013-04-22 20:39:30 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-04-25 01:22:22 -0400 |
| commit | 7276d5d743d775388bf382cd7bdea1a14e486d32 (patch) | |
| tree | 192c1c739d9192da8d15b43ca43fc78e6bcd9460 /include/uapi/linux | |
| parent | 7a51384cc9f4145de352d266821b63f1bb0d46ff (diff) | |
packet: minor: convert status bits into shifting format
This makes it more readable and clearer what bits are still free to
use. The compiler reduces this to a constant for us anyway.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/if_packet.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h index 8136658ea477..4dfc234d80e5 100644 --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h | |||
| @@ -86,19 +86,19 @@ struct tpacket_auxdata { | |||
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | /* Rx ring - header status */ | 88 | /* Rx ring - header status */ |
| 89 | #define TP_STATUS_KERNEL 0x0 | 89 | #define TP_STATUS_KERNEL 0 |
| 90 | #define TP_STATUS_USER 0x1 | 90 | #define TP_STATUS_USER (1 << 0) |
| 91 | #define TP_STATUS_COPY 0x2 | 91 | #define TP_STATUS_COPY (1 << 1) |
| 92 | #define TP_STATUS_LOSING 0x4 | 92 | #define TP_STATUS_LOSING (1 << 2) |
| 93 | #define TP_STATUS_CSUMNOTREADY 0x8 | 93 | #define TP_STATUS_CSUMNOTREADY (1 << 3) |
| 94 | #define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ | 94 | #define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */ |
| 95 | #define TP_STATUS_BLK_TMO 0x20 | 95 | #define TP_STATUS_BLK_TMO (1 << 5) |
| 96 | 96 | ||
| 97 | /* Tx ring - header status */ | 97 | /* Tx ring - header status */ |
| 98 | #define TP_STATUS_AVAILABLE 0x0 | 98 | #define TP_STATUS_AVAILABLE 0 |
| 99 | #define TP_STATUS_SEND_REQUEST 0x1 | 99 | #define TP_STATUS_SEND_REQUEST (1 << 0) |
| 100 | #define TP_STATUS_SENDING 0x2 | 100 | #define TP_STATUS_SENDING (1 << 1) |
| 101 | #define TP_STATUS_WRONG_FORMAT 0x4 | 101 | #define TP_STATUS_WRONG_FORMAT (1 << 2) |
| 102 | 102 | ||
| 103 | /* Rx ring - feature request bits */ | 103 | /* Rx ring - feature request bits */ |
| 104 | #define TP_FT_REQ_FILL_RXHASH 0x1 | 104 | #define TP_FT_REQ_FILL_RXHASH 0x1 |
