提交 cbacec76 编写于 作者: K KY Srinivasan 提交者: David S. Miller

hv_netvsc: Cleanup the test for freeing skb when we use sendbuf mechanism

In preparation for embedding the rndis state and other packet state into
the skb, cleanup the test for freeing the skb.
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4e833c59
......@@ -870,6 +870,7 @@ int netvsc_send(struct hv_device *device,
(unsigned long)packet->send_completion_tid;
packet->page_buf_cnt = 0;
packet->send_completion_tid = 0;
packet->send_buf_index = section_index;
packet->total_data_buflen += msd_len;
......
......@@ -234,11 +234,10 @@ static void netvsc_xmit_completion(void *context)
struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context;
struct sk_buff *skb = (struct sk_buff *)
(unsigned long)packet->send_completion_tid;
u32 index = packet->send_buf_index;
kfree(packet);
if (skb && (index == NETVSC_INVALID_INDEX))
if (skb)
dev_kfree_skb_any(skb);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册