Commit a1108ffd authored by Joe Perches's avatar Joe Perches Committed by Jeff Kirsher

ixgbe: Convert uses of __constant_<foo> to <foo>

The use of __constant_<foo> has been unnecessary for quite awhile now.

Make these uses consistent with the rest of the kernel.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1dcf875e
...@@ -408,13 +408,13 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter, ...@@ -408,13 +408,13 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
switch (ixgbe_test_staterr(rx_desc, IXGBE_RXDADV_STAT_FCSTAT)) { switch (ixgbe_test_staterr(rx_desc, IXGBE_RXDADV_STAT_FCSTAT)) {
/* return 0 to bypass going to ULD for DDPed data */ /* return 0 to bypass going to ULD for DDPed data */
case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_DDP): case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_DDP):
/* update length of DDPed data */ /* update length of DDPed data */
ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
rc = 0; rc = 0;
break; break;
/* unmap the sg list when FCPRSP is received */ /* unmap the sg list when FCPRSP is received */
case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP): case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):
dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, dma_unmap_sg(&adapter->pdev->dev, ddp->sgl,
ddp->sgc, DMA_FROM_DEVICE); ddp->sgc, DMA_FROM_DEVICE);
ddp->err = ddp_err; ddp->err = ddp_err;
...@@ -422,14 +422,14 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter, ...@@ -422,14 +422,14 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
ddp->sgc = 0; ddp->sgc = 0;
/* fall through */ /* fall through */
/* if DDP length is present pass it through to ULD */ /* if DDP length is present pass it through to ULD */
case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NODDP): case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NODDP):
/* update length of DDPed data */ /* update length of DDPed data */
ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss); ddp->len = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
if (ddp->len) if (ddp->len)
rc = ddp->len; rc = ddp->len;
break; break;
/* no match will return as an error */ /* no match will return as an error */
case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NOMTCH): case cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_NOMTCH):
default: default:
break; break;
} }
......
...@@ -1539,7 +1539,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 htons(ETH_P_FCOE):
case __constant_htons(ETH_P_FIP): 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, ...@@ -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, ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment