* Re: 2.6.23-rc6-mm1: Build failure on ppc64 drivers/net/ehea/ehea_main.c
[not found] ` <20070918162039.GA1804@skynet.ie>
@ 2007-09-18 16:41 ` Mel Gorman
0 siblings, 0 replies; 11+ messages in thread
From: Mel Gorman @ 2007-09-18 16:41 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, themann, netdev, davem
My apologies for the repost, this should have gone to netdev and Dave Miller
as well.
On (18/09/07 17:20), Mel Gorman didst pronounce:
> Hi Andrew,
>
> PPC64 failed to build with the driver drivers/net/ehea with the
> following error
>
> CC [M] drivers/net/ehea/ehea_main.o
> drivers/net/ehea/ehea_main.c: In function `ehea_open':
> drivers/net/ehea/ehea_main.c:2322: error: implicit declaration of function `port_napi_enable'
> drivers/net/ehea/ehea_main.c: At top level:
> drivers/net/ehea/ehea_main.c:2340: error: conflicting types for 'port_napi_enable'
> drivers/net/ehea/ehea_main.c:2322: error: previous implicit declaration of 'port_napi_enable' was here
> make[1]: *** [drivers/net/ehea/ehea_main.o] Error 1
>
> It's buried in git-net.patch and I've cc'd a potential owner based simply
> on the mention of EHEA in a leader. I've included a candidate fix for the
> error. It seems to be a simple case of port_napi_enable being defined in
> the wrong place.
>
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
>
> ---
> ehea_main.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc6-mm1-005_fix-rpadlpar_sysfs/drivers/net/ehea/ehea_main.c linux-2.6.23-rc6-mm1-010_fix_ehea_main/drivers/net/ehea/ehea_main.c
> --- linux-2.6.23-rc6-mm1-005_fix-rpadlpar_sysfs/drivers/net/ehea/ehea_main.c 2007-09-18 11:29:28.000000000 +0100
> +++ linux-2.6.23-rc6-mm1-010_fix_ehea_main/drivers/net/ehea/ehea_main.c 2007-09-18 17:15:27.000000000 +0100
> @@ -2307,6 +2307,22 @@ out:
> return ret;
> }
>
> +static void port_napi_disable(struct ehea_port *port)
> +{
> + int i;
> +
> + for (i = 0; i < port->num_def_qps; i++)
> + napi_disable(&port->port_res[i].napi);
> +}
> +
> +static void port_napi_enable(struct ehea_port *port)
> +{
> + int i;
> +
> + for (i = 0; i < port->num_def_qps; i++)
> + napi_enable(&port->port_res[i].napi);
> +}
> +
> static int ehea_open(struct net_device *dev)
> {
> int ret;
> @@ -2328,22 +2344,6 @@ static int ehea_open(struct net_device *
> return ret;
> }
>
> -static void port_napi_disable(struct ehea_port *port)
> -{
> - int i;
> -
> - for (i = 0; i < port->num_def_qps; i++)
> - napi_disable(&port->port_res[i].napi);
> -}
> -
> -static void port_napi_enable(struct ehea_port *port)
> -{
> - int i;
> -
> - for (i = 0; i < port->num_def_qps; i++)
> - napi_enable(&port->port_res[i].napi);
> -}
> -
> static int ehea_down(struct net_device *dev)
> {
> int ret;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.23-rc6-mm1
[not found] ` <f86d6cc00709200912j37a3218boa882a044c0610779@mail.gmail.com>
@ 2007-09-20 19:44 ` Andrew Morton
0 siblings, 0 replies; 11+ messages in thread
From: Andrew Morton @ 2007-09-20 19:44 UTC (permalink / raw)
To: Kamalesh Babulal; +Cc: Joseph Fannin, linux-kernel, Mike Travis, netdev
On Thu, 20 Sep 2007 21:42:44 +0530
"Kamalesh Babulal" <kamalesh.babulal@gmail.com> wrote:
> ...
>
> > i have tested the change with cross compiler for power405 with the same
> > .config
> > with which the build problem is solved, but the build fails with another
> > error
> >
> > CC [M] drivers/net/mace.o
> > drivers/net/mace.c: In function 'mace_handle_misc_intrs':
> > drivers/net/mace.c:642: error: 'dev' undeclared (first use in this
> > function)
> > drivers/net/mace.c:642: error: (Each undeclared identifier is reported
> > only once
> > drivers/net/mace.c:642: error: for each function it appears in.)
> > make[2]: *** [drivers/net/mace.o] Error 1
> > make[1]: *** [drivers/net] Error 2
> > make: *** [drivers] Error 2
> >
> > This patch fixes the build failure
> >
> > Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> > ---
> > --- linux-2.6.23-rc6 /drivers/net/mace.c 2007-09-20 17:16:50.000000000+0530
> > +++ linux-2.6.23-rc6/drivers/net/~mace.c 2007-09-20 17:12:
> > 47.000000000 +0530
> > @@ -633,7 +633,7 @@ static void mace_set_multicast(struct ne
> > spin_unlock_irqrestore(&mp->lock, flags);
> > }
> >
> > -static void mace_handle_misc_intrs(struct mace_data *mp, int intr)
> > +static void mace_handle_misc_intrs(struct mace_data *mp, int intr, struct
> > net_device *dev)
> > {
> > volatile struct mace __iomem *mb = mp->mace;
> > static int mace_babbles, mace_jabbers;
> > @@ -669,7 +669,7 @@ static irqreturn_t mace_interrupt(int ir
> > spin_lock_irqsave(&mp->lock, flags);
> > intr = in_8(&mb->ir); /* read interrupt register */
> > in_8(&mb->xmtrc); /* get retries */
> > - mace_handle_misc_intrs(mp, intr);
> > + mace_handle_misc_intrs(mp, intr, dev);
> >
> > i = mp->tx_empty;
> > while (in_8(&mb->pr) & XMTSV) {
> > @@ -682,7 +682,7 @@ static irqreturn_t mace_interrupt(int ir
> > */
> > intr = in_8(&mb->ir);
> > if (intr != 0)
> > - mace_handle_misc_intrs(mp, intr);
> > + mace_handle_misc_intrs(mp, intr, dev);
> > if (mp->tx_bad_runt) {
> > fs = in_8(&mb->xmtfs);
> > mp->tx_bad_runt = 0;
> > @@ -817,7 +817,7 @@ static void mace_tx_timeout(unsigned lon
> > goto out;
> >
> > /* update various counters */
> > - mace_handle_misc_intrs(mp, in_8(&mb->ir));
> > + mace_handle_misc_intrs(mp, in_8(&mb->ir), dev);
> >
> > cp = mp->tx_cmds + NCMDS_TX * mp->tx_empty;
Thanks, I will fix the wordwrapping in your patch and shall send it in to
David.
>
> Hi,
>
> The build fails when compiling with the same .config over cross compiler for
> powerpc405
>
> drivers/net/mv643xx_eth.c: In function 'mv643xx_eth_int_handler':
> drivers/net/mv643xx_eth.c:564: error: 'bp' undeclared (first use in this
> function)
> drivers/net/mv643xx_eth.c:564: error: (Each undeclared identifier is
> reported only once
> drivers/net/mv643xx_eth.c:564: error: for each function it appears in.)
> drivers/net/mv643xx_eth.c: At top level:
> drivers/net/mv643xx_eth.c:1010: error: conflicting types for 'mv643xx_poll'
> drivers/net/mv643xx_eth.c:68: error: previous declaration of 'mv643xx_poll'
> was here
> make[2]: *** [drivers/net/mv643xx_eth.o] Error 1
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
Yes, rather a lot of net drivers got broken in easy-to-fix ways.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig
[not found] ` <alpine.LFD.0.999.0709201903180.17093@enigma.security.iitk.ac.in>
@ 2007-09-22 6:54 ` Satyam Sharma
2007-09-24 11:12 ` Mel Gorman
2007-09-22 7:25 ` Satyam Sharma
2007-09-22 7:40 ` [PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes Satyam Sharma
2 siblings, 1 reply; 11+ messages in thread
From: Satyam Sharma @ 2007-09-22 6:54 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, Linux Kernel Mailing List, linuxppc-dev,
Linux Netdev Mailing List, jeff
On Thu, 20 Sep 2007, Satyam Sharma wrote:
>
> BTW ppc64_defconfig didn't quite like 2.6.23-rc6-mm1 either ...
> IIRC I got build failures in:
> drivers/net/spider_net.c
[PATCH -mm] spider_net: Misc build fixes after recent netdev stats changes
Unbreak the following:
drivers/net/spider_net.c: In function 'spider_net_release_tx_chain':
drivers/net/spider_net.c:818: error: 'dev' undeclared (first use in this function)
drivers/net/spider_net.c:818: error: (Each undeclared identifier is reported only once
drivers/net/spider_net.c:818: error: for each function it appears in.)
drivers/net/spider_net.c: In function 'spider_net_xmit':
drivers/net/spider_net.c:922: error: 'dev' undeclared (first use in this function)
drivers/net/spider_net.c: In function 'spider_net_pass_skb_up':
drivers/net/spider_net.c:1018: error: 'dev' undeclared (first use in this function)
drivers/net/spider_net.c: In function 'spider_net_decode_one_descr':
drivers/net/spider_net.c:1215: error: 'dev' undeclared (first use in this function)
make[2]: *** [drivers/net/spider_net.o] Error 1
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/net/spider_net.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff -ruNp a/drivers/net/spider_net.c b/drivers/net/spider_net.c
--- a/drivers/net/spider_net.c 2007-09-22 06:26:39.000000000 +0530
+++ b/drivers/net/spider_net.c 2007-09-22 12:12:23.000000000 +0530
@@ -795,6 +795,7 @@ spider_net_set_low_watermark(struct spid
static int
spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
{
+ struct net_device *dev = card->netdev;
struct spider_net_descr_chain *chain = &card->tx_chain;
struct spider_net_descr *descr;
struct spider_net_hw_descr *hwdescr;
@@ -919,7 +920,7 @@ spider_net_xmit(struct sk_buff *skb, str
spider_net_release_tx_chain(card, 0);
if (spider_net_prepare_tx_descr(card, skb) != 0) {
- dev->stats.tx_dropped++;
+ netdev->stats.tx_dropped++;
netif_stop_queue(netdev);
return NETDEV_TX_BUSY;
}
@@ -979,16 +980,12 @@ static void
spider_net_pass_skb_up(struct spider_net_descr *descr,
struct spider_net_card *card)
{
- struct spider_net_hw_descr *hwdescr= descr->hwdescr;
- struct sk_buff *skb;
- struct net_device *netdev;
- u32 data_status, data_error;
-
- data_status = hwdescr->data_status;
- data_error = hwdescr->data_error;
- netdev = card->netdev;
+ struct spider_net_hw_descr *hwdescr = descr->hwdescr;
+ struct sk_buff *skb = descr->skb;
+ struct net_device *netdev = card->netdev;
+ u32 data_status = hwdescr->data_status;
+ u32 data_error = hwdescr->data_error;
- skb = descr->skb;
skb_put(skb, hwdescr->valid_size);
/* the card seems to add 2 bytes of junk in front
@@ -1015,8 +1012,8 @@ spider_net_pass_skb_up(struct spider_net
}
/* update netdevice statistics */
- dev->stats.rx_packets++;
- dev->stats.rx_bytes += skb->len;
+ netdev->stats.rx_packets++;
+ netdev->stats.rx_bytes += skb->len;
/* pass skb up to stack */
netif_receive_skb(skb);
@@ -1184,6 +1181,7 @@ static int spider_net_resync_tail_ptr(st
static int
spider_net_decode_one_descr(struct spider_net_card *card)
{
+ struct net_device *dev = card->netdev;
struct spider_net_descr_chain *chain = &card->rx_chain;
struct spider_net_descr *descr = chain->tail;
struct spider_net_hw_descr *hwdescr = descr->hwdescr;
@@ -1210,7 +1208,7 @@ spider_net_decode_one_descr(struct spide
(status == SPIDER_NET_DESCR_PROTECTION_ERROR) ||
(status == SPIDER_NET_DESCR_FORCE_END) ) {
if (netif_msg_rx_err(card))
- dev_err(&card->netdev->dev,
+ dev_err(&dev->dev,
"dropping RX descriptor with state %d\n", status);
dev->stats.rx_dropped++;
goto bad_desc;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig
[not found] ` <alpine.LFD.0.999.0709201903180.17093@enigma.security.iitk.ac.in>
2007-09-22 6:54 ` 2.6.23-rc6-mm1: Build failures on ppc64_defconfig Satyam Sharma
@ 2007-09-22 7:25 ` Satyam Sharma
2007-09-22 7:40 ` [PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes Satyam Sharma
2 siblings, 0 replies; 11+ messages in thread
From: Satyam Sharma @ 2007-09-22 7:25 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, Linux Kernel Mailing List, linuxppc-dev,
Jeff Garzik, Linux Netdev Mailing List
On Thu, 20 Sep 2007, Satyam Sharma wrote:
>
> BTW ppc64_defconfig didn't quite like 2.6.23-rc6-mm1 either ...
> IIRC I got build failures in:
> drivers/net/spider_net.c
Fixing the above showed up another problem in another file of the
same driver (drivers/net/spider_net_ethtool.c)
[PATCH -mm] spider_net_ethtool: Keep up with recent netdev stats changes
Unbreak the following:
drivers/net/spider_net_ethtool.c: In function 'spider_net_get_ethtool_stats':
drivers/net/spider_net_ethtool.c:160: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:161: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:162: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:163: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:164: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:165: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:166: error: structure has no member named 'netdev_stats'
make[2]: *** [drivers/net/spider_net_ethtool.o] Error 1
Also do another ARRAY_SIZE() cleanup while at it.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/net/spider_net_ethtool.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff -ruNp a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c
--- a/drivers/net/spider_net_ethtool.c 2007-09-22 06:26:39.000000000 +0530
+++ b/drivers/net/spider_net_ethtool.c 2007-09-22 12:43:51.000000000 +0530
@@ -28,8 +28,6 @@
#include "spider_net.h"
-#define SPIDER_NET_NUM_STATS 13
-
static struct {
const char str[ETH_GSTRING_LEN];
} ethtool_stats_keys[] = {
@@ -149,7 +147,7 @@ spider_net_ethtool_get_ringparam(struct
static int spider_net_get_stats_count(struct net_device *netdev)
{
- return SPIDER_NET_NUM_STATS;
+ return ARRAY_SIZE(ethtool_stats_keys);
}
static void spider_net_get_ethtool_stats(struct net_device *netdev,
@@ -157,13 +155,13 @@ static void spider_net_get_ethtool_stats
{
struct spider_net_card *card = netdev->priv;
- data[0] = card->netdev_stats.tx_packets;
- data[1] = card->netdev_stats.tx_bytes;
- data[2] = card->netdev_stats.rx_packets;
- data[3] = card->netdev_stats.rx_bytes;
- data[4] = card->netdev_stats.tx_errors;
- data[5] = card->netdev_stats.tx_dropped;
- data[6] = card->netdev_stats.rx_dropped;
+ data[0] = netdev->stats.tx_packets;
+ data[1] = netdev->stats.tx_bytes;
+ data[2] = netdev->stats.rx_packets;
+ data[3] = netdev->stats.rx_bytes;
+ data[4] = netdev->stats.tx_errors;
+ data[5] = netdev->stats.tx_dropped;
+ data[6] = netdev->stats.rx_dropped;
data[7] = card->spider_stats.rx_desc_error;
data[8] = card->spider_stats.tx_timeouts;
data[9] = card->spider_stats.alloc_rx_skb_error;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes
[not found] ` <alpine.LFD.0.999.0709201903180.17093@enigma.security.iitk.ac.in>
2007-09-22 6:54 ` 2.6.23-rc6-mm1: Build failures on ppc64_defconfig Satyam Sharma
2007-09-22 7:25 ` Satyam Sharma
@ 2007-09-22 7:40 ` Satyam Sharma
2 siblings, 0 replies; 11+ messages in thread
From: Satyam Sharma @ 2007-09-22 7:40 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, Linux Kernel Mailing List,
Linux Netdev Mailing List, Jeff Garzik, David Miller
On Thu, 20 Sep 2007, Satyam Sharma wrote:
>
> BTW ppc64_defconfig didn't quite like 2.6.23-rc6-mm1 either ...
> IIRC I got build failures in:
> drivers/net/pasemi_mac.c
[PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes
Unbreak the following:
drivers/net/pasemi_mac.c: In function 'pasemi_mac_clean_rx':
drivers/net/pasemi_mac.c:533: error: 'dev' undeclared (first use in this function)
drivers/net/pasemi_mac.c:533: error: (Each undeclared identifier is reported only once
drivers/net/pasemi_mac.c:533: error: for each function it appears in.)
And remove an unused static function:
drivers/net/pasemi_mac.c: At top level:
drivers/net/pasemi_mac.c:89: warning: 'read_iob_reg' defined but not used
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/net/pasemi_mac.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff -ruNp a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
--- a/drivers/net/pasemi_mac.c 2007-09-22 06:26:39.000000000 +0530
+++ b/drivers/net/pasemi_mac.c 2007-09-22 13:03:04.000000000 +0530
@@ -85,11 +85,6 @@ MODULE_PARM_DESC(debug, "PA Semi MAC bit
static struct pasdma_status *dma_status;
-static unsigned int read_iob_reg(struct pasemi_mac *mac, unsigned int reg)
-{
- return in_le32(mac->iob_regs+reg);
-}
-
static void write_iob_reg(struct pasemi_mac *mac, unsigned int reg,
unsigned int val)
{
@@ -530,8 +525,8 @@ static int pasemi_mac_clean_rx(struct pa
} else
skb->ip_summed = CHECKSUM_NONE;
- dev->stats.rx_bytes += len;
- dev->stats.rx_packets++;
+ mac->netdev->stats.rx_bytes += len;
+ mac->netdev->stats.rx_packets++;
skb->protocol = eth_type_trans(skb, mac->netdev);
netif_receive_skb(skb);
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -mm] mv643xx_eth: Remove redundant multiple initialization
[not found] <20070918011841.2381bd93.akpm@linux-foundation.org>
` (2 preceding siblings ...)
[not found] ` <20070920132512.GF24105@skynet.ie>
@ 2007-09-22 7:54 ` Satyam Sharma
2007-09-22 7:55 ` [PATCH -mm] iseries_veth: Kill unused variable Satyam Sharma
[not found] ` <20070921020554.GE31759@nineveh.local>
5 siblings, 0 replies; 11+ messages in thread
From: Satyam Sharma @ 2007-09-22 7:54 UTC (permalink / raw)
To: Andrew Morton
Cc: Linux Kernel Mailing List, Jeff Garzik, Linux Netdev Mailing List
Of ethtool_ops->get_stats_count and ethtool_ops->get_ethtool_stats.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/net/mv643xx_eth.c | 2 --
1 file changed, 2 deletions(-)
diff -ruNp a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
--- a/drivers/net/mv643xx_eth.c 2007-09-22 06:26:39.000000000 +0530
+++ b/drivers/net/mv643xx_eth.c 2007-09-22 13:15:41.000000000 +0530
@@ -2740,8 +2740,6 @@ static const struct ethtool_ops mv643xx_
.get_stats_count = mv643xx_get_stats_count,
.get_ethtool_stats = mv643xx_get_ethtool_stats,
.get_strings = mv643xx_get_strings,
- .get_stats_count = mv643xx_get_stats_count,
- .get_ethtool_stats = mv643xx_get_ethtool_stats,
.nway_reset = mv643xx_eth_nway_restart,
};
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -mm] iseries_veth: Kill unused variable
[not found] <20070918011841.2381bd93.akpm@linux-foundation.org>
` (3 preceding siblings ...)
2007-09-22 7:54 ` [PATCH -mm] mv643xx_eth: Remove redundant multiple initialization Satyam Sharma
@ 2007-09-22 7:55 ` Satyam Sharma
[not found] ` <20070921020554.GE31759@nineveh.local>
5 siblings, 0 replies; 11+ messages in thread
From: Satyam Sharma @ 2007-09-22 7:55 UTC (permalink / raw)
To: Andrew Morton
Cc: Linux Kernel Mailing List, Jeff Garzik, Linux Netdev Mailing List
drivers/net/iseries_veth.c: In function 'veth_transmit_to_many':
drivers/net/iseries_veth.c:1174: warning: unused variable 'port'
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/net/iseries_veth.c | 1 -
1 file changed, 1 deletion(-)
diff -ruNp a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
--- a/drivers/net/iseries_veth.c 2007-09-22 06:26:39.000000000 +0530
+++ b/drivers/net/iseries_veth.c 2007-09-22 11:17:29.000000000 +0530
@@ -1171,7 +1171,6 @@ static void veth_transmit_to_many(struct
HvLpIndexMap lpmask,
struct net_device *dev)
{
- struct veth_port *port = (struct veth_port *) dev->priv;
int i, success, error;
success = error = 0;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig
2007-09-22 6:54 ` 2.6.23-rc6-mm1: Build failures on ppc64_defconfig Satyam Sharma
@ 2007-09-24 11:12 ` Mel Gorman
0 siblings, 0 replies; 11+ messages in thread
From: Mel Gorman @ 2007-09-24 11:12 UTC (permalink / raw)
To: Satyam Sharma
Cc: Andrew Morton, Linux Kernel Mailing List, linuxppc-dev,
Linux Netdev Mailing List, jeff
On (22/09/07 12:24), Satyam Sharma didst pronounce:
>
>
> On Thu, 20 Sep 2007, Satyam Sharma wrote:
> >
> > BTW ppc64_defconfig didn't quite like 2.6.23-rc6-mm1 either ...
> > IIRC I got build failures in:
>
> > drivers/net/spider_net.c
>
>
> [PATCH -mm] spider_net: Misc build fixes after recent netdev stats changes
>
> Unbreak the following:
>
> drivers/net/spider_net.c: In function 'spider_net_release_tx_chain':
> drivers/net/spider_net.c:818: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c:818: error: (Each undeclared identifier is reported only once
> drivers/net/spider_net.c:818: error: for each function it appears in.)
> drivers/net/spider_net.c: In function 'spider_net_xmit':
> drivers/net/spider_net.c:922: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c: In function 'spider_net_pass_skb_up':
> drivers/net/spider_net.c:1018: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c: In function 'spider_net_decode_one_descr':
> drivers/net/spider_net.c:1215: error: 'dev' undeclared (first use in this function)
> make[2]: *** [drivers/net/spider_net.o] Error 1
>
> Signed-off-by: Satyam Sharma <satyam@infradead.org>
I've confirmed that this patch fixes the build error in question.
Acked-by: Mel Gorman <mel@csn.ul.ie>
>
> ---
>
> drivers/net/spider_net.c | 24 +++++++++++-------------
> 1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff -ruNp a/drivers/net/spider_net.c b/drivers/net/spider_net.c
> --- a/drivers/net/spider_net.c 2007-09-22 06:26:39.000000000 +0530
> +++ b/drivers/net/spider_net.c 2007-09-22 12:12:23.000000000 +0530
> @@ -795,6 +795,7 @@ spider_net_set_low_watermark(struct spid
> static int
> spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
> {
> + struct net_device *dev = card->netdev;
> struct spider_net_descr_chain *chain = &card->tx_chain;
> struct spider_net_descr *descr;
> struct spider_net_hw_descr *hwdescr;
> @@ -919,7 +920,7 @@ spider_net_xmit(struct sk_buff *skb, str
> spider_net_release_tx_chain(card, 0);
>
> if (spider_net_prepare_tx_descr(card, skb) != 0) {
> - dev->stats.tx_dropped++;
> + netdev->stats.tx_dropped++;
> netif_stop_queue(netdev);
> return NETDEV_TX_BUSY;
> }
> @@ -979,16 +980,12 @@ static void
> spider_net_pass_skb_up(struct spider_net_descr *descr,
> struct spider_net_card *card)
> {
> - struct spider_net_hw_descr *hwdescr= descr->hwdescr;
> - struct sk_buff *skb;
> - struct net_device *netdev;
> - u32 data_status, data_error;
> -
> - data_status = hwdescr->data_status;
> - data_error = hwdescr->data_error;
> - netdev = card->netdev;
> + struct spider_net_hw_descr *hwdescr = descr->hwdescr;
> + struct sk_buff *skb = descr->skb;
> + struct net_device *netdev = card->netdev;
> + u32 data_status = hwdescr->data_status;
> + u32 data_error = hwdescr->data_error;
>
> - skb = descr->skb;
> skb_put(skb, hwdescr->valid_size);
>
> /* the card seems to add 2 bytes of junk in front
> @@ -1015,8 +1012,8 @@ spider_net_pass_skb_up(struct spider_net
> }
>
> /* update netdevice statistics */
> - dev->stats.rx_packets++;
> - dev->stats.rx_bytes += skb->len;
> + netdev->stats.rx_packets++;
> + netdev->stats.rx_bytes += skb->len;
>
> /* pass skb up to stack */
> netif_receive_skb(skb);
> @@ -1184,6 +1181,7 @@ static int spider_net_resync_tail_ptr(st
> static int
> spider_net_decode_one_descr(struct spider_net_card *card)
> {
> + struct net_device *dev = card->netdev;
> struct spider_net_descr_chain *chain = &card->rx_chain;
> struct spider_net_descr *descr = chain->tail;
> struct spider_net_hw_descr *hwdescr = descr->hwdescr;
> @@ -1210,7 +1208,7 @@ spider_net_decode_one_descr(struct spide
> (status == SPIDER_NET_DESCR_PROTECTION_ERROR) ||
> (status == SPIDER_NET_DESCR_FORCE_END) ) {
> if (netif_msg_rx_err(card))
> - dev_err(&card->netdev->dev,
> + dev_err(&dev->dev,
> "dropping RX descriptor with state %d\n", status);
> dev->stats.rx_dropped++;
> goto bad_desc;
>
--
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Remove broken netfilter binary sysctls from bridging code
[not found] ` <20070924131458.0daa4562@freepuppy.rosehill>
@ 2007-09-25 4:07 ` Patrick McHardy
2007-09-25 16:12 ` Stephen Hemminger
0 siblings, 1 reply; 11+ messages in thread
From: Patrick McHardy @ 2007-09-25 4:07 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: linux-kernel, Linux Netdev List
Stephen Hemminger wrote:
> On Mon, 24 Sep 2007 18:55:38 +0200
> Patrick McHardy <kaber@trash.net> wrote:
>
>>Eric W. Biederman wrote:
>>
>>>A really good fix would be to remove the binary side and then to
>>>modify brnf_sysctl_call_tables to allocate a temporary ctl_table and
>>>integer on the stack and only set ctl->data after we have normalized
>>>the written value. But since in practice nothing cares about
>>>the race a better fix probably isn't worth it.
>>
>>
>>I seem to be missing something, the entire brnf_sysctl_call_tables
>>thing looks purely cosmetic to me, wouldn't it be better to simply
>>remove it?
>
>
> I agree, removing seems like a better option. But probably need to go
> through a 3-6mo warning period, since sysctl's are technically an API.
I meant removing brnf_sysctl_call_tables function, not the sysctls
themselves, all it does is change values != 0 to 1. Or did you
actually mean that something in userspace might depend on reading
back the value 1 after writing a value != 0?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Remove broken netfilter binary sysctls from bridging code
2007-09-25 4:07 ` [PATCH] Remove broken netfilter binary sysctls from bridging code Patrick McHardy
@ 2007-09-25 16:12 ` Stephen Hemminger
2007-09-25 16:22 ` Patrick McHardy
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2007-09-25 16:12 UTC (permalink / raw)
To: Patrick McHardy; +Cc: linux-kernel, Linux Netdev List
On Tue, 25 Sep 2007 06:07:24 +0200
Patrick McHardy <kaber@trash.net> wrote:
> Stephen Hemminger wrote:
> > On Mon, 24 Sep 2007 18:55:38 +0200
> > Patrick McHardy <kaber@trash.net> wrote:
> >
> >>Eric W. Biederman wrote:
> >>
> >>>A really good fix would be to remove the binary side and then to
> >>>modify brnf_sysctl_call_tables to allocate a temporary ctl_table
> >>>and integer on the stack and only set ctl->data after we have
> >>>normalized the written value. But since in practice nothing cares
> >>>about the race a better fix probably isn't worth it.
> >>
> >>
> >>I seem to be missing something, the entire brnf_sysctl_call_tables
> >>thing looks purely cosmetic to me, wouldn't it be better to simply
> >>remove it?
> >
> >
> > I agree, removing seems like a better option. But probably need to
> > go through a 3-6mo warning period, since sysctl's are technically
> > an API.
>
>
> I meant removing brnf_sysctl_call_tables function, not the sysctls
> themselves, all it does is change values != 0 to 1. Or did you
> actually mean that something in userspace might depend on reading
> back the value 1 after writing a value != 0?
I was going farther, because don't really see the value of having
a sysctl for this. It seems better to just not load filters if
they aren't going to be used. Having another enable/disable hook
just adds needless complexity.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Remove broken netfilter binary sysctls from bridging code
2007-09-25 16:12 ` Stephen Hemminger
@ 2007-09-25 16:22 ` Patrick McHardy
0 siblings, 0 replies; 11+ messages in thread
From: Patrick McHardy @ 2007-09-25 16:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: linux-kernel, Linux Netdev List
Stephen Hemminger wrote:
> On Tue, 25 Sep 2007 06:07:24 +0200
> Patrick McHardy <kaber@trash.net> wrote:
>
>
>> I meant removing brnf_sysctl_call_tables function, not the sysctls
>> themselves, all it does is change values != 0 to 1. Or did you
>> actually mean that something in userspace might depend on reading
>> back the value 1 after writing a value != 0?
>>
>
> I was going farther, because don't really see the value of having
> a sysctl for this. It seems better to just not load filters if
> they aren't going to be used. Having another enable/disable hook
> just adds needless complexity.
>
These sysctls control whether bridged packets will be handled
by iptables and friends. The bridge netfilter code always
handles bridged packets, and iptables might be loaded for
different reasons. So I don't see how that would work.
I think it should be specified in the ebtables ruleset, but
the current netfilter infrastructure doesn't allow to do that
cleanly.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-09-25 16:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070918011841.2381bd93.akpm@linux-foundation.org>
[not found] ` <20070918162039.GA1804@skynet.ie>
2007-09-18 16:41 ` 2.6.23-rc6-mm1: Build failure on ppc64 drivers/net/ehea/ehea_main.c Mel Gorman
[not found] ` <20070919235828.GA31759@nineveh.local>
[not found] ` <20070919170934.84f44e05.akpm@linux-foundation.org>
[not found] ` <f86d6cc00709200721h6e8f7cf8xa2264e9d1f88883b@mail.gmail.com>
[not found] ` <f86d6cc00709200912j37a3218boa882a044c0610779@mail.gmail.com>
2007-09-20 19:44 ` 2.6.23-rc6-mm1 Andrew Morton
[not found] ` <20070920132512.GF24105@skynet.ie>
[not found] ` <alpine.LFD.0.999.0709201903180.17093@enigma.security.iitk.ac.in>
2007-09-22 6:54 ` 2.6.23-rc6-mm1: Build failures on ppc64_defconfig Satyam Sharma
2007-09-24 11:12 ` Mel Gorman
2007-09-22 7:25 ` Satyam Sharma
2007-09-22 7:40 ` [PATCH -mm] pasemi_mac: Build fix after recent netdev stats changes Satyam Sharma
2007-09-22 7:54 ` [PATCH -mm] mv643xx_eth: Remove redundant multiple initialization Satyam Sharma
2007-09-22 7:55 ` [PATCH -mm] iseries_veth: Kill unused variable Satyam Sharma
[not found] ` <20070921020554.GE31759@nineveh.local>
[not found] ` <m1fy18k5ru.fsf@ebiederm.dsl.xmission.com>
[not found] ` <46F7EC0A.9030506@trash.net>
[not found] ` <20070924131458.0daa4562@freepuppy.rosehill>
2007-09-25 4:07 ` [PATCH] Remove broken netfilter binary sysctls from bridging code Patrick McHardy
2007-09-25 16:12 ` Stephen Hemminger
2007-09-25 16:22 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).