WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [RFC PATCH 32/33] Add the Xen virtual network device dri

To: Chris Wright <chrisw@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 32/33] Add the Xen virtual network device driver.
From: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Date: Tue, 18 Jul 2006 12:27:57 +0200
Cc: Andrew Morton <akpm@xxxxxxxx>, Zachary Amsden <zach@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Andi Kleen <ak@xxxxxxx>, virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Thu, 20 Jul 2006 05:13:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060718091958.414414000@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Intel International BV
References: <20060718091807.467468000@xxxxxxxxxxxx> <20060718091958.414414000@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2006-07-18 at 00:00 -0700, Chris Wright wrote:
> +
> +/** Send a packet on a net device to encourage switches to learn the
> + * MAC. We send a fake ARP request.
> + *
> + * @param dev device
> + * @return 0 on success, error code otherwise
> + */
> +static int send_fake_arp(struct net_device *dev)
> +{
> +     struct sk_buff *skb;
> +     u32             src_ip, dst_ip;
> +
> +     dst_ip = INADDR_BROADCAST;
> +     src_ip = inet_select_addr(dev, dst_ip, RT_SCOPE_LINK);
> +
> +     /* No IP? Then nothing to do. */
> +     if (src_ip == 0)
> +             return 0;
> +
> +     skb = arp_create(ARPOP_REPLY, ETH_P_ARP,
> +                      dst_ip, dev, src_ip,
> +                      /*dst_hw*/ NULL, /*src_hw*/ NULL,
> +                      /*target_hw*/ dev->dev_addr);
> +     if (skb == NULL)
> +             return -ENOMEM;
> +
> +     return dev_queue_xmit(skb);
> +}

Hi,

Hmmm maybe it's me, but something bugs me if a NIC driver is going to
send IP level ARP packets... that just feels very very wrong and is a
blatant layering violation.... shouldn't the ifup/ifconfig scripts just
be fixed instead if this is critical behavior?

Greetings,
   Arjan van de Ven




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>