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: [GIT/PATCH v5] xen network backend driver

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] Re: [GIT/PATCH v5] xen network backend driver
From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Mon, 14 Mar 2011 19:57:12 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ben, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, Michał Mirosław <mirqus@xxxxxxxxx>, Francois Romieu <romieu@xxxxxxxxxxxxx>, Hutchings <bhutchings@xxxxxxxxxxxxxx>, Stephen Hemminger <shemminger@xxxxxxxxxx>
Delivery-date: Mon, 14 Mar 2011 12:07:23 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=esw5DQlmo0IVEkBu+LjsOAlPeg6FFdMCCimMOy7fB1g=; b=LEnxbPogqadBwkXvkSjeRXWhoL0w9LRvrUlyV60tBQ3CMbVbNgrEXD+bx4dBvMDfAh jhF1UBFKmXJzgNNaPY2PhVEMLGfnglt17eHUNNTVZIljyGJXvHXV8CTTE4TJs05AmD13 UOgvaL0wydydE74Xl2zKSD5OjegkknE1VQ+zc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=UfIpn4bezK4EIKjKj8wVJOZiD7RiXsPWFQGB/uVIAh1kgv3sg9M5+fSeg7xsK90X2C Vvi2f/K1hh/agXKqDESth6v8vr8h6Xay4KB+KepChavZDFMtglNN6xCWNo562KQzThCe dTchA6NfXnEkqkShmIP5t6DJEtux/rgKA8x+Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1300112879.17339.2162.camel@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1300112879.17339.2162.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Le lundi 14 mars 2011 à 14:27 +0000, Ian Campbell a écrit :

...

> +struct xenvif {
> +     /* Unique identifier for this interface. */
> +     domid_t          domid;
> +     unsigned int     handle;
> +
> +     /* Reference to netback processing backend. */
> +     struct xen_netbk *netbk;
> +
> +     u8               fe_dev_addr[6];
> +
> +     /* Physical parameters of the comms window. */
> +     grant_handle_t   tx_shmem_handle;
> +     grant_ref_t      tx_shmem_ref;
> +     grant_handle_t   rx_shmem_handle;
> +     grant_ref_t      rx_shmem_ref;
> +     unsigned int     irq;
> +
> +     /* List of frontends to notify after a batch of frames sent. */
> +     struct list_head notify_list;
> +
> +     /* The shared rings and indexes. */
> +     struct xen_netif_tx_back_ring tx;
> +     struct xen_netif_rx_back_ring rx;
> +     struct vm_struct *tx_comms_area;
> +     struct vm_struct *rx_comms_area;
> +
> +     /* Flags that must not be set in dev->features */
> +     u32 features_disabled;
> +
> +     /* Frontend feature information. */
> +     u8 can_sg:1;
> +     u8 gso:1;
> +     u8 gso_prefix:1;
> +     u8 csum:1;
> +
> +     /* Internal feature information. */
> +     u8 can_queue:1;     /* can queue packets for receiver? */
> +
> +     /*
> +      * Allow xenvif_start_xmit() to peek ahead in the rx request
> +      * ring.  This is a prediction of what rx_req_cons will be
> +      * once all queued skbs are put on the ring.
> +      */
> +     RING_IDX rx_req_cons_peek;
> +
> +     /* Transmit shaping: allow 'credit_bytes' every 'credit_usec'. */
> +     unsigned long   credit_bytes;
> +     unsigned long   credit_usec;
> +     unsigned long   remaining_credit;
> +     struct timer_list credit_timeout;
> +
> +     /* Statistics */
> +     unsigned long rx_gso_checksum_fixup;

this is an "unsigned long" field

> +
> +     /* Miscellaneous private stuff. */
> +     struct list_head schedule_list;
> +     atomic_t         refcnt;
> +     struct net_device *dev;
> +
> +     wait_queue_head_t waiting_to_free;
> +};
> +


> +static void xenvif_get_ethtool_stats(struct net_device *dev,
> +                                  struct ethtool_stats *stats, u64 * data)
> +{
> +     void *vif = netdev_priv(dev);
> +     int i;
> +
> +     for (i = 0; i < ARRAY_SIZE(xenvif_stats); i++)
> +             data[i] = *(int *)(vif + xenvif_stats[i].offset);

so use : data[i] = *(unsigned long *)(vif + xenvif_stats[i].offset);

> +}
> +




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