Commit 760d1e36 authored by KY Srinivasan's avatar KY Srinivasan Committed by David S. Miller

hv_netvsc: Eliminate vlan_tci from struct hv_netvsc_packet

Eliminate vlan_tci from struct hv_netvsc_packet.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 10082f98
...@@ -136,7 +136,6 @@ struct hv_netvsc_packet { ...@@ -136,7 +136,6 @@ struct hv_netvsc_packet {
u8 rmsg_pgcnt; /* page count of RNDIS header and PPI */ u8 rmsg_pgcnt; /* page count of RNDIS header and PPI */
u8 page_buf_cnt; u8 page_buf_cnt;
u16 vlan_tci;
u16 q_idx; u16 q_idx;
u32 send_buf_index; u32 send_buf_index;
...@@ -187,7 +186,8 @@ int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -187,7 +186,8 @@ int netvsc_recv_callback(struct hv_device *device_obj,
struct hv_netvsc_packet *packet, struct hv_netvsc_packet *packet,
void **data, void **data,
struct ndis_tcp_ip_checksum_info *csum_info, struct ndis_tcp_ip_checksum_info *csum_info,
struct vmbus_channel *channel); struct vmbus_channel *channel,
u16 vlan_tci);
void netvsc_channel_cb(void *context); void netvsc_channel_cb(void *context);
int rndis_filter_open(struct hv_device *dev); int rndis_filter_open(struct hv_device *dev);
int rndis_filter_close(struct hv_device *dev); int rndis_filter_close(struct hv_device *dev);
......
...@@ -471,7 +471,6 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) ...@@ -471,7 +471,6 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
FIELD_SIZEOF(struct sk_buff, cb)); FIELD_SIZEOF(struct sk_buff, cb));
packet = (struct hv_netvsc_packet *)skb->cb; packet = (struct hv_netvsc_packet *)skb->cb;
packet->vlan_tci = skb->vlan_tci;
packet->q_idx = skb_get_queue_mapping(skb); packet->q_idx = skb_get_queue_mapping(skb);
...@@ -481,7 +480,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) ...@@ -481,7 +480,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
memset(rndis_msg, 0, RNDIS_AND_PPI_SIZE); memset(rndis_msg, 0, RNDIS_AND_PPI_SIZE);
isvlan = packet->vlan_tci & VLAN_TAG_PRESENT; isvlan = skb->vlan_tci & VLAN_TAG_PRESENT;
/* Add the rndis header */ /* Add the rndis header */
rndis_msg->ndis_msg_type = RNDIS_MSG_PACKET; rndis_msg->ndis_msg_type = RNDIS_MSG_PACKET;
...@@ -509,8 +508,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) ...@@ -509,8 +508,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
IEEE_8021Q_INFO); IEEE_8021Q_INFO);
vlan = (struct ndis_pkt_8021q_info *)((void *)ppi + vlan = (struct ndis_pkt_8021q_info *)((void *)ppi +
ppi->ppi_offset); ppi->ppi_offset);
vlan->vlanid = packet->vlan_tci & VLAN_VID_MASK; vlan->vlanid = skb->vlan_tci & VLAN_VID_MASK;
vlan->pri = (packet->vlan_tci & VLAN_PRIO_MASK) >> vlan->pri = (skb->vlan_tci & VLAN_PRIO_MASK) >>
VLAN_PRIO_SHIFT; VLAN_PRIO_SHIFT;
} }
...@@ -673,7 +672,8 @@ int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -673,7 +672,8 @@ int netvsc_recv_callback(struct hv_device *device_obj,
struct hv_netvsc_packet *packet, struct hv_netvsc_packet *packet,
void **data, void **data,
struct ndis_tcp_ip_checksum_info *csum_info, struct ndis_tcp_ip_checksum_info *csum_info,
struct vmbus_channel *channel) struct vmbus_channel *channel,
u16 vlan_tci)
{ {
struct net_device *net; struct net_device *net;
struct net_device_context *net_device_ctx; struct net_device_context *net_device_ctx;
...@@ -713,9 +713,9 @@ int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -713,9 +713,9 @@ int netvsc_recv_callback(struct hv_device *device_obj,
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
} }
if (packet->vlan_tci & VLAN_TAG_PRESENT) if (vlan_tci & VLAN_TAG_PRESENT)
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
packet->vlan_tci); vlan_tci);
skb_record_rx_queue(skb, channel-> skb_record_rx_queue(skb, channel->
offermsg.offer.sub_channel_index); offermsg.offer.sub_channel_index);
......
...@@ -354,6 +354,7 @@ static int rndis_filter_receive_data(struct rndis_device *dev, ...@@ -354,6 +354,7 @@ static int rndis_filter_receive_data(struct rndis_device *dev,
u32 data_offset; u32 data_offset;
struct ndis_pkt_8021q_info *vlan; struct ndis_pkt_8021q_info *vlan;
struct ndis_tcp_ip_checksum_info *csum_info; struct ndis_tcp_ip_checksum_info *csum_info;
u16 vlan_tci = 0;
rndis_pkt = &msg->msg.pkt; rndis_pkt = &msg->msg.pkt;
...@@ -384,15 +385,13 @@ static int rndis_filter_receive_data(struct rndis_device *dev, ...@@ -384,15 +385,13 @@ static int rndis_filter_receive_data(struct rndis_device *dev,
vlan = rndis_get_ppi(rndis_pkt, IEEE_8021Q_INFO); vlan = rndis_get_ppi(rndis_pkt, IEEE_8021Q_INFO);
if (vlan) { if (vlan) {
pkt->vlan_tci = VLAN_TAG_PRESENT | vlan->vlanid | vlan_tci = VLAN_TAG_PRESENT | vlan->vlanid |
(vlan->pri << VLAN_PRIO_SHIFT); (vlan->pri << VLAN_PRIO_SHIFT);
} else {
pkt->vlan_tci = 0;
} }
csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO); csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO);
return netvsc_recv_callback(dev->net_dev->dev, pkt, data, return netvsc_recv_callback(dev->net_dev->dev, pkt, data,
csum_info, channel); csum_info, channel, vlan_tci);
} }
int rndis_filter_receive(struct hv_device *dev, int rndis_filter_receive(struct hv_device *dev,
......
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