|
@@ -1539,7 +1539,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
|
|
hdr.network += ETH_HLEN;
|
|
hdr.network += ETH_HLEN;
|
|
|
|
|
|
/* handle any vlan tag if present */
|
|
/* handle any vlan tag if present */
|
|
- if (protocol == __constant_htons(ETH_P_8021Q)) {
|
|
|
|
|
|
+ if (protocol == htons(ETH_P_8021Q)) {
|
|
if ((hdr.network - data) > (max_len - VLAN_HLEN))
|
|
if ((hdr.network - data) > (max_len - VLAN_HLEN))
|
|
return max_len;
|
|
return max_len;
|
|
|
|
|
|
@@ -1548,7 +1548,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
|
|
}
|
|
}
|
|
|
|
|
|
/* handle L3 protocols */
|
|
/* handle L3 protocols */
|
|
- if (protocol == __constant_htons(ETH_P_IP)) {
|
|
|
|
|
|
+ if (protocol == htons(ETH_P_IP)) {
|
|
if ((hdr.network - data) > (max_len - sizeof(struct iphdr)))
|
|
if ((hdr.network - data) > (max_len - sizeof(struct iphdr)))
|
|
return max_len;
|
|
return max_len;
|
|
|
|
|
|
@@ -1562,7 +1562,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
|
|
/* record next protocol if header is present */
|
|
/* record next protocol if header is present */
|
|
if (!(hdr.ipv4->frag_off & htons(IP_OFFSET)))
|
|
if (!(hdr.ipv4->frag_off & htons(IP_OFFSET)))
|
|
nexthdr = hdr.ipv4->protocol;
|
|
nexthdr = hdr.ipv4->protocol;
|
|
- } else if (protocol == __constant_htons(ETH_P_IPV6)) {
|
|
|
|
|
|
+ } else if (protocol == htons(ETH_P_IPV6)) {
|
|
if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
|
|
if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
|
|
return max_len;
|
|
return max_len;
|
|
|
|
|
|
@@ -1570,7 +1570,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
|
|
nexthdr = hdr.ipv6->nexthdr;
|
|
nexthdr = hdr.ipv6->nexthdr;
|
|
hlen = sizeof(struct ipv6hdr);
|
|
hlen = sizeof(struct ipv6hdr);
|
|
#ifdef IXGBE_FCOE
|
|
#ifdef IXGBE_FCOE
|
|
- } else if (protocol == __constant_htons(ETH_P_FCOE)) {
|
|
|
|
|
|
+ } else if (protocol == htons(ETH_P_FCOE)) {
|
|
if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN))
|
|
if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN))
|
|
return max_len;
|
|
return max_len;
|
|
hlen = FCOE_HEADER_LEN;
|
|
hlen = FCOE_HEADER_LEN;
|
|
@@ -6520,7 +6520,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
|
|
/* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
|
|
/* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
|
|
type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP;
|
|
type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP;
|
|
|
|
|
|
- if (first->protocol == __constant_htons(ETH_P_IP)) {
|
|
|
|
|
|
+ if (first->protocol == htons(ETH_P_IP)) {
|
|
struct iphdr *iph = ip_hdr(skb);
|
|
struct iphdr *iph = ip_hdr(skb);
|
|
iph->tot_len = 0;
|
|
iph->tot_len = 0;
|
|
iph->check = 0;
|
|
iph->check = 0;
|
|
@@ -6580,12 +6580,12 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
|
|
} else {
|
|
} else {
|
|
u8 l4_hdr = 0;
|
|
u8 l4_hdr = 0;
|
|
switch (first->protocol) {
|
|
switch (first->protocol) {
|
|
- case __constant_htons(ETH_P_IP):
|
|
|
|
|
|
+ case htons(ETH_P_IP):
|
|
vlan_macip_lens |= skb_network_header_len(skb);
|
|
vlan_macip_lens |= skb_network_header_len(skb);
|
|
type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;
|
|
type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;
|
|
l4_hdr = ip_hdr(skb)->protocol;
|
|
l4_hdr = ip_hdr(skb)->protocol;
|
|
break;
|
|
break;
|
|
- case __constant_htons(ETH_P_IPV6):
|
|
|
|
|
|
+ case htons(ETH_P_IPV6):
|
|
vlan_macip_lens |= skb_network_header_len(skb);
|
|
vlan_macip_lens |= skb_network_header_len(skb);
|
|
l4_hdr = ipv6_hdr(skb)->nexthdr;
|
|
l4_hdr = ipv6_hdr(skb)->nexthdr;
|
|
break;
|
|
break;
|
|
@@ -6860,9 +6860,9 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
|
|
hdr.network = skb_network_header(first->skb);
|
|
hdr.network = skb_network_header(first->skb);
|
|
|
|
|
|
/* Currently only IPv4/IPv6 with TCP is supported */
|
|
/* Currently only IPv4/IPv6 with TCP is supported */
|
|
- if ((first->protocol != __constant_htons(ETH_P_IPV6) ||
|
|
|
|
|
|
+ if ((first->protocol != htons(ETH_P_IPV6) ||
|
|
hdr.ipv6->nexthdr != IPPROTO_TCP) &&
|
|
hdr.ipv6->nexthdr != IPPROTO_TCP) &&
|
|
- (first->protocol != __constant_htons(ETH_P_IP) ||
|
|
|
|
|
|
+ (first->protocol != htons(ETH_P_IP) ||
|
|
hdr.ipv4->protocol != IPPROTO_TCP))
|
|
hdr.ipv4->protocol != IPPROTO_TCP))
|
|
return;
|
|
return;
|
|
|
|
|
|
@@ -6895,12 +6895,12 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
|
|
* and write the value to source port portion of compressed dword
|
|
* and write the value to source port portion of compressed dword
|
|
*/
|
|
*/
|
|
if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN))
|
|
if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN))
|
|
- common.port.src ^= th->dest ^ __constant_htons(ETH_P_8021Q);
|
|
|
|
|
|
+ common.port.src ^= th->dest ^ htons(ETH_P_8021Q);
|
|
else
|
|
else
|
|
common.port.src ^= th->dest ^ first->protocol;
|
|
common.port.src ^= th->dest ^ first->protocol;
|
|
common.port.dst ^= th->source;
|
|
common.port.dst ^= th->source;
|
|
|
|
|
|
- if (first->protocol == __constant_htons(ETH_P_IP)) {
|
|
|
|
|
|
+ if (first->protocol == htons(ETH_P_IP)) {
|
|
input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4;
|
|
input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4;
|
|
common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr;
|
|
common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr;
|
|
} else {
|
|
} else {
|
|
@@ -6966,8 +6966,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
|
|
* or FIP and we have FCoE enabled on the adapter
|
|
* or FIP and we have FCoE enabled on the adapter
|
|
*/
|
|
*/
|
|
switch (vlan_get_protocol(skb)) {
|
|
switch (vlan_get_protocol(skb)) {
|
|
- case __constant_htons(ETH_P_FCOE):
|
|
|
|
- case __constant_htons(ETH_P_FIP):
|
|
|
|
|
|
+ case htons(ETH_P_FCOE):
|
|
|
|
+ case htons(ETH_P_FIP):
|
|
adapter = netdev_priv(dev);
|
|
adapter = netdev_priv(dev);
|
|
|
|
|
|
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
|
|
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
|
|
@@ -7028,7 +7028,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT;
|
|
tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT;
|
|
tx_flags |= IXGBE_TX_FLAGS_HW_VLAN;
|
|
tx_flags |= IXGBE_TX_FLAGS_HW_VLAN;
|
|
/* else if it is a SW VLAN check the next protocol and store the tag */
|
|
/* else if it is a SW VLAN check the next protocol and store the tag */
|
|
- } else if (protocol == __constant_htons(ETH_P_8021Q)) {
|
|
|
|
|
|
+ } else if (protocol == htons(ETH_P_8021Q)) {
|
|
struct vlan_hdr *vhdr, _vhdr;
|
|
struct vlan_hdr *vhdr, _vhdr;
|
|
vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
|
|
vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
|
|
if (!vhdr)
|
|
if (!vhdr)
|
|
@@ -7087,7 +7087,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
|
|
|
|
#ifdef IXGBE_FCOE
|
|
#ifdef IXGBE_FCOE
|
|
/* setup tx offload for FCoE */
|
|
/* setup tx offload for FCoE */
|
|
- if ((protocol == __constant_htons(ETH_P_FCOE)) &&
|
|
|
|
|
|
+ if ((protocol == htons(ETH_P_FCOE)) &&
|
|
(tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
|
|
(tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
|
|
tso = ixgbe_fso(tx_ring, first, &hdr_len);
|
|
tso = ixgbe_fso(tx_ring, first, &hdr_len);
|
|
if (tso < 0)
|
|
if (tso < 0)
|