Re: [PATCH 0/9][RFC] KVM virtio_net performance

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rusty Russell
Date: Monday, August 11, 2008 - 12:44 am

On Friday 25 July 2008 06:56:01 you wrote:

This is, from one point of view, a dhclient bug.  It opens a packet socket, 
and we'd tell it that the checksum is incomplete via auxdata, but it doesn't 
have auxdata.

On the other hand, perhaps we should copy the packet and checksum it in this 
case?  Not many devices input packets with partial csums, so dhclient doesn't 
normally hit this.  Xen might though?

ie, in net/packet/af_packet.c's packet_recvmsg():

	if (pkt_sk(sk)->auxdata) {
		struct tpacket_auxdata aux;

		aux.tp_status = TP_STATUS_USER;
		if (skb->ip_summed == CHECKSUM_PARTIAL)
			aux.tp_status |= TP_STATUS_CSUMNOTREADY;
		aux.tp_len = PACKET_SKB_CB(skb)->origlen;
		aux.tp_snaplen = skb->len;
		aux.tp_mac = 0;
		aux.tp_net = skb_network_offset(skb);
		aux.tp_vlan_tci = skb->vlan_tci;

		put_cmsg(msg, SOL_PACKET, PACKET_AUXDATA, sizeof(aux), &aux);
	}

add an "else if (skb->ip_summed == CHECKSUM_PARTIAL)" case...

Rusty.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/9][RFC] KVM virtio_net performance, Rusty Russell, (Mon Aug 11, 12:44 am)
Re: [PATCH 0/9][RFC] KVM virtio_net performance, Herbert Xu, (Mon Aug 11, 2:51 am)
csum offload and af_packet, Rusty Russell, (Mon Aug 11, 6:50 am)
Re: csum offload and af_packet, Herbert Xu, (Mon Aug 11, 5:32 pm)
Re: csum offload and af_packet, David Miller, (Mon Aug 11, 5:51 pm)
Re: csum offload and af_packet, Herbert Xu, (Mon Aug 11, 5:58 pm)
Re: csum offload and af_packet, Rusty Russell, (Mon Aug 11, 7:27 pm)
Re: csum offload and af_packet, Ingo Oeser, (Tue Aug 12, 9:17 am)
Re: csum offload and af_packet, Herbert Xu, (Tue Aug 12, 4:37 pm)
Re: csum offload and af_packet, David Miller, (Tue Aug 12, 5:55 pm)
Re: csum offload and af_packet, Herbert Xu, (Tue Aug 12, 6:09 pm)
Re: csum offload and af_packet, David Miller, (Tue Aug 12, 6:17 pm)
Re: csum offload and af_packet, Herbert Xu, (Tue Aug 12, 6:21 pm)
Re: csum offload and af_packet, David Miller, (Tue Aug 12, 6:25 pm)
Re: csum offload and af_packet, Herbert Xu, (Tue Aug 12, 6:37 pm)
Re: csum offload and af_packet, Patrick McHardy, (Wed Aug 13, 4:26 am)
Re: csum offload and af_packet, David Miller, (Sun Aug 17, 4:08 pm)
Re: csum offload and af_packet, Herbert Xu, (Sun Aug 17, 6:10 pm)
Re: csum offload and af_packet, David Miller, (Sun Aug 17, 6:12 pm)