mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-08-18 02:22:47 -07:00
net: rename vlan_tx_* helpers since "tx" is misleading there
The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
1 parent
d8b9605d26
commit
df8a39defa
77 files changed
+195
-190
No files matched your search
@@ -279,8 +279,8 @@ Possible BPF extensions are shown in the following table:
|
||||
hatype skb->dev->type
|
||||
rxhash skb->hash
|
||||
cpu raw_smp_processor_id()
|
||||
vlan_tci vlan_tx_tag_get(skb)
|
||||
vlan_pr vlan_tx_tag_present(skb)
|
||||
vlan_tci skb_vlan_tag_get(skb)
|
||||
vlan_pr skb_vlan_tag_present(skb)
|
||||
rand prandom_u32()
|
||||
|
||||
These extensions can also be prefixed with '#'.
|
||||
|
||||
@@ -373,11 +373,11 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
|
||||
wqe_fragment_length = (__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
|
||||
|
||||
/* setup the VLAN tag if present */
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n",
|
||||
netdev->name, vlan_tx_tag_get(skb));
|
||||
netdev->name, skb_vlan_tag_get(skb));
|
||||
wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE;
|
||||
wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb);
|
||||
wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb);
|
||||
} else
|
||||
wqe_misc = 0;
|
||||
|
||||
@@ -576,11 +576,12 @@ tso_sq_no_longer_full:
|
||||
wqe_fragment_length =
|
||||
(__le16 *)&nic_sqe->wqe_words[NES_NIC_SQ_WQE_LENGTH_0_TAG_IDX];
|
||||
/* setup the VLAN tag if present */
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
nes_debug(NES_DBG_NIC_TX, "%s: VLAN packet to send... VLAN = %08X\n",
|
||||
netdev->name, vlan_tx_tag_get(skb) );
|
||||
netdev->name,
|
||||
skb_vlan_tag_get(skb));
|
||||
wqe_misc = NES_NIC_SQ_WQE_TAGVALUE_ENABLE;
|
||||
wqe_fragment_length[0] = (__force __le16) vlan_tx_tag_get(skb);
|
||||
wqe_fragment_length[0] = (__force __le16) skb_vlan_tag_get(skb);
|
||||
} else
|
||||
wqe_misc = 0;
|
||||
|
||||
|
||||
@@ -769,11 +769,11 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
first_txd->processFlags |= TYPHOON_TX_PF_IP_CHKSUM;
|
||||
}
|
||||
|
||||
if(vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
first_txd->processFlags |=
|
||||
TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY;
|
||||
first_txd->processFlags |=
|
||||
cpu_to_le32(htons(vlan_tx_tag_get(skb)) <<
|
||||
cpu_to_le32(htons(skb_vlan_tag_get(skb)) <<
|
||||
TYPHOON_TX_PF_VLAN_TAG_SHIFT);
|
||||
}
|
||||
|
||||
|
||||
@@ -2429,9 +2429,9 @@ restart:
|
||||
flagsize = (skb->len << 16) | (BD_FLG_END);
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
||||
flagsize |= BD_FLG_TCP_UDP_SUM;
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
flagsize |= BD_FLG_VLAN_TAG;
|
||||
vlan_tag = vlan_tx_tag_get(skb);
|
||||
vlan_tag = skb_vlan_tag_get(skb);
|
||||
}
|
||||
desc = ap->tx_ring + idx;
|
||||
idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap);
|
||||
@@ -2450,9 +2450,9 @@ restart:
|
||||
flagsize = (skb_headlen(skb) << 16);
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
||||
flagsize |= BD_FLG_TCP_UDP_SUM;
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
flagsize |= BD_FLG_VLAN_TAG;
|
||||
vlan_tag = vlan_tx_tag_get(skb);
|
||||
vlan_tag = skb_vlan_tag_get(skb);
|
||||
}
|
||||
|
||||
ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag);
|
||||
|
||||
@@ -1299,11 +1299,11 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
|
||||
lp->tx_ring[tx_index].tx_flags = 0;
|
||||
|
||||
#if AMD8111E_VLAN_TAG_USED
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
lp->tx_ring[tx_index].tag_ctrl_cmd |=
|
||||
cpu_to_le16(TCC_VLAN_INSERT);
|
||||
lp->tx_ring[tx_index].tag_ctrl_info =
|
||||
cpu_to_le16(vlan_tx_tag_get(skb));
|
||||
cpu_to_le16(skb_vlan_tag_get(skb));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1165,8 +1165,8 @@ static void xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata,
|
||||
|
||||
static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet)
|
||||
{
|
||||
if (vlan_tx_tag_present(skb))
|
||||
packet->vlan_ctag = vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb))
|
||||
packet->vlan_ctag = skb_vlan_tag_get(skb);
|
||||
}
|
||||
|
||||
static int xgbe_prep_tso(struct sk_buff *skb, struct xgbe_packet_data *packet)
|
||||
@@ -1247,9 +1247,9 @@ static void xgbe_packet_info(struct xgbe_prv_data *pdata,
|
||||
XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES,
|
||||
CSUM_ENABLE, 1);
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
/* VLAN requires an extra descriptor if tag is different */
|
||||
if (vlan_tx_tag_get(skb) != ring->tx.cur_vlan_ctag)
|
||||
if (skb_vlan_tag_get(skb) != ring->tx.cur_vlan_ctag)
|
||||
/* We can share with the TSO context descriptor */
|
||||
if (!context_desc) {
|
||||
context_desc = 1;
|
||||
|
||||
@@ -2235,8 +2235,8 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
if (unlikely(vlan_tx_tag_present(skb))) {
|
||||
u16 vlan = vlan_tx_tag_get(skb);
|
||||
if (unlikely(skb_vlan_tag_present(skb))) {
|
||||
u16 vlan = skb_vlan_tag_get(skb);
|
||||
__le16 tag;
|
||||
|
||||
vlan = cpu_to_le16(vlan);
|
||||
|
||||
@@ -1892,8 +1892,8 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
|
||||
|
||||
tpd = atl1e_get_tpd(adapter);
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
u16 vlan_tag = vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
u16 vlan_tag = skb_vlan_tag_get(skb);
|
||||
u16 atl1e_vlan_tag;
|
||||
|
||||
tpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
|
||||
|
||||
@@ -2415,8 +2415,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
|
||||
(u16) atomic_read(&tpd_ring->next_to_use));
|
||||
memset(ptpd, 0, sizeof(struct tx_packet_desc));
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
vlan_tag = vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
vlan_tag = skb_vlan_tag_get(skb);
|
||||
vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
|
||||
((vlan_tag >> 9) & 0x8);
|
||||
ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
|
||||
|
||||
@@ -887,8 +887,8 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
|
||||
offset = ((u32)(skb->len-copy_len + 3) & ~3);
|
||||
}
|
||||
#ifdef NETIF_F_HW_VLAN_CTAG_TX
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
u16 vlan_tag = vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
u16 vlan_tag = skb_vlan_tag_get(skb);
|
||||
vlan_tag = (vlan_tag << 4) |
|
||||
(vlan_tag >> 13) |
|
||||
((vlan_tag >> 9) & 0x8);
|
||||
|
||||
@@ -6597,9 +6597,9 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM;
|
||||
}
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
vlan_tag_flags |=
|
||||
(TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
|
||||
(TX_BD_FLAGS_VLAN_TAG | (skb_vlan_tag_get(skb) << 16));
|
||||
}
|
||||
|
||||
if ((mss = skb_shinfo(skb)->gso_size)) {
|
||||
|
||||
@@ -3865,9 +3865,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
"sending pkt %u @%p next_idx %u bd %u @%p\n",
|
||||
pkt_prod, tx_buf, txdata->tx_pkt_prod, bd_prod, tx_start_bd);
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
tx_start_bd->vlan_or_ethertype =
|
||||
cpu_to_le16(vlan_tx_tag_get(skb));
|
||||
cpu_to_le16(skb_vlan_tag_get(skb));
|
||||
tx_start_bd->bd_flags.as_bitfield |=
|
||||
(X_ETH_OUTBAND_VLAN << ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT);
|
||||
} else {
|
||||
|
||||
@@ -8002,9 +8002,9 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
!mss && skb->len > VLAN_ETH_FRAME_LEN)
|
||||
base_flags |= TXD_FLAG_JMB_PKT;
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
base_flags |= TXD_FLAG_VLAN;
|
||||
vlan = vlan_tx_tag_get(skb);
|
||||
vlan = skb_vlan_tag_get(skb);
|
||||
}
|
||||
|
||||
if ((unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) &&
|
||||
|
||||
@@ -2824,8 +2824,8 @@ bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb,
|
||||
u32 gso_size;
|
||||
u16 vlan_tag = 0;
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
vlan_tag = (u16)vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
vlan_tag = (u16)skb_vlan_tag_get(skb);
|
||||
flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN);
|
||||
}
|
||||
if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags)) {
|
||||
|
||||
@@ -1860,9 +1860,9 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
}
|
||||
cpl->iff = dev->if_port;
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
cpl->vlan_valid = 1;
|
||||
cpl->vlan = htons(vlan_tx_tag_get(skb));
|
||||
cpl->vlan = htons(skb_vlan_tag_get(skb));
|
||||
st->vlan_insert++;
|
||||
} else
|
||||
cpl->vlan_valid = 0;
|
||||
|
||||
@@ -1148,8 +1148,8 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb,
|
||||
cpl->len = htonl(skb->len);
|
||||
cntrl = V_TXPKT_INTF(pi->port_id);
|
||||
|
||||
if (vlan_tx_tag_present(skb))
|
||||
cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(vlan_tx_tag_get(skb));
|
||||
if (skb_vlan_tag_present(skb))
|
||||
cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(skb_vlan_tag_get(skb));
|
||||
|
||||
tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size);
|
||||
if (tso_info) {
|
||||
@@ -1282,7 +1282,7 @@ netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
qs->port_stats[SGE_PSTAT_TX_CSUM]++;
|
||||
if (skb_shinfo(skb)->gso_size)
|
||||
qs->port_stats[SGE_PSTAT_TSO]++;
|
||||
if (vlan_tx_tag_present(skb))
|
||||
if (skb_vlan_tag_present(skb))
|
||||
qs->port_stats[SGE_PSTAT_VLANINS]++;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1154,9 +1154,9 @@ out_free: dev_kfree_skb_any(skb);
|
||||
cntrl = TXPKT_L4CSUM_DIS | TXPKT_IPCSUM_DIS;
|
||||
}
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
q->vlan_ins++;
|
||||
cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb));
|
||||
cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb));
|
||||
}
|
||||
|
||||
cpl->ctrl0 = htonl(TXPKT_OPCODE(CPL_TX_PKT_XT) |
|
||||
|
||||
@@ -1326,9 +1326,9 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
* If there's a VLAN tag present, add that to the list of things to
|
||||
* do in this Work Request.
|
||||
*/
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
txq->vlan_ins++;
|
||||
cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb));
|
||||
cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(skb_vlan_tag_get(skb));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -520,10 +520,10 @@ static inline void enic_queue_wq_skb(struct enic *enic,
|
||||
int loopback = 0;
|
||||
int err;
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
/* VLAN tag from trunking driver */
|
||||
vlan_tag_insert = 1;
|
||||
vlan_tag = vlan_tx_tag_get(skb);
|
||||
vlan_tag = skb_vlan_tag_get(skb);
|
||||
} else if (enic->loop_enable) {
|
||||
vlan_tag = enic->loop_tag;
|
||||
loopback = 1;
|
||||
|
||||
@@ -694,7 +694,7 @@ static inline u16 be_get_tx_vlan_tag(struct be_adapter *adapter,
|
||||
u8 vlan_prio;
|
||||
u16 vlan_tag;
|
||||
|
||||
vlan_tag = vlan_tx_tag_get(skb);
|
||||
vlan_tag = skb_vlan_tag_get(skb);
|
||||
vlan_prio = (vlan_tag & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
|
||||
/* If vlan priority provided by OS is NOT in available bmap */
|
||||
if (!(adapter->vlan_prio_bmap & (1 << vlan_prio)))
|
||||
@@ -745,7 +745,7 @@ static void wrb_fill_hdr(struct be_adapter *adapter, struct be_eth_hdr_wrb *hdr,
|
||||
SET_TX_WRB_HDR_BITS(udpcs, hdr, 1);
|
||||
}
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
SET_TX_WRB_HDR_BITS(vlan, hdr, 1);
|
||||
vlan_tag = be_get_tx_vlan_tag(adapter, skb);
|
||||
SET_TX_WRB_HDR_BITS(vlan_tag, hdr, vlan_tag);
|
||||
@@ -864,7 +864,7 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
|
||||
if (unlikely(!skb))
|
||||
return skb;
|
||||
|
||||
if (vlan_tx_tag_present(skb))
|
||||
if (skb_vlan_tag_present(skb))
|
||||
vlan_tag = be_get_tx_vlan_tag(adapter, skb);
|
||||
|
||||
if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
|
||||
@@ -923,7 +923,7 @@ static bool be_ipv6_exthdr_check(struct sk_buff *skb)
|
||||
|
||||
static int be_vlan_tag_tx_chk(struct be_adapter *adapter, struct sk_buff *skb)
|
||||
{
|
||||
return vlan_tx_tag_present(skb) || adapter->pvid || adapter->qnq_vid;
|
||||
return skb_vlan_tag_present(skb) || adapter->pvid || adapter->qnq_vid;
|
||||
}
|
||||
|
||||
static int be_ipv6_tx_stall_chk(struct be_adapter *adapter, struct sk_buff *skb)
|
||||
@@ -946,7 +946,7 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter,
|
||||
eth_hdr_len = ntohs(skb->protocol) == ETH_P_8021Q ?
|
||||
VLAN_ETH_HLEN : ETH_HLEN;
|
||||
if (skb->len <= 60 &&
|
||||
(lancer_chip(adapter) || vlan_tx_tag_present(skb)) &&
|
||||
(lancer_chip(adapter) || skb_vlan_tag_present(skb)) &&
|
||||
is_ipv4_pkt(skb)) {
|
||||
ip = (struct iphdr *)ip_hdr(skb);
|
||||
pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len));
|
||||
@@ -964,7 +964,7 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter,
|
||||
* Manually insert VLAN in pkt.
|
||||
*/
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL &&
|
||||
vlan_tx_tag_present(skb)) {
|
||||
skb_vlan_tag_present(skb)) {
|
||||
skb = be_insert_vlan_in_pkt(adapter, skb, skip_hw_vlan);
|
||||
if (unlikely(!skb))
|
||||
goto err;
|
||||
|
||||
Loaded 20 of 77 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user