#49 - Re: BUG - xen-netback stats interface limited to 32-bit values on 64 bit systems

Owner: Ian Campbell <ian.campbell@citrix.com>

Date: Wed Feb 18 15:30:03 2015

Last Update: Wed Feb 18 15:30:03 2015

Severity: normal

Affects:

State: Open

[ Retrieve as mbox ]


From: Atom2 <ariel.atom2@web2web.at>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [Xen-devel] BUG - xen-netback stats interface limited to 32-bit values on 64 bit systems
Date: Thu, 12 Feb 2015 20:47:58 +0100
Message-ID: <54DD036E.4060706@web2web.at>

[ Reply to this message; Retrieve Raw Message; Archives: marc.info, gmane ]

Hi guys,
I am forwarding this message after initially having confirmed with Ian 
Campbell on the user list that there's really an issue - please see 
further below.

I am currently running xen-4.3.3 on gentoo (dom0 is based on kernel 
3.17.7) and I am happy to help out by applying and testing patches on my 
version.

Thanks Atom2

-------- Weitergeleitete Nachricht --------
Betreff: Re: [Xen-users] BUG? vif RX/TX byte counters limited to 32-bit 
values on 64 bit systems
Datum: Mon, 9 Feb 2015 11:09:08 +0000
Von: Ian Campbell <ian.campbell@citrix.com>
An: Atom2 <ariel.atom2@web2web.at>
Kopie (CC): xen-users@lists.xen.org

On Mon, 2015-02-09 at 00:37 +0100, Atom2 wrote:
> Hi guys,
> I recently experienced that ifconfig executed within dom0 wraps around
> byte counters after reaching the 32-bit max value (2^32) for XEN vif
> interfaces. Specifically I was able to observe this for a XEN vif
> interface connected to a HVM domU running FreeBSD 10.0.

Looks like xen-netback was never converted to the 64 bit stats interface
like e.g. netfront was (see commit e00f85bec0a9 in ~v3.1).

I could have sworn netback changed eons ago -- I was clearly mistaken.

Ian.




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

From: Ian Campbell <ian.campbell@citrix.com>
To: Atom2 <ariel.atom2@web2web.at>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] BUG - xen-netback stats interface limited to 32-bit values on 64 bit systems
Date: Wed, 18 Feb 2015 15:24:10 +0000
Message-ID: <1424273050.20761.17.camel@citrix.com>

[ Reply to this message; Retrieve Raw Message; Archives: marc.info, gmane ]

create ^
thanks

On Thu, 2015-02-12 at 20:47 +0100, Atom2 wrote:
> Hi guys,
> I am forwarding this message after initially having confirmed with Ian 
> Campbell on the user list that there's really an issue - please see 
> further below.
> 
> I am currently running xen-4.3.3 on gentoo (dom0 is based on kernel 
> 3.17.7) and I am happy to help out by applying and testing patches on my 
> version.

FWIW based on e00f85bec0a9 this seems like it would be a reasonably
straight forward introductory kernel hacking exercise (mostly copying
e00f85bec0a9) if you are interested I could help guide/mentor you
through it.

Ian.

> 
> Thanks Atom2
> 
> -------- Weitergeleitete Nachricht --------
> Betreff: Re: [Xen-users] BUG? vif RX/TX byte counters limited to 32-bit 
> values on 64 bit systems
> Datum: Mon, 9 Feb 2015 11:09:08 +0000
> Von: Ian Campbell <ian.campbell@citrix.com>
> An: Atom2 <ariel.atom2@web2web.at>
> Kopie (CC): xen-users@lists.xen.org
> 
> On Mon, 2015-02-09 at 00:37 +0100, Atom2 wrote:
> > Hi guys,
> > I recently experienced that ifconfig executed within dom0 wraps around
> > byte counters after reaching the 32-bit max value (2^32) for XEN vif
> > interfaces. Specifically I was able to observe this for a XEN vif
> > interface connected to a HVM domU running FreeBSD 10.0.
> 
> Looks like xen-netback was never converted to the 64 bit stats interface
> like e.g. netfront was (see commit e00f85bec0a9 in ~v3.1).
> 
> I could have sworn netback changed eons ago -- I was clearly mistaken.
> 
> Ian.
> 
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


From: Atom2 <ariel.atom2@web2web.at>
To: xen-devel@lists.xen.org
Subject: Re: [Xen-devel] BUG - xen-netback stats interface limited to 32-bit values on 64 bit systems
Date: Wed, 18 Feb 2015 18:57:15 +0100
Message-ID: <54E4D27B.3050307@web2web.at>

[ Reply to this message; Retrieve Raw Message; Archives: marc.info, gmane ]

Am 18.02.15 um 16:24 schrieb Ian Campbell:
> create ^
> thanks
>
> On Thu, 2015-02-12 at 20:47 +0100, Atom2 wrote:
>> Hi guys,
>> I am forwarding this message after initially having confirmed with Ian
>> Campbell on the user list that there's really an issue - please see
>> further below.
>>
>> I am currently running xen-4.3.3 on gentoo (dom0 is based on kernel
>> 3.17.7) and I am happy to help out by applying and testing patches on my
>> version.
>
> FWIW based on e00f85bec0a9 this seems like it would be a reasonably
> straight forward introductory kernel hacking exercise (mostly copying
> e00f85bec0a9) if you are interested I could help guide/mentor you
> through it.
>
> Ian.
Ian,
thanks for your initiative in moving this forward. Based on your comment 
and your offer to help/guide me in the process, I am happy to give this 
a try. In the end this excercise might be more work for you than just 
fixing it yourself, but it might pay off in the long run.

I did actually have a look at the relevant source for the xen netback 
code already a couple of days ago and think that I have already 
identified (at least parts of) the code that requires change. 
Unfortunately I failed miserable in finding the commit e00f85bec0a9 you 
were/are referring to in your mails (I used google to search, but 
nothing came up) and therefore thought it being too risky to just change 
what I thought needs changing - albeit that's part of the kernel and 
could just bring down a system if changed inappropriately.

So if you could provide me with a link to that commit, I have something 
to start from and make myself familiar with the required changes.

Thanks Atom2

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

From: Ian Campbell <ian.campbell@citrix.com>
To: Atom2 <ariel.atom2@web2web.at>
Cc: xen-devel@lists.xen.org
Subject: Re: [Xen-devel] BUG - xen-netback stats interface limited to 32-bit values on 64 bit systems
Date: Thu, 19 Feb 2015 09:51:42 +0000
Message-ID: <1424339502.30924.26.camel@citrix.com>

[ Reply to this message; Retrieve Raw Message; Archives: marc.info, gmane ]

On Wed, 2015-02-18 at 18:57 +0100, Atom2 wrote:
> Am 18.02.15 um 16:24 schrieb Ian Campbell:
> > create ^
> > thanks
> >
> > On Thu, 2015-02-12 at 20:47 +0100, Atom2 wrote:
> >> Hi guys,
> >> I am forwarding this message after initially having confirmed with Ian
> >> Campbell on the user list that there's really an issue - please see
> >> further below.
> >>
> >> I am currently running xen-4.3.3 on gentoo (dom0 is based on kernel
> >> 3.17.7) and I am happy to help out by applying and testing patches on my
> >> version.
> >
> > FWIW based on e00f85bec0a9 this seems like it would be a reasonably
> > straight forward introductory kernel hacking exercise (mostly copying
> > e00f85bec0a9) if you are interested I could help guide/mentor you
> > through it.
> >
> > Ian.
> Ian,
> thanks for your initiative in moving this forward. Based on your comment 
> and your offer to help/guide me in the process, I am happy to give this 
> a try. In the end this excercise might be more work for you than just 
> fixing it yourself, but it might pay off in the long run.

I'm unlikely to make the time to do it myself, but I'm always willing to
make time for helping others do things, usually in the long term / on
average it's worthwhile to help others get up to speed even if short
term it takes a bit more effort.

> I did actually have a look at the relevant source for the xen netback 
> code already a couple of days ago and think that I have already 
> identified (at least parts of) the code that requires change. 
> Unfortunately I failed miserable in finding the commit e00f85bec0a9 you 
> were/are referring to in your mails (I used google to search, but 
> nothing came up) and therefore thought it being too risky to just change 
> what I thought needs changing - albeit that's part of the kernel and 
> could just bring down a system if changed inappropriately.
> 
> So if you could provide me with a link to that commit, I have something 
> to start from and make myself familiar with the required changes.

The full commit id is:

        commit e00f85bec0a9924eb517ccd126ddbb9787068f53
        Author: stephen hemminger <shemminger@vyatta.com>
        Date:   Tue Jun 21 05:35:31 2011 +0000
        
            xen: convert to 64 bit stats interface
            
            Convert xen driver to 64 bit statistics interface.
            Use stats_sync to ensure that 64 bit update is read atomically on 
            Put hot statistics into per-cpu table.
            
            Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
            Acked-by: Ian Campbell <ian.campbell@citrix.com>
            Signed-off-by: David S. Miller <davem@davemloft.net>
        
and its in the mainline (i.e. Linus') Linux tree, see
http://git.kernel.org/linus/e00f85bec0a9924eb517ccd126ddbb9787068f53

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel