* compile error of HVM pv drivers
@ 2007-07-30 9:28 Zhao, Yunfeng
2007-07-30 9:52 ` Keir Fraser
2007-07-30 9:58 ` Kieran Mansley
0 siblings, 2 replies; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 9:28 UTC (permalink / raw)
To: xen-devel
With gcc 3.4.2 I got following errors while compiling HVM pv drivers
against xen unstable 15651.
#################
/xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6
/netfront/accel.c: In function `accelerator_remove_hooks':
xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
netfront/accel.c:495: error: syntax error before "do"
xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
netfront/accel.c:495: error: syntax error before ')' token
###################
But on rhel5 (gcc 4.1.1), the build can pass without any error.
Can anybody take a look at this issue?
Thanks
Yunfeng
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 9:28 compile error of HVM pv drivers Zhao, Yunfeng
@ 2007-07-30 9:52 ` Keir Fraser
2007-07-30 9:58 ` Kieran Mansley
1 sibling, 0 replies; 22+ messages in thread
From: Keir Fraser @ 2007-07-30 9:52 UTC (permalink / raw)
To: Zhao, Yunfeng, xen-devel
On 30/7/07 10:28, "Zhao, Yunfeng" <yunfeng.zhao@intel.com> wrote:
> But on rhel5 (gcc 4.1.1), the build can pass without any error.
>
> Can anybody take a look at this issue?
Why don't you, since you are ideally placed with a simple repro scenario?
-- Keir
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 9:28 compile error of HVM pv drivers Zhao, Yunfeng
2007-07-30 9:52 ` Keir Fraser
@ 2007-07-30 9:58 ` Kieran Mansley
2007-07-30 10:13 ` Mats Petersson
2007-07-30 12:43 ` Zhao, Yunfeng
1 sibling, 2 replies; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 9:58 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 17:28 +0800, Zhao, Yunfeng wrote:
> With gcc 3.4.2 I got following errors while compiling HVM pv drivers
> against xen unstable 15651.
> #################
> /xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6
> /netfront/accel.c: In function `accelerator_remove_hooks':
> xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
> netfront/accel.c:495: error: syntax error before "do"
> xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
> netfront/accel.c:495: error: syntax error before ')' token
> ###################
> But on rhel5 (gcc 4.1.1), the build can pass without any error.
Curious. Can you post what code you have at that line. In my recent
checkout it looks like this:
490: list_for_each_entry_safe(vif_state, tmp,
491: &accelerator->vif_states,
492: link) {
493: /* Make sure there are no data path operations going on */
494: netif_poll_disable(vif_state->np->netdev);
495: netif_tx_lock_bh(vif_state->np->netdev);
Which doesn't seem to match the error you're getting. No "do" for
example.
I'll try and reproduce it, but haven't seen this before, and the nearest
gcc version I have easily to hand is 3.4.3
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: compile error of HVM pv drivers
2007-07-30 9:58 ` Kieran Mansley
@ 2007-07-30 10:13 ` Mats Petersson
2007-07-30 12:43 ` Zhao, Yunfeng
1 sibling, 0 replies; 22+ messages in thread
From: Mats Petersson @ 2007-07-30 10:13 UTC (permalink / raw)
To: Kieran Mansley, Zhao, Yunfeng; +Cc: xen-devel
At 10:58 30/07/2007, Kieran Mansley wrote:
>On Mon, 2007-07-30 at 17:28 +0800, Zhao, Yunfeng wrote:
> > With gcc 3.4.2 I got following errors while compiling HVM pv drivers
> > against xen unstable 15651.
> > #################
> > /xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6
> > /netfront/accel.c: In function `accelerator_remove_hooks':
> > xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
> > netfront/accel.c:495: error: syntax error before "do"
> > xen-3.0-hg-xen_unstable_pae-15651-20070727/unmodified_drivers/linux-2.6/
> > netfront/accel.c:495: error: syntax error before ')' token
> > ###################
> > But on rhel5 (gcc 4.1.1), the build can pass without any error.
>
>Curious. Can you post what code you have at that line. In my recent
>checkout it looks like this:
>
>490: list_for_each_entry_safe(vif_state, tmp,
>491: &accelerator->vif_states,
>492: link) {
>493: /* Make sure there are no data path operations going on */
>494: netif_poll_disable(vif_state->np->netdev);
>495: netif_tx_lock_bh(vif_state->np->netdev);
Unless one of those lines is a macro that uses the "do { ... }
while(0)" trick, perhaps - how about looking at the preprocessor
output for those lines?
--
Mats
>Which doesn't seem to match the error you're getting. No "do" for
>example.
>
>I'll try and reproduce it, but haven't seen this before, and the nearest
>gcc version I have easily to hand is 3.4.3
>
>Kieran
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread* RE: compile error of HVM pv drivers
2007-07-30 9:58 ` Kieran Mansley
2007-07-30 10:13 ` Mats Petersson
@ 2007-07-30 12:43 ` Zhao, Yunfeng
2007-07-30 13:42 ` Kieran Mansley
1 sibling, 1 reply; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 12:43 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
>
>490: list_for_each_entry_safe(vif_state, tmp,
>491: &accelerator->vif_states,
>492: link) {
>493: /* Make sure there are no data path operations going on
*/
>494: netif_poll_disable(vif_state->np->netdev);
>495: netif_tx_lock_bh(vif_state->np->netdev);
>
>Which doesn't seem to match the error you're getting. No "do" for
>example.
>
>I'll try and reproduce it, but haven't seen this before, and the
nearest
>gcc version I have easily to hand is 3.4.3
[Yunfeng] The code I have is the same as yours.
netif_tx_lock_bh is a inline function which contains a macro of LOCK_HB
#define __LOCK(lock) \
do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
#define __LOCK_BH(lock) \
do { local_bh_disable(); __LOCK(lock); } while (0)
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread* RE: compile error of HVM pv drivers
2007-07-30 12:43 ` Zhao, Yunfeng
@ 2007-07-30 13:42 ` Kieran Mansley
2007-07-30 13:49 ` Zhao, Yunfeng
0 siblings, 1 reply; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 13:42 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 20:43 +0800, Zhao, Yunfeng wrote:
>
> >
> >490: list_for_each_entry_safe(vif_state, tmp,
> >491: &accelerator->vif_states,
> >492: link) {
> >493: /* Make sure there are no data path operations going on
> */
> >494: netif_poll_disable(vif_state->np->netdev);
> >495: netif_tx_lock_bh(vif_state->np->netdev);
> >
> >Which doesn't seem to match the error you're getting. No "do" for
> >example.
> >
> >I'll try and reproduce it, but haven't seen this before, and the
> nearest
> >gcc version I have easily to hand is 3.4.3
> [Yunfeng] The code I have is the same as yours.
> netif_tx_lock_bh is a inline function which contains a macro of LOCK_HB
> #define __LOCK(lock) \
> do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
>
> #define __LOCK_BH(lock) \
> do { local_bh_disable(); __LOCK(lock); } while (0)
OK. I still can't see what the problem should be, other than something
wrong with gcc 3.4.2. I was able to compile netfront fine with gcc
3.4.3 by the way. Does gcc 3.4.2 cope OK with the rest of the kernel?
There are many other uses of netif_tx_lock_bh() and so it would be
interesting to know if it's something about that function, or something
about the way it's used in this instance that triggers the error.
Any other information you can give that would help reproduce this would
be of great assistance. E.g. kernel source version, exactly which
distribution, exactly which gcc (e.g. is it a version that might have
been modified by a linux vendor), etc.
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread* RE: compile error of HVM pv drivers
2007-07-30 13:42 ` Kieran Mansley
@ 2007-07-30 13:49 ` Zhao, Yunfeng
2007-07-30 14:05 ` Kieran Mansley
0 siblings, 1 reply; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 13:49 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
>OK. I still can't see what the problem should be, other than something
>wrong with gcc 3.4.2. I was able to compile netfront fine with gcc
>3.4.3 by the way. Does gcc 3.4.2 cope OK with the rest of the kernel?
>There are many other uses of netif_tx_lock_bh() and so it would be
>interesting to know if it's something about that function, or something
>about the way it's used in this instance that triggers the error.
>
>Any other information you can give that would help reproduce this would
>be of great assistance. E.g. kernel source version, exactly which
>distribution, exactly which gcc (e.g. is it a version that might have
>been modified by a linux vendor), etc.
[Yunfeng] The build was tried on a FC3 root fs with using the gcc of
fc3, and tried to build the driver with 2.6.16 and 2.6.18 kernels, both
failed.
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 13:49 ` Zhao, Yunfeng
@ 2007-07-30 14:05 ` Kieran Mansley
2007-07-30 14:15 ` Zhao, Yunfeng
2007-07-30 14:22 ` Zhao, Yunfeng
0 siblings, 2 replies; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 14:05 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 21:49 +0800, Zhao, Yunfeng wrote:
> >Does gcc 3.4.2 cope OK with the rest of the kernel?
> >There are many other uses of netif_tx_lock_bh() and so it would be
> >interesting to know if it's something about that function, or something
> >about the way it's used in this instance that triggers the error.
Any thoughts on that one?
> >Any other information you can give that would help reproduce this would
> >be of great assistance. E.g. kernel source version, exactly which
> >distribution, exactly which gcc (e.g. is it a version that might have
> >been modified by a linux vendor), etc.
> [Yunfeng] The build was tried on a FC3 root fs with using the gcc of
> fc3,
Which one? :) There were probably multiple versions. E.g. the fc3 box
I have access to is using:
[~]$ gcc --version
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
I've had a look in the Changelog for both GCC and the redhat RPM from
around that time (between 3.4.2-1.fc3 and 3.4.3-22.fc3) and can't see
anything obvious that would have fixed this, but sometimes these things
aren't obvious.
If you can try the version of gcc that works for me, that would be
useful for ruling out it being something else that I'm doing that makes
it work:
http://rpmfind.net/linux/RPM/fedora/updates/3/i386/gcc-3.4.3-22.fc3.i386.html
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:05 ` Kieran Mansley
@ 2007-07-30 14:15 ` Zhao, Yunfeng
2007-07-30 14:22 ` Zhao, Yunfeng
1 sibling, 0 replies; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 14:15 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
>On Mon, 2007-07-30 at 21:49 +0800, Zhao, Yunfeng wrote:
>> >Does gcc 3.4.2 cope OK with the rest of the kernel?
>> >There are many other uses of netif_tx_lock_bh() and so it would be
>> >interesting to know if it's something about that function, or
something
>> >about the way it's used in this instance that triggers the error.
>
>Any thoughts on that one?
[Yunfeng] I will try this tomorrow. Current I am not in office, and I
have the env to do this.
>
>> >Any other information you can give that would help reproduce this
would
>> >be of great assistance. E.g. kernel source version, exactly which
>> >distribution, exactly which gcc (e.g. is it a version that might
have
>> >been modified by a linux vendor), etc.
>> [Yunfeng] The build was tried on a FC3 root fs with using the gcc of
>> fc3,
>
>Which one? :) There were probably multiple versions. E.g. the fc3 box
>I have access to is using:
>[~]$ gcc --version
>gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
>
>I've had a look in the Changelog for both GCC and the redhat RPM from
>around that time (between 3.4.2-1.fc3 and 3.4.3-22.fc3) and can't see
>anything obvious that would have fixed this, but sometimes these things
>aren't obvious.
>
>If you can try the version of gcc that works for me, that would be
>useful for ruling out it being something else that I'm doing that makes
>it work:
>
>http://rpmfind.net/linux/RPM/fedora/updates/3/i386/gcc-3.4.3-22.fc3.i38
6.ht
>ml
[Yunfeng] I will try this tomorrow.
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:05 ` Kieran Mansley
2007-07-30 14:15 ` Zhao, Yunfeng
@ 2007-07-30 14:22 ` Zhao, Yunfeng
2007-07-30 14:24 ` Kieran Mansley
1 sibling, 1 reply; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 14:22 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
What kernel have you tried? Have you tried 2.6.16?
Thanks
Yunfeng
>-----Original Message-----
>From: Kieran Mansley [mailto:kmansley@solarflare.com]
>Sent: 2007年7月30日 22:05
>To: Zhao, Yunfeng
>Cc: xen-devel@lists.xensource.com
>Subject: RE: [Xen-devel] compile error of HVM pv drivers
>
>On Mon, 2007-07-30 at 21:49 +0800, Zhao, Yunfeng wrote:
>> >Does gcc 3.4.2 cope OK with the rest of the kernel?
>> >There are many other uses of netif_tx_lock_bh() and so it would be
>> >interesting to know if it's something about that function, or something
>> >about the way it's used in this instance that triggers the error.
>
>Any thoughts on that one?
>
>> >Any other information you can give that would help reproduce this would
>> >be of great assistance. E.g. kernel source version, exactly which
>> >distribution, exactly which gcc (e.g. is it a version that might have
>> >been modified by a linux vendor), etc.
>> [Yunfeng] The build was tried on a FC3 root fs with using the gcc of
>> fc3,
>
>Which one? :) There were probably multiple versions. E.g. the fc3 box
>I have access to is using:
>[~]$ gcc --version
>gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
>
>I've had a look in the Changelog for both GCC and the redhat RPM from
>around that time (between 3.4.2-1.fc3 and 3.4.3-22.fc3) and can't see
>anything obvious that would have fixed this, but sometimes these things
>aren't obvious.
>
>If you can try the version of gcc that works for me, that would be
>useful for ruling out it being something else that I'm doing that makes
>it work:
>
>http://rpmfind.net/linux/RPM/fedora/updates/3/i386/gcc-3.4.3-22.fc3.i386.ht
>ml
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:22 ` Zhao, Yunfeng
@ 2007-07-30 14:24 ` Kieran Mansley
2007-07-30 14:32 ` Zhao, Yunfeng
2007-07-30 14:39 ` Zhao, Yunfeng
0 siblings, 2 replies; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 14:24 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 22:22 +0800, Zhao, Yunfeng wrote:
>
> What kernel have you tried? Have you tried 2.6.16?
>
>
2.6.18 - you mentioned that it failed for you on both 2.6.16 and 2.6.18.
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:24 ` Kieran Mansley
@ 2007-07-30 14:32 ` Zhao, Yunfeng
2007-07-30 14:39 ` Zhao, Yunfeng
1 sibling, 0 replies; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 14:32 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
>-----Original Message-----
>From: Kieran Mansley [mailto:kmansley@solarflare.com]
>Sent: 2007年7月30日 22:24
>To: Zhao, Yunfeng
>Cc: xen-devel@lists.xensource.com
>Subject: RE: [Xen-devel] compile error of HVM pv drivers
>
>On Mon, 2007-07-30 at 22:22 +0800, Zhao, Yunfeng wrote:
>>
>> What kernel have you tried? Have you tried 2.6.16?
>>
>>
>
>2.6.18 - you mentioned that it failed for you on both 2.6.16 and 2.6.18.
[Yunfeng] On FC3 I only tried 2.6.16, it failed. Sorry for the confusion!
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:24 ` Kieran Mansley
2007-07-30 14:32 ` Zhao, Yunfeng
@ 2007-07-30 14:39 ` Zhao, Yunfeng
2007-07-30 14:42 ` Keir Fraser
2007-07-30 14:47 ` Kieran Mansley
1 sibling, 2 replies; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 14:39 UTC (permalink / raw)
To: Kieran Mansley; +Cc: xen-devel
Hi, Kieran
I just checked 2.6.16 kernel source.
netif_tx_lock_bh is not in the code of 2.6.16, but it is in 2.6.18
thanks
Yunfeng
>-----Original Message-----
>From: Kieran Mansley [mailto:kmansley@solarflare.com]
>Sent: 2007年7月30日 22:24
>To: Zhao, Yunfeng
>Cc: xen-devel@lists.xensource.com
>Subject: RE: [Xen-devel] compile error of HVM pv drivers
>
>On Mon, 2007-07-30 at 22:22 +0800, Zhao, Yunfeng wrote:
>>
>> What kernel have you tried? Have you tried 2.6.16?
>>
>>
>
>2.6.18 - you mentioned that it failed for you on both 2.6.16 and 2.6.18.
>
>Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 14:39 ` Zhao, Yunfeng
@ 2007-07-30 14:42 ` Keir Fraser
2007-07-30 14:47 ` Kieran Mansley
1 sibling, 0 replies; 22+ messages in thread
From: Keir Fraser @ 2007-07-30 14:42 UTC (permalink / raw)
To: Zhao, Yunfeng, Kieran Mansley; +Cc: xen-devel
On <2.6.18 the definition for netif_tx_lock_bh() should be picked up from
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
-- Keir
On 30/7/07 15:39, "Zhao, Yunfeng" <yunfeng.zhao@intel.com> wrote:
> Hi, Kieran
> I just checked 2.6.16 kernel source.
> netif_tx_lock_bh is not in the code of 2.6.16, but it is in 2.6.18
>
> thanks
> Yunfeng
>> -----Original Message-----
>> From: Kieran Mansley [mailto:kmansley@solarflare.com]
>> Sent: 2007年7月30日 22:24
>> To: Zhao, Yunfeng
>> Cc: xen-devel@lists.xensource.com
>> Subject: RE: [Xen-devel] compile error of HVM pv drivers
>>
>> On Mon, 2007-07-30 at 22:22 +0800, Zhao, Yunfeng wrote:
>>>
>>> What kernel have you tried? Have you tried 2.6.16?
>>>
>>>
>>
>> 2.6.18 - you mentioned that it failed for you on both 2.6.16 and 2.6.18.
>>
>> Kieran
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:39 ` Zhao, Yunfeng
2007-07-30 14:42 ` Keir Fraser
@ 2007-07-30 14:47 ` Kieran Mansley
2007-07-30 14:51 ` Keir Fraser
2007-07-30 14:54 ` Kieran Mansley
1 sibling, 2 replies; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 14:47 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 22:39 +0800, Zhao, Yunfeng wrote:
> Hi, Kieran
> I just checked 2.6.16 kernel source.
> netif_tx_lock_bh is not in the code of 2.6.16, but it is in 2.6.18
In that case replacing the calls (there are two in that file) to
netif_tx_lock_bh() with:
spin_lock_bh(&vif_state->np->netdev->xmit_lock);
And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
may solve your problem.
If this works for you I'll make a patch that uses the kernel version to
decide which is appropriate.
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 14:47 ` Kieran Mansley
@ 2007-07-30 14:51 ` Keir Fraser
2007-07-30 15:02 ` Zhao, Yunfeng
2007-07-30 14:54 ` Kieran Mansley
1 sibling, 1 reply; 22+ messages in thread
From: Keir Fraser @ 2007-07-30 14:51 UTC (permalink / raw)
To: Kieran Mansley, Zhao, Yunfeng; +Cc: xen-devel
On 30/7/07 15:47, "Kieran Mansley" <kmansley@solarflare.com> wrote:
> In that case replacing the calls (there are two in that file) to
> netif_tx_lock_bh() with:
>
> spin_lock_bh(&vif_state->np->netdev->xmit_lock);
>
> And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
> may solve your problem.
>
> If this works for you I'll make a patch that uses the kernel version to
> decide which is appropriate.
Compat issues when building PV-on-HVM drivers are patched up out-of-band in
the special
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
header file.
-- Keir
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:51 ` Keir Fraser
@ 2007-07-30 15:02 ` Zhao, Yunfeng
2007-07-30 15:05 ` Keir Fraser
0 siblings, 1 reply; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 15:02 UTC (permalink / raw)
To: Keir Fraser, Kieran Mansley; +Cc: xen-devel
The problem may be from the new changes in unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
the following two lines:
#define netif_tx_lock_bh(dev) (spin_lock_bh(&(dev)->xmit_lock))
#define netif_tx_unlock_bh(dev) (spin_unlock_bh(&(dev)->xmit_lock))
should be
#define netif_tx_lock_bh(dev) (spin_lock_bh(&dev->xmit_lock))
#define netif_tx_unlock_bh(dev) (spin_unlock_bh(&dev->xmit_lock))
"()" is useless for dev.
Thanks
Yunfeng
>-----Original Message-----
>From: Keir Fraser [mailto:keir@xensource.com]
>Sent: 2007年7月30日 22:52
>To: Kieran Mansley; Zhao, Yunfeng
>Cc: xen-devel@lists.xensource.com
>Subject: Re: [Xen-devel] compile error of HVM pv drivers
>
>On 30/7/07 15:47, "Kieran Mansley" <kmansley@solarflare.com> wrote:
>
>> In that case replacing the calls (there are two in that file) to
>> netif_tx_lock_bh() with:
>>
>> spin_lock_bh(&vif_state->np->netdev->xmit_lock);
>>
>> And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
>> may solve your problem.
>>
>> If this works for you I'll make a patch that uses the kernel version to
>> decide which is appropriate.
>
>Compat issues when building PV-on-HVM drivers are patched up out-of-band in
>the special
>unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
>header file.
>
> -- Keir
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 15:02 ` Zhao, Yunfeng
@ 2007-07-30 15:05 ` Keir Fraser
2007-07-30 15:38 ` Zhao, Yunfeng
0 siblings, 1 reply; 22+ messages in thread
From: Keir Fraser @ 2007-07-30 15:05 UTC (permalink / raw)
To: Zhao, Yunfeng, Kieran Mansley; +Cc: xen-devel
I think you'll find that doesn't fix the problem. The () is there for a
reason.
K.
On 30/7/07 16:02, "Zhao, Yunfeng" <yunfeng.zhao@intel.com> wrote:
> The problem may be from the new changes in
> unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
>
> the following two lines:
> #define netif_tx_lock_bh(dev) (spin_lock_bh(&(dev)->xmit_lock))
> #define netif_tx_unlock_bh(dev) (spin_unlock_bh(&(dev)->xmit_lock))
> should be
> #define netif_tx_lock_bh(dev) (spin_lock_bh(&dev->xmit_lock))
> #define netif_tx_unlock_bh(dev) (spin_unlock_bh(&dev->xmit_lock))
> "()" is useless for dev.
>
> Thanks
> Yunfeng
>
>
>
>> -----Original Message-----
>> From: Keir Fraser [mailto:keir@xensource.com]
>> Sent: 2007年7月30日 22:52
>> To: Kieran Mansley; Zhao, Yunfeng
>> Cc: xen-devel@lists.xensource.com
>> Subject: Re: [Xen-devel] compile error of HVM pv drivers
>>
>> On 30/7/07 15:47, "Kieran Mansley" <kmansley@solarflare.com> wrote:
>>
>>> In that case replacing the calls (there are two in that file) to
>>> netif_tx_lock_bh() with:
>>>
>>> spin_lock_bh(&vif_state->np->netdev->xmit_lock);
>>>
>>> And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
>>> may solve your problem.
>>>
>>> If this works for you I'll make a patch that uses the kernel version to
>>> decide which is appropriate.
>>
>> Compat issues when building PV-on-HVM drivers are patched up out-of-band in
>> the special
>> unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
>> header file.
>>
>> -- Keir
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 15:05 ` Keir Fraser
@ 2007-07-30 15:38 ` Zhao, Yunfeng
2007-07-30 15:42 ` Kieran Mansley
0 siblings, 1 reply; 22+ messages in thread
From: Zhao, Yunfeng @ 2007-07-30 15:38 UTC (permalink / raw)
To: Keir Fraser, Kieran Mansley; +Cc: xen-devel
"netfront/accel.c" needs include platform-compat.h
#ifdef HAVE_XEN_PLATFORM_COMPAT_H
#include <xen/platform-compat.h>
#endif
>-----Original Message-----
>From: Keir Fraser [mailto:keir@xensource.com]
>Sent: 2007年7月30日 23:05
>To: Zhao, Yunfeng; Kieran Mansley
>Cc: xen-devel@lists.xensource.com
>Subject: Re: [Xen-devel] compile error of HVM pv drivers
>
>I think you'll find that doesn't fix the problem. The () is there for a
>reason.
>
> K.
>
>On 30/7/07 16:02, "Zhao, Yunfeng" <yunfeng.zhao@intel.com> wrote:
>
>> The problem may be from the new changes in
>> unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
>>
>> the following two lines:
>> #define netif_tx_lock_bh(dev) (spin_lock_bh(&(dev)->xmit_lock))
>> #define netif_tx_unlock_bh(dev) (spin_unlock_bh(&(dev)->xmit_lock))
>> should be
>> #define netif_tx_lock_bh(dev) (spin_lock_bh(&dev->xmit_lock))
>> #define netif_tx_unlock_bh(dev) (spin_unlock_bh(&dev->xmit_lock))
>> "()" is useless for dev.
>>
>> Thanks
>> Yunfeng
>>
>>
>>
>>> -----Original Message-----
>>> From: Keir Fraser [mailto:keir@xensource.com]
>>> Sent: 2007年7月30日 22:52
>>> To: Kieran Mansley; Zhao, Yunfeng
>>> Cc: xen-devel@lists.xensource.com
>>> Subject: Re: [Xen-devel] compile error of HVM pv drivers
>>>
>>> On 30/7/07 15:47, "Kieran Mansley" <kmansley@solarflare.com> wrote:
>>>
>>>> In that case replacing the calls (there are two in that file) to
>>>> netif_tx_lock_bh() with:
>>>>
>>>> spin_lock_bh(&vif_state->np->netdev->xmit_lock);
>>>>
>>>> And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
>>>> may solve your problem.
>>>>
>>>> If this works for you I'll make a patch that uses the kernel version to
>>>> decide which is appropriate.
>>>
>>> Compat issues when building PV-on-HVM drivers are patched up out-of-band in
>>> the special
>>> unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
>>> header file.
>>>
>>> -- Keir
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 15:38 ` Zhao, Yunfeng
@ 2007-07-30 15:42 ` Kieran Mansley
2007-07-30 16:42 ` Keir Fraser
0 siblings, 1 reply; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 15:42 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 23:38 +0800, Zhao, Yunfeng wrote:
> "netfront/accel.c" needs include platform-compat.h
> #ifdef HAVE_XEN_PLATFORM_COMPAT_H
> #include <xen/platform-compat.h>
> #endif
That should come from netfront.h, same as for netfront.c
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: compile error of HVM pv drivers
2007-07-30 15:42 ` Kieran Mansley
@ 2007-07-30 16:42 ` Keir Fraser
0 siblings, 0 replies; 22+ messages in thread
From: Keir Fraser @ 2007-07-30 16:42 UTC (permalink / raw)
To: Kieran Mansley, Zhao, Yunfeng; +Cc: xen-devel
Yeah, I have checked the PV-on-HVM build against 2.6.17, so it's not going
to be anything super-obvious like that.
-- Keir
On 30/7/07 16:42, "Kieran Mansley" <kmansley@solarflare.com> wrote:
> On Mon, 2007-07-30 at 23:38 +0800, Zhao, Yunfeng wrote:
>> "netfront/accel.c" needs include platform-compat.h
>> #ifdef HAVE_XEN_PLATFORM_COMPAT_H
>> #include <xen/platform-compat.h>
>> #endif
>
> That should come from netfront.h, same as for netfront.c
>
> Kieran
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: compile error of HVM pv drivers
2007-07-30 14:47 ` Kieran Mansley
2007-07-30 14:51 ` Keir Fraser
@ 2007-07-30 14:54 ` Kieran Mansley
1 sibling, 0 replies; 22+ messages in thread
From: Kieran Mansley @ 2007-07-30 14:54 UTC (permalink / raw)
To: Zhao, Yunfeng; +Cc: xen-devel
On Mon, 2007-07-30 at 15:47 +0100, Kieran Mansley wrote:
> On Mon, 2007-07-30 at 22:39 +0800, Zhao, Yunfeng wrote:
> > Hi, Kieran
> > I just checked 2.6.16 kernel source.
> > netif_tx_lock_bh is not in the code of 2.6.16, but it is in 2.6.18
>
> In that case replacing the calls (there are two in that file) to
> netif_tx_lock_bh() with:
>
> spin_lock_bh(&vif_state->np->netdev->xmit_lock);
>
> And similarly the calls to netif_tx_unlock_bh() with spin_unlock_bh(),
> may solve your problem.
In light of Keir's reply pointing out the compat definition of
netif_tx_lock_bh() this is clearly not going to help. Sorry. I thought
it was an odd way of the compiler to express that error.
Kieran
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2007-07-30 16:42 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 9:28 compile error of HVM pv drivers Zhao, Yunfeng
2007-07-30 9:52 ` Keir Fraser
2007-07-30 9:58 ` Kieran Mansley
2007-07-30 10:13 ` Mats Petersson
2007-07-30 12:43 ` Zhao, Yunfeng
2007-07-30 13:42 ` Kieran Mansley
2007-07-30 13:49 ` Zhao, Yunfeng
2007-07-30 14:05 ` Kieran Mansley
2007-07-30 14:15 ` Zhao, Yunfeng
2007-07-30 14:22 ` Zhao, Yunfeng
2007-07-30 14:24 ` Kieran Mansley
2007-07-30 14:32 ` Zhao, Yunfeng
2007-07-30 14:39 ` Zhao, Yunfeng
2007-07-30 14:42 ` Keir Fraser
2007-07-30 14:47 ` Kieran Mansley
2007-07-30 14:51 ` Keir Fraser
2007-07-30 15:02 ` Zhao, Yunfeng
2007-07-30 15:05 ` Keir Fraser
2007-07-30 15:38 ` Zhao, Yunfeng
2007-07-30 15:42 ` Kieran Mansley
2007-07-30 16:42 ` Keir Fraser
2007-07-30 14:54 ` Kieran Mansley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.