aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-10 13:54:12 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:15 -0500
commit8327d000e092f737f7d6602258e5c7575686cc37 (patch)
tree259cb9df3fe6fc0eae293746d05cccde6500ce70 /drivers/net/ixgbe
parentaaf918ba8cf941a6aa7dc52c307470b48259a751 (diff)
ixgbe endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
-rw-r--r--drivers/net/ixgbe/ixgbe_type.h52
2 files changed, 30 insertions, 30 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 28c0fac1feed..3732dd6c4b2a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2106,7 +2106,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter,
2106 l4len = tcp_hdrlen(skb); 2106 l4len = tcp_hdrlen(skb);
2107 *hdr_len += l4len; 2107 *hdr_len += l4len;
2108 2108
2109 if (skb->protocol == ntohs(ETH_P_IP)) { 2109 if (skb->protocol == htons(ETH_P_IP)) {
2110 struct iphdr *iph = ip_hdr(skb); 2110 struct iphdr *iph = ip_hdr(skb);
2111 iph->tot_len = 0; 2111 iph->tot_len = 0;
2112 iph->check = 0; 2112 iph->check = 0;
@@ -2147,7 +2147,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter,
2147 type_tucmd_mlhl |= (IXGBE_TXD_CMD_DEXT | 2147 type_tucmd_mlhl |= (IXGBE_TXD_CMD_DEXT |
2148 IXGBE_ADVTXD_DTYP_CTXT); 2148 IXGBE_ADVTXD_DTYP_CTXT);
2149 2149
2150 if (skb->protocol == ntohs(ETH_P_IP)) 2150 if (skb->protocol == htons(ETH_P_IP))
2151 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; 2151 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
2152 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP; 2152 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP;
2153 context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl); 2153 context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
@@ -2202,7 +2202,7 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
2202 IXGBE_ADVTXD_DTYP_CTXT); 2202 IXGBE_ADVTXD_DTYP_CTXT);
2203 2203
2204 if (skb->ip_summed == CHECKSUM_PARTIAL) { 2204 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2205 if (skb->protocol == ntohs(ETH_P_IP)) 2205 if (skb->protocol == htons(ETH_P_IP))
2206 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; 2206 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
2207 2207
2208 if (skb->sk->sk_protocol == IPPROTO_TCP) 2208 if (skb->sk->sk_protocol == IPPROTO_TCP)
@@ -2402,7 +2402,7 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2402 tx_flags |= (vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT); 2402 tx_flags |= (vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT);
2403 } 2403 }
2404 2404
2405 if (skb->protocol == ntohs(ETH_P_IP)) 2405 if (skb->protocol == htons(ETH_P_IP))
2406 tx_flags |= IXGBE_TX_FLAGS_IPV4; 2406 tx_flags |= IXGBE_TX_FLAGS_IPV4;
2407 first = tx_ring->next_to_use; 2407 first = tx_ring->next_to_use;
2408 tso = ixgbe_tso(adapter, tx_ring, skb, tx_flags, &hdr_len); 2408 tso = ixgbe_tso(adapter, tx_ring, skb, tx_flags, &hdr_len);
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index e60787a66e58..1ad7cb9c25a8 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -1003,19 +1003,19 @@
1003struct ixgbe_legacy_tx_desc { 1003struct ixgbe_legacy_tx_desc {
1004 u64 buffer_addr; /* Address of the descriptor's data buffer */ 1004 u64 buffer_addr; /* Address of the descriptor's data buffer */
1005 union { 1005 union {
1006 u32 data; 1006 __le32 data;
1007 struct { 1007 struct {
1008 u16 length; /* Data buffer length */ 1008 __le16 length; /* Data buffer length */
1009 u8 cso; /* Checksum offset */ 1009 u8 cso; /* Checksum offset */
1010 u8 cmd; /* Descriptor control */ 1010 u8 cmd; /* Descriptor control */
1011 } flags; 1011 } flags;
1012 } lower; 1012 } lower;
1013 union { 1013 union {
1014 u32 data; 1014 __le32 data;
1015 struct { 1015 struct {
1016 u8 status; /* Descriptor status */ 1016 u8 status; /* Descriptor status */
1017 u8 css; /* Checksum start */ 1017 u8 css; /* Checksum start */
1018 u16 vlan; 1018 __le16 vlan;
1019 } fields; 1019 } fields;
1020 } upper; 1020 } upper;
1021}; 1021};
@@ -1023,61 +1023,61 @@ struct ixgbe_legacy_tx_desc {
1023/* Transmit Descriptor - Advanced */ 1023/* Transmit Descriptor - Advanced */
1024union ixgbe_adv_tx_desc { 1024union ixgbe_adv_tx_desc {
1025 struct { 1025 struct {
1026 u64 buffer_addr; /* Address of descriptor's data buf */ 1026 __le64 buffer_addr; /* Address of descriptor's data buf */
1027 u32 cmd_type_len; 1027 __le32 cmd_type_len;
1028 u32 olinfo_status; 1028 __le32 olinfo_status;
1029 } read; 1029 } read;
1030 struct { 1030 struct {
1031 u64 rsvd; /* Reserved */ 1031 __le64 rsvd; /* Reserved */
1032 u32 nxtseq_seed; 1032 __le32 nxtseq_seed;
1033 u32 status; 1033 __le32 status;
1034 } wb; 1034 } wb;
1035}; 1035};
1036 1036
1037/* Receive Descriptor - Legacy */ 1037/* Receive Descriptor - Legacy */
1038struct ixgbe_legacy_rx_desc { 1038struct ixgbe_legacy_rx_desc {
1039 u64 buffer_addr; /* Address of the descriptor's data buffer */ 1039 __le64 buffer_addr; /* Address of the descriptor's data buffer */
1040 u16 length; /* Length of data DMAed into data buffer */ 1040 __le16 length; /* Length of data DMAed into data buffer */
1041 u16 csum; /* Packet checksum */ 1041 u16 csum; /* Packet checksum */
1042 u8 status; /* Descriptor status */ 1042 u8 status; /* Descriptor status */
1043 u8 errors; /* Descriptor Errors */ 1043 u8 errors; /* Descriptor Errors */
1044 u16 vlan; 1044 __le16 vlan;
1045}; 1045};
1046 1046
1047/* Receive Descriptor - Advanced */ 1047/* Receive Descriptor - Advanced */
1048union ixgbe_adv_rx_desc { 1048union ixgbe_adv_rx_desc {
1049 struct { 1049 struct {
1050 u64 pkt_addr; /* Packet buffer address */ 1050 __le64 pkt_addr; /* Packet buffer address */
1051 u64 hdr_addr; /* Header buffer address */ 1051 __le64 hdr_addr; /* Header buffer address */
1052 } read; 1052 } read;
1053 struct { 1053 struct {
1054 struct { 1054 struct {
1055 struct { 1055 struct {
1056 u16 pkt_info; /* RSS type, Packet type */ 1056 __le16 pkt_info; /* RSS type, Packet type */
1057 u16 hdr_info; /* Split Header, header len */ 1057 __le16 hdr_info; /* Split Header, header len */
1058 } lo_dword; 1058 } lo_dword;
1059 union { 1059 union {
1060 u32 rss; /* RSS Hash */ 1060 __le32 rss; /* RSS Hash */
1061 struct { 1061 struct {
1062 u16 ip_id; /* IP id */ 1062 __le16 ip_id; /* IP id */
1063 u16 csum; /* Packet Checksum */ 1063 u16 csum; /* Packet Checksum */
1064 } csum_ip; 1064 } csum_ip;
1065 } hi_dword; 1065 } hi_dword;
1066 } lower; 1066 } lower;
1067 struct { 1067 struct {
1068 u32 status_error; /* ext status/error */ 1068 __le32 status_error; /* ext status/error */
1069 u16 length; /* Packet length */ 1069 __le16 length; /* Packet length */
1070 u16 vlan; /* VLAN tag */ 1070 __le16 vlan; /* VLAN tag */
1071 } upper; 1071 } upper;
1072 } wb; /* writeback */ 1072 } wb; /* writeback */
1073}; 1073};
1074 1074
1075/* Context descriptors */ 1075/* Context descriptors */
1076struct ixgbe_adv_tx_context_desc { 1076struct ixgbe_adv_tx_context_desc {
1077 u32 vlan_macip_lens; 1077 __le32 vlan_macip_lens;
1078 u32 seqnum_seed; 1078 __le32 seqnum_seed;
1079 u32 type_tucmd_mlhl; 1079 __le32 type_tucmd_mlhl;
1080 u32 mss_l4len_idx; 1080 __le32 mss_l4len_idx;
1081}; 1081};
1082 1082
1083/* Adv Transmit Descriptor Config Masks */ 1083/* Adv Transmit Descriptor Config Masks */