* Re: [PATCH 3/6] ibmveth: Add ethtool TSO handlers
From: Jeff Garzik @ 2007-08-31 13:14 UTC (permalink / raw)
To: Brian King; +Cc: santil, rcjenn, netdev, linuxppc-dev
In-Reply-To: <200708171416.l7HEGbwx003958@d01av02.pok.ibm.com>
Brian King wrote:
> Add handlers for get_tso and get_ufo to prevent errors being printed
> by ethtool.
>
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
>
> linux-2.6-bjking1/drivers/net/ibmveth.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff -puN drivers/net/ibmveth.c~ibmveth_ethtool_get_tso drivers/net/ibmveth.c
> --- linux-2.6/drivers/net/ibmveth.c~ibmveth_ethtool_get_tso 2007-08-08 10:46:28.000000000 -0500
> +++ linux-2.6-bjking1/drivers/net/ibmveth.c 2007-08-08 10:46:28.000000000 -0500
> @@ -767,6 +767,8 @@ static const struct ethtool_ops netdev_e
> .set_tx_csum = ibmveth_set_tx_csum,
> .get_rx_csum = ibmveth_get_rx_csum,
> .set_rx_csum = ibmveth_set_rx_csum,
> + .get_tso = ethtool_op_get_tso,
> + .get_ufo = ethtool_op_get_ufo,
This patch is fine, but I wonder if we shouldn't add some code to
net/core/ethtool.c along the lines of...
if (!netdev->ethtool_ops->get_tso)
ethtool_op_get_tso(args);
else
netdev->ethtool_ops->get_tso(args);
Because this certainly seems like desirable behavior across all devices.
^ permalink raw reply
* Re: [git patches] net driver fixes
From: Jeff Garzik @ 2007-08-31 13:10 UTC (permalink / raw)
To: Satyam Sharma; +Cc: Andrew Morton, Linus Torvalds, netdev, LKML, Petko Manolov
In-Reply-To: <alpine.LFD.0.999.0707310425360.17287@enigma.security.iitk.ac.in>
Satyam Sharma wrote:
>
> On Mon, 30 Jul 2007, Jeff Garzik wrote:
>
>> true, we should just remove the dev==NULL check
>
> Patch below:
>
> [PATCH] nmclan_cs: Remove bogus (dev==NULL) check in mace_interrupt()
>
> The (dev == NULL) check in drivers/net/pcmcia/nmclan_cs.c:mace_interrupt()
> handler is always false, so let's remove it.
>
> Signed-off-by: Satyam Sharma <satyam@infradead.org>
>
> ---
>
> drivers/net/pcmcia/nmclan_cs.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
ACK, but patch does not apply to netdev-2.6.git#upstream alas
^ permalink raw reply
* Re: [REVISED PATCH] 3c59x: check return of pci_enable_device()
From: Jeff Garzik @ 2007-08-31 13:08 UTC (permalink / raw)
To: Mark Hindley; +Cc: Steffen Klassert, akpm, netdev
In-Reply-To: <20070816102840.GG14245@hindley.org.uk>
Mark Hindley wrote:
> Revised patch for this.
>
> Mark
>
>
> commit 5cf33391eba81a49038fa8be8cbad8425b80bf7f
> Author: Mark Hindley <mark@hindley.org.uk>
> Date: Thu Aug 16 11:26:35 2007 +0100
>
> Check return of pci_enable_device in vortex_up().
>
> Also modify vortex_up to return error to callers. Handle failure of vortex_up in
> vortex_open and vortex_resume.
>
> Signed-off-by: Mark Hindley <mark@hindley.org.uk>
Steffen, did you ACK this? and/or going to resend it to me?
^ permalink raw reply
* Re: [PATCH 2.6.24 1/2]S2io: Change kmalloc+memset to k[zc]alloc
From: Jeff Garzik @ 2007-08-31 13:06 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223204.23940.343.camel@flash>
Ramkrishna Vepa wrote:
> - Changed kmalloc+memset to k[zc]alloc as per Mariusz's patch
> <m.kozlowski@tuxland.pl>
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
ACK patches 1-2, but dropped due to previous dropped patches (presumed
dependencies)
^ permalink raw reply
* Re: [PATCH 2.6.24 5/5]S2io: Optimize isr fast path
From: Jeff Garzik @ 2007-08-31 13:05 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223158.23940.339.camel@flash>
Ramkrishna Vepa wrote:
> - Optimized interrupt routine fast path.
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
patch description is completely inadequate. how was it optimized? what
are the gains / why is this patch worth having?
> diff -Nurp patch4/drivers/net/s2io.c patch5/drivers/net/s2io.c
> --- patch4/drivers/net/s2io.c 2007-08-15 08:42:14.000000000 -0700
> +++ patch5/drivers/net/s2io.c 2007-08-15 08:42:51.000000000 -0700
> @@ -84,7 +84,7 @@
> #include "s2io.h"
> #include "s2io-regs.h"
>
> -#define DRV_VERSION "2.0.26.1"
> +#define DRV_VERSION "2.0.26.2"
>
> /* S2io Driver name & version. */
> static char s2io_driver_name[] = "Neterion";
> @@ -4917,71 +4917,76 @@ static irqreturn_t s2io_isr(int irq, voi
> * 1. Rx of packet.
> * 2. Tx complete.
> * 3. Link down.
> - * 4. Error in any functional blocks of the NIC.
> */
> reason = readq(&bar0->general_int_status);
>
> - if (!reason) {
> - /* The interrupt was not raised by us. */
> + if (unlikely(reason == S2IO_MINUS_ONE) ) {
> + /* Nothing much can be done. Get out */
> atomic_dec(&sp->isr_cnt);
> - return IRQ_NONE;
> - }
> - else if (unlikely(reason == S2IO_MINUS_ONE) ) {
> - /* Disable device and get out */
> - atomic_dec(&sp->isr_cnt);
> - return IRQ_NONE;
> + return IRQ_HANDLED;
> }
>
> - if (napi) {
> - if (reason & GEN_INTR_RXTRAFFIC) {
> - if ( likely ( netif_rx_schedule_prep(dev)) ) {
> - __netif_rx_schedule(dev);
> - writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_mask);
> + if (reason & (GEN_INTR_RXTRAFFIC |
> + GEN_INTR_TXTRAFFIC | GEN_INTR_TXPIC))
> + {
> + writeq(S2IO_MINUS_ONE, &bar0->general_int_mask);
> +
> + if (config->napi) {
> + if (reason & GEN_INTR_RXTRAFFIC) {
> + if ( likely (netif_rx_schedule_prep(dev)) ) {
> + __netif_rx_schedule(dev);
> + writeq(S2IO_MINUS_ONE,
> + &bar0->rx_traffic_mask);
> + } else
> + writeq(S2IO_MINUS_ONE,
> + &bar0->rx_traffic_int);
> }
> - else
> + } else {
> + /*
> + * rx_traffic_int reg is an R1 register, writing all 1's
> + * will ensure that the actual interrupt causing bit
> + * get's cleared and hence a read can be avoided.
> + */
> + if (reason & GEN_INTR_RXTRAFFIC)
> writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int);
> +
> + for (i = 0; i < config->rx_ring_num; i++)
> + rx_intr_handler(&mac_control->rings[i]);
> }
> - } else {
> +
> /*
> - * Rx handler is called by default, without checking for the
> - * cause of interrupt.
> - * rx_traffic_int reg is an R1 register, writing all 1's
> + * tx_traffic_int reg is an R1 register, writing all 1's
> * will ensure that the actual interrupt causing bit get's
> * cleared and hence a read can be avoided.
> */
> - if (reason & GEN_INTR_RXTRAFFIC)
> - writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int);
> + if (reason & GEN_INTR_TXTRAFFIC)
> + writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int);
>
> - for (i = 0; i < config->rx_ring_num; i++) {
> - rx_intr_handler(&mac_control->rings[i]);
> - }
> - }
> + for (i = 0; i < config->tx_fifo_num; i++)
> + tx_intr_handler(&mac_control->fifos[i]);
>
> - /*
> - * tx_traffic_int reg is an R1 register, writing all 1's
> - * will ensure that the actual interrupt causing bit get's
> - * cleared and hence a read can be avoided.
> - */
> - if (reason & GEN_INTR_TXTRAFFIC)
> - writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int);
> + if (reason & GEN_INTR_TXPIC)
> + s2io_txpic_intr_handle(sp);
>
> - for (i = 0; i < config->tx_fifo_num; i++)
> - tx_intr_handler(&mac_control->fifos[i]);
> + /*
> + * Reallocate the buffers from the interrupt handler itself.
> + */
> + if (!config->napi) {
> + for (i = 0; i < config->rx_ring_num; i++)
> + s2io_chk_rx_buffers(sp, i);
> + }
> + writeq(sp->general_int_mask, &bar0->general_int_mask);
> + readl(&bar0->general_int_status);
>
> - if (reason & GEN_INTR_TXPIC)
> - s2io_txpic_intr_handle(sp);
> - /*
> - * If the Rx buffer count is below the panic threshold then
> - * reallocate the buffers from the interrupt handler itself,
> - * else schedule a tasklet to reallocate the buffers.
> - */
> - if (!napi) {
> - for (i = 0; i < config->rx_ring_num; i++)
> - s2io_chk_rx_buffers(sp, i);
> - }
> + atomic_dec(&sp->isr_cnt);
> + return IRQ_HANDLED;
>
> - writeq(0, &bar0->general_int_mask);
> - readl(&bar0->general_int_status);
> + }
> + else if (!reason) {
> + /* The interrupt was not raised by us */
> + atomic_dec(&sp->isr_cnt);
> + return IRQ_NONE;
> + }
>
> atomic_dec(&sp->isr_cnt);
> return IRQ_HANDLED;
> @@ -7109,6 +7114,14 @@ static void s2io_rem_isr(struct s2io_nic
> struct net_device *dev = sp->dev;
> struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
>
> + /* Waiting till all Interrupt handlers are complete */
> + do {
> + if (!atomic_read(&sp->isr_cnt))
> + break;
> + msleep(10);
> + cnt++;
> + } while(cnt < 5);
> +
> if (sp->config.intr_type == MSI_X) {
> int i;
> u16 msi_control;
> @@ -7138,14 +7151,6 @@ static void s2io_rem_isr(struct s2io_nic
> } else {
> free_irq(sp->pdev->irq, dev);
> }
> - /* Waiting till all Interrupt handlers are complete */
> - cnt = 0;
> - do {
> - msleep(10);
> - if (!atomic_read(&sp->isr_cnt))
> - break;
> - cnt++;
> - } while(cnt < 5);
> }
this is bogus code -- you should use synchronize_irq() and other
standard kernel functions, rather than duplicating all that state in the
driver-private structs
^ permalink raw reply
* Re: [PATCH 2.6.24 4/5]S2io: Check for CARD_DOWN before handling traffic
From: Jeff Garzik @ 2007-08-31 13:03 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223149.23940.337.camel@flash>
Ramkrishna Vepa wrote:
> - Added check to return from the traffic handling function, if the card status
> is DOWN.
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
> ---
> diff -Nurp patch3/drivers/net/s2io.c patch4/drivers/net/s2io.c
> --- patch3/drivers/net/s2io.c 2007-08-15 08:57:32.000000000 -0700
> +++ patch4/drivers/net/s2io.c 2007-08-15 08:42:14.000000000 -0700
> @@ -2927,6 +2927,11 @@ static int s2io_poll(struct net_device *
> int i;
>
> atomic_inc(&nic->isr_cnt);
> + if (unlikely(atomic_read(&nic->card_state) == CARD_DOWN)) {
> + atomic_dec(&nic->isr_cnt);
> + return IRQ_NONE;
> + }
> +
> mac_control = &nic->mac_control;
> config = &nic->config;
>
invalid return value, for this function
Overall, this looks quite racy -- why does the card state differ from
net_device state in the first place?
^ permalink raw reply
* Re: [PATCH 2.6.24 3/5]S2io: Cleanup - removed unused variable, intr_type
From: Jeff Garzik @ 2007-08-31 13:02 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223144.23940.335.camel@flash>
Ramkrishna Vepa wrote:
> - Removed the unused variable, intr_type, in device private structure.
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
ACK (but dropped, since previous patches were dropped)
^ permalink raw reply
* Re: [PATCH 2.6.24 2/5]S2io: Handle and monitor all of the device errors and alarms
From: Jeff Garzik @ 2007-08-31 13:02 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223139.23940.333.camel@flash>
Ramkrishna Vepa wrote:
> - Added support to poll entire set of device errors and alarams.
> - Replaced alarm_intr_handler() with s2io_handle_errors().
> - Added statistic counters to monitor the alarms.
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
In general I support as much error handling as is reasonable, but your
patch description gives us no clue what the benefits of your patch are
^ permalink raw reply
* Re: [PATCH 2.6.24 1/5]S2io: Enable all the error and alarm indications
From: Jeff Garzik @ 2007-08-31 13:01 UTC (permalink / raw)
To: ram.vepa; +Cc: netdev, support
In-Reply-To: <1187223130.23940.331.camel@flash>
Ramkrishna Vepa wrote:
> - Added support to unmask entire set of device errors and alarms.
>
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
> ---
> diff -Nurp orig/drivers/net/s2io.c patch1/drivers/net/s2io.c
> --- orig/drivers/net/s2io.c 2007-08-15 08:04:06.000000000 -0700
> +++ patch1/drivers/net/s2io.c 2007-08-15 08:55:53.000000000 -0700
> @@ -892,8 +892,9 @@ static void free_shared_mem(struct s2io_
> k++;
> }
> kfree(mac_control->rings[i].ba[j]);
> - nic->mac_control.stats_info->sw_stat.mem_freed += (sizeof(struct buffAdd) *
> - (rxd_count[nic->rxd_mode] + 1));
> + nic->mac_control.stats_info->sw_stat.mem_freed +=
> + (sizeof(struct buffAdd) *
> + (rxd_count[nic->rxd_mode] + 1));
> }
> kfree(mac_control->rings[i].ba);
> nic->mac_control.stats_info->sw_stat.mem_freed +=
> @@ -1732,6 +1733,365 @@ static int s2io_link_fault_indication(st
> return MAC_RMAC_ERR_TIMER;
> }
>
> +void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)
> +{
> + struct XENA_dev_config __iomem *bar0 = nic->bar0;
> + register u64 val64 = 0, temp64 = 0, gen_int_mask = 0;
> +
> + if (mask & TX_DMA_INTR) {
> + gen_int_mask |= TXDMA_INT_M;
> +
> + if (flag == ENABLE_INTRS) {
> +
> + val64 = TXDMA_TDA_INT|TXDMA_PFC_INT|TXDMA_PCC_INT
> + |TXDMA_TTI_INT|TXDMA_LSO_INT|TXDMA_TPA_INT
> + |TXDMA_SM_INT;
> + temp64 = readq(&bar0->txdma_int_mask);
> + temp64 &= ~((u64) val64);
> + writeq(temp64, &bar0->txdma_int_mask);
reduce the size of this huge functions by creating a helper function
whose use would look something like
writebits(TXDMA_TDA_INT|TXDMA_PFC_INT|TXDMA_PCC_INT|
TXDMA_TTI_INT|TXDMA_LSO_INT|TXDMA_TPA_INT|
TXDMA_SM_INT,
flag,
&bar0->txdma_int_mask);
That eliminates the wholesale duplication of code based on the
'flags==ENABLE_INTRS' test, and overall increases readability and
decreases code size
^ permalink raw reply
* Re: Tc bug (kernel crash) more info
From: Jarek Poplawski @ 2007-08-31 12:59 UTC (permalink / raw)
To: Badalian Vyacheslav; +Cc: netdev
In-Reply-To: <46D7F1FF.1000101@bigtelecom.ru>
On Fri, Aug 31, 2007 at 02:48:31PM +0400, Badalian Vyacheslav wrote:
...
> I can only see that say netconsole. If i look to monitor i look last
> lines. last line is "====...". Scrolling not work
> netconsole run as module and start after system do full load. Then
> netconsole is up - i run generator of tc scripts.
It would be interesting to know if this bug did ever happen without
netconsole, or, if it wasn't tested this way, if it's possible to
do such a test (not necessarily today)?
> >BTW, -git versions are usually more risky than -rc. And, maybe, let
> >this 2.6.18 better stay away from this testing...
> >
> I look changes between 2.6.23-rc4 and 2.6.23-rc4-git2 and think that
> paches look good and no do any critical things =)
>
> Now i do many script runs to simulate bug. if i get it on 2.6.23-rc4 - i
> post it here. 2.6.23-rc4 not have htb_timer function.
I'll not be able to assist you until monday (but I'll try to look
into the code and maybe to prepare some new patch - but it needs
a lot of checking to not add too much of this locking as well).
I think you can stay with a kernel whichever you like - I'm not sure
any config changes or even more debugging can change much, but maybe
I'm wrong. It looks to me like some locking is missing or interrupted.
If you are working weekends and find something new, don't wait: maybe
somebody else here could be interested too.
Cheers,
Jarek P.
^ permalink raw reply
* [PATCH 1/2]: [NET_SCHED]: Make all rate based scheduler work with TSO.
From: Jesper Dangaard Brouer @ 2007-08-31 12:22 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: David S. Miller, Patrick McHardy, Jesper Dangaard Brouer
commit 6fdc0f061be94f5e297650961360fb7a9d1cc85d
Author: Jesper Dangaard Brouer <hawk@comx.dk>
Date: Thu Aug 30 17:53:42 2007 +0200
[NET_SCHED]: Make all rate based scheduler work with TSO.
Change L2T (length to time) macros, in all rate based schedulers, to
call a common function qdisc_l2t() that does the rate table lookup.
This function handles if the packet size lookup is larger than the
rate table, which often occurs with TSO enabled.
Note: bstats.packets is only incremented correctly for HTB.
See: commit c9726d6890f7f3a892c879e067c3ed839f61e745.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 8a67f24..4ebd615 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -302,4 +302,16 @@ drop:
return NET_XMIT_DROP;
}
+/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how
+ long it will take to send a packet given its size.
+ */
+static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
+{
+ int slot = pktlen;
+ slot >>= rtab->rate.cell_log;
+ if (slot > 255)
+ return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]);
+ return rtab->data[slot];
+}
+
#endif
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 6085be5..8599e47 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -21,8 +21,8 @@
#include <net/act_api.h>
#include <net/netlink.h>
-#define L2T(p,L) ((p)->tcfp_R_tab->data[(L)>>(p)->tcfp_R_tab->rate.cell_log])
-#define L2T_P(p,L) ((p)->tcfp_P_tab->data[(L)>>(p)->tcfp_P_tab->rate.cell_log])
+#define L2T(p,L) ((p)->tcfp_R_tab, L)
+#define L2T_P(p,L) ((p)->tcfp_P_tab, L)
#define POL_TAB_MASK 15
static struct tcf_common *tcf_police_ht[POL_TAB_MASK + 1];
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index e38c283..aed2af2 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -175,7 +175,7 @@ struct cbq_sched_data
};
-#define L2T(cl,len) ((cl)->R_tab->data[(len)>>(cl)->R_tab->rate.cell_log])
+#define L2T(cl,len) qdisc_l2t((cl)->R_tab,len)
static __inline__ unsigned cbq_hash(u32 h)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 246a2f9..5e608a6 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -132,10 +132,8 @@ struct htb_class {
static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
int size)
{
- int slot = size >> rate->rate.cell_log;
- if (slot > 255)
- return (rate->data[255]*(slot >> 8) + rate->data[slot & 0xFF]);
- return rate->data[slot];
+ long result = qdisc_l2t(rate, size);
+ return result;
}
struct htb_sched {
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 8c2639a..b0d8109 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -115,8 +115,8 @@ struct tbf_sched_data
struct qdisc_watchdog watchdog; /* Watchdog timer */
};
-#define L2T(q,L) ((q)->R_tab->data[(L)>>(q)->R_tab->rate.cell_log])
-#define L2T_P(q,L) ((q)->P_tab->data[(L)>>(q)->P_tab->rate.cell_log])
+#define L2T(q,L) qdisc_l2t((q)->R_tab,L)
+#define L2T_P(q,L) qdisc_l2t((q)->P_tab,L)
static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
{
^ permalink raw reply related
* [PATCH 2/2]: [NET_SCHED]: Making rate table lookups more flexible.
From: Jesper Dangaard Brouer @ 2007-08-31 12:22 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: David S. Miller, Patrick McHardy, Jesper Dangaard Brouer
commit ac093f5c2f1160ece72a6fef5c779c1892fc3152
Author: Jesper Dangaard Brouer <hawk@comx.dk>
Date: Fri Aug 31 11:53:35 2007 +0200
[NET_SCHED]: Making rate table lookups more flexible. Extend the
tc_ratespec struct, with two parameters: 1) "cell_align" that allow
adjusting the alignment of the rate table. 2) "overhead" that allow
adding a packet overhead before the lookup.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 268c515..a127d63 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -78,7 +78,8 @@ struct tc_ratespec
unsigned char cell_log;
unsigned char __reserved;
unsigned short feature;
- short addend;
+ char cell_align;
+ unsigned char overhead;
unsigned short mpu;
__u32 rate;
};
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 4ebd615..a02ec9e 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -307,7 +307,9 @@ drop:
*/
static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
{
- int slot = pktlen;
+ int slot = pktlen + rtab->rate.cell_align + rtab->rate.overhead;
+ if (slot < 0)
+ slot = 0;
slot >>= rtab->rate.cell_log;
if (slot > 255)
return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]);
^ permalink raw reply related
* Re: [PATCH] pcnet32: add suspend and resume capability
From: Jeff Garzik @ 2007-08-31 12:52 UTC (permalink / raw)
To: Don Fry; +Cc: netdev
In-Reply-To: <1188188552.4748.11.camel@Linux.home>
Don Fry wrote:
> Add suspend and resume capability to the driver.
> Tested both to ram and to disk on x86_64 platform.
>
> Signed-off-by: Don Fry <pcnet32@verizon.net>
applied
^ permalink raw reply
* Re: [patch]support for USB autosuspend in the asix driver
From: Jeff Garzik @ 2007-08-31 12:50 UTC (permalink / raw)
To: Oliver Neukum; +Cc: netdev, David Brownell
In-Reply-To: <200708031352.19419.oneukum@suse.de>
Oliver Neukum wrote:
> Hi,
>
> this implements support for USB autosuspend in the asix USB ethernet
> driver.
>
> Regards
> Oliver
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
applied
please put comments like "Hi," and "Regards Oliver" below the "---"
terminator, otherwise they must be hand-edited out to avoid scripts'
pasting that into the permanent kernel history.
^ permalink raw reply
* Re: Re: pktgen terminating condition
From: Daniele Venzano @ 2007-08-31 12:17 UTC (permalink / raw)
To: Mandeep Baines, hadi
Cc: davem, rick.jones2, msb, netdev, grundler, robert.olsson, jeff,
nhorman
In-Reply-To: <535ddc6b0708290959j4b89579dk37c97f555f7cfcb9@mail.gmail.com>
----- Message d'origine -----
De: "Mandeep Baines" <mandeep.baines@gmail.com>
Date: Wed, 29 Aug 2007 09:59:42 -0700
Sujet: Re: pktgen terminating condition
>> Looks good to me given the desire. I would bounce it by whoever the
>> maintainer is - they may have some insights on the lazy tx prune habit.
>>
>
>+ nhorman@tuxdriver.com
>+ jeff@garzik.org
>
>I'll work on a NAPI patch.
Here I'm (the maintainer). Sorry for the delay replying.
I don't regard the TxOK solution as something usable for mainline, but it has its use for the users of pktgen.
NAPI is the way to go.
Thanks, bye.
--
Daniele Venzano
venza@brownhat.org
^ permalink raw reply
* [PATCH] Fix a lock problem in generic phy code
From: Hans-Jürgen Koch @ 2007-08-31 12:30 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, Jeff Garzik, afleming
Lock debugging finds a problem in phy.c and phy_device.c,
this patch fixes it. Tested on an AT91SAM9263-EK board,
kernel 2.6.23-rc4.
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
---
Index: linux-2.6.23-rc/drivers/net/phy/phy_device.c
===================================================================
--- linux-2.6.23-rc.orig/drivers/net/phy/phy_device.c 2007-08-31
14:07:47.000000000 +0200
+++ linux-2.6.23-rc/drivers/net/phy/phy_device.c 2007-08-31 14:08:22.000000000
+0200
@@ -644,7 +644,7 @@
if (!(phydrv->flags & PHY_HAS_INTERRUPT))
phydev->irq = PHY_POLL;
- spin_lock(&phydev->lock);
+ spin_lock_bh(&phydev->lock);
/* Start out supporting everything. Eventually,
* a controller will attach, and may modify one
@@ -658,7 +658,7 @@
if (phydev->drv->probe)
err = phydev->drv->probe(phydev);
- spin_unlock(&phydev->lock);
+ spin_unlock_bh(&phydev->lock);
return err;
Index: linux-2.6.23-rc/drivers/net/phy/phy.c
===================================================================
--- linux-2.6.23-rc.orig/drivers/net/phy/phy.c 2007-08-31 14:15:20.000000000
+0200
+++ linux-2.6.23-rc/drivers/net/phy/phy.c 2007-08-31 14:15:43.000000000 +0200
@@ -755,7 +755,7 @@
*/
void phy_start(struct phy_device *phydev)
{
- spin_lock(&phydev->lock);
+ spin_lock_bh(&phydev->lock);
switch (phydev->state) {
case PHY_STARTING:
@@ -769,7 +769,7 @@
default:
break;
}
- spin_unlock(&phydev->lock);
+ spin_unlock_bh(&phydev->lock);
}
EXPORT_SYMBOL(phy_stop);
EXPORT_SYMBOL(phy_start);
^ permalink raw reply
* Re: Tc bug (kernel crash) more info
From: Badalian Vyacheslav @ 2007-08-31 12:14 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: netdev
In-Reply-To: <20070831112815.GB3108@ff.dom.local>
Jarek Poplawski пишет:
> On Fri, Aug 31, 2007 at 02:59:55PM +0400, Badalian Vyacheslav wrote:
>
>> May be this bug eq "[PATCH] [NET_SCHED] sch_prio.c: remove duplicate
>> call of tc_classify()"?
>>
>>
>>> I get kernel panic on 2.6.23-rc4-git2
>>> This is netconsole log!
>>>
>> ...
>>
>>
>
> So, it looks like you have found a really new (unknown) HTB bug,
> congratulations! We've only to find where is it hidden now...
>
> I don't think tc_classify could do such a harm to HTB, and can't
> see similar double calling as in sch_prio.
>
> Jarek P.
>
>
Great! +)
I ready for patching and testing anything patches to find and fix problem =)
Also i remember that bug up only if i delete HTB class and mashine have
lot of traffic.
I get statistic for last panic:
Script try to delete 25278 classes, Creating 8360 classes. Adding 6732
filters
Panic after 27 restarts of script.
^ permalink raw reply
* Re: [PATCH 3/3] netxen: ethtool fixes
From: Dhananjay Phadke @ 2007-08-31 12:12 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, rob
In-Reply-To: <46D7F29F.4030408@garzik.org>
oops, ok regenerating patch 3 only.
On Fri, 31 Aug 2007, Jeff Garzik wrote:
> dhananjay@netxen.com wrote:
> > +static int netxen_nic_set_rx_csum(struct net_device *dev, u32 data)
> > +{
> > + struct netxen_adapter *adapter = netdev_priv(dev);
> > + adapter->rx_csum = 0;
> > + return 0;
> > +}
>
> Bug: 'data' ignored
>
>
>
^ permalink raw reply
* [NETLINK]: Avoid pointer in netlink_run_queue
From: Herbert Xu @ 2007-08-31 12:09 UTC (permalink / raw)
To: David S. Miller, Thomas Graf, netdev
Hi Dave:
[NETLINK]: Avoid pointer in netlink_run_queue
I was looking at Patrick's fix to inet_diag and it occured
to me that we're using a pointer argument to return values
unnecessarily in netlink_run_queue. Changing it to return
the value will allow the compiler to generate better code
since the value won't have to be memory-backed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/include/net/netlink.h b/include/net/netlink.h
index d7b824b..48071fa 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -220,7 +220,7 @@ struct nl_info {
u32 pid;
};
-extern void netlink_run_queue(struct sock *sk, unsigned int *qlen,
+extern unsigned int netlink_run_queue(struct sock *sk, unsigned int qlen,
int (*cb)(struct sk_buff *,
struct nlmsghdr *));
extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb,
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 4756d58..15d13d9 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1261,7 +1261,7 @@ static void rtnetlink_rcv(struct sock *sk, int len)
do {
mutex_lock(&rtnl_mutex);
- netlink_run_queue(sk, &qlen, &rtnetlink_rcv_msg);
+ qlen = netlink_run_queue(sk, qlen, &rtnetlink_rcv_msg);
mutex_unlock(&rtnl_mutex);
netdev_run_todo();
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index dbeacd8..9cbc45e 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -841,7 +841,7 @@ static void inet_diag_rcv(struct sock *sk, int len)
unsigned int qlen = 0;
do {
- netlink_run_queue(sk, &qlen, &inet_diag_rcv_msg);
+ qlen = netlink_run_queue(sk, qlen, &inet_diag_rcv_msg);
} while (qlen);
}
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 8797e69..25cb779 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -248,7 +248,7 @@ static void nfnetlink_rcv(struct sock *sk, int len)
do {
if (nfnl_trylock())
return;
- netlink_run_queue(sk, &qlen, nfnetlink_rcv_msg);
+ qlen = netlink_run_queue(sk, qlen, nfnetlink_rcv_msg);
__nfnl_unlock();
} while (qlen);
}
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 5681ce3..a9d1557 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1609,7 +1609,7 @@ skip:
/**
* nelink_run_queue - Process netlink receive queue.
* @sk: Netlink socket containing the queue
- * @qlen: Place to store queue length upon entry
+ * @qlen: Initial queue length
* @cb: Callback function invoked for each netlink message found
*
* Processes as much as there was in the queue upon entry and invokes
@@ -1619,35 +1619,37 @@ skip:
* returns with a qlen != 0.
*
* qlen must be initialized to 0 before the initial entry, afterwards
- * the function may be called repeatedly until qlen reaches 0.
+ * the function may be called repeatedly until the returned qlen is 0.
*
* The callback function may return -EINTR to signal that processing
* of netlink messages shall be interrupted. In this case the message
* currently being processed will NOT be requeued onto the receive
* queue.
*/
-void netlink_run_queue(struct sock *sk, unsigned int *qlen,
- int (*cb)(struct sk_buff *, struct nlmsghdr *))
+unsigned int netlink_run_queue(struct sock *sk, unsigned int qlen,
+ int (*cb)(struct sk_buff *, struct nlmsghdr *))
{
struct sk_buff *skb;
- if (!*qlen || *qlen > skb_queue_len(&sk->sk_receive_queue))
- *qlen = skb_queue_len(&sk->sk_receive_queue);
+ if (!qlen || qlen > skb_queue_len(&sk->sk_receive_queue))
+ qlen = skb_queue_len(&sk->sk_receive_queue);
- for (; *qlen; (*qlen)--) {
+ for (; qlen; qlen--) {
skb = skb_dequeue(&sk->sk_receive_queue);
if (netlink_rcv_skb(skb, cb)) {
if (skb->len)
skb_queue_head(&sk->sk_receive_queue, skb);
else {
kfree_skb(skb);
- (*qlen)--;
+ qlen--;
}
break;
}
kfree_skb(skb);
}
+
+ return qlen;
}
/**
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 8c11ca4..d70d10d 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -485,7 +485,7 @@ static void genl_rcv(struct sock *sk, int len)
do {
if (genl_trylock())
return;
- netlink_run_queue(sk, &qlen, genl_rcv_msg);
+ qlen = netlink_run_queue(sk, qlen, genl_rcv_msg);
genl_unlock();
} while (qlen && genl_sock && genl_sock->sk_receive_queue.qlen);
}
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 61339e1..6377cc0 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2033,7 +2033,7 @@ static void xfrm_netlink_rcv(struct sock *sk, int len)
do {
mutex_lock(&xfrm_cfg_mutex);
- netlink_run_queue(sk, &qlen, &xfrm_user_rcv_msg);
+ qlen = netlink_run_queue(sk, qlen, &xfrm_user_rcv_msg);
mutex_unlock(&xfrm_cfg_mutex);
} while (qlen);
^ permalink raw reply related
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
From: Dan Williams @ 2007-08-31 11:58 UTC (permalink / raw)
To: John W. Linville
Cc: Nick Kossifidis, Christoph Hellwig, Jiri Slaby,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20070830123609.GA5140-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
On Thu, 2007-08-30 at 08:36 -0400, John W. Linville wrote:
> On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> > 2007/8/28, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>:
>
> > > Also this whole patch seems rather pointless. It saves only
> > > very little and turns the driver into a complete ifdef maze.
>
> > Also most
> > people will use 5212 code only, 5211 cards are on some old laptops and
> > 5210, well i couldn't even find a 5210 for actual testing :P
>
> FWIW, I'd bet dollars to donuts that distros will enable them all
> together.
I would certainly _hope_ that distros enable everything -that is in the
kernel- that they can get their hands on, otherwise when you stick a
card in, it doesn't just work.
Dan
> Is saving code space the only reason to turn these off? How much
> space do you save?
>
> Is there some way you can isolate and/or limit the number of ifdef
> blocks further? If so, we might consider a version of this patch
> that depends on EMBEDDED or somesuch...?
>
> John
^ permalink raw reply
* Re: [PATCH 1/2] PS3: improve tx throughput for gelic driver
From: Masakazu Mokuno @ 2007-08-31 11:52 UTC (permalink / raw)
To: Jeff Garzik
Cc: Linas Vepstas, netdev, cbe-oss-dev, geoffrey.levand,
Geert Uytterhoeven
In-Reply-To: <46D7F3FF.5080503@garzik.org>
On Fri, 31 Aug 2007 06:57:03 -0400
Jeff Garzik <jeff@garzik.org> wrote:
> Masakazu Mokuno wrote:
> > Improve tx throughputs.
> > netperf score gained approximately 20%
>
> This is a useless patch description. It does not adequately summarize
> the changes contained within the patch.
>
> Please resubmit patch with a useful patch description
OK, I'll rewrite and resubmit.
--
Masakazu MOKUNO
^ permalink raw reply
* Re: [ANNOUNCE] iproute2-2.6.23-rc3
From: Pavel Emelyanov @ 2007-08-31 11:42 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Stephen Hemminger, netdev
In-Reply-To: <Pine.LNX.4.64.0708311144470.8423@x2>
Patrick McHardy wrote:
> On Fri, 31 Aug 2007, Pavel Emelyanov wrote:
>
>> Patrick McHardy wrote:
>>> On Wed, 22 Aug 2007, Stephen Hemminger wrote:
>>>
>>>> There have been a lot of changes for 2.6.23, so here is a test release
>>>> of iproute2 that should capture all the submitted patches
>>>>
>>>> Pavel Emelianov (1):
>>>> Make ip utility veth driver aware
>>>
>>> Why does this add a new ip subcommand instead and uses genetlink
>>> instead of the rtnl_link API, which was introduced exactly for
>>> this stuff?
>>>
>> Hm... It does not, it just adds a parser for veth commands that
>> generic layer isn't aware of.
>
>
> It does, you have "ip veth add", "ip veth del", ...
>
> Didn't you already sent a patch that used "ip link add ..."?
The patch I sent last used "ip link add" and "ip link del".
The link_veth.c file only parses all the extra arguments.
> In any case this should be replaced by proper use of the rtnl_link
> stuff.
>
^ permalink raw reply
* Re: [PATCH 2.6.23 1/2] cxgb3 - Fix dev->priv usage
From: Jeff Garzik @ 2007-08-31 11:41 UTC (permalink / raw)
To: Divy Le Ray; +Cc: rdreier, netdev, linux-kernel, swise
In-Reply-To: <20070830021547.21475.62560.stgit@speedy5>
Divy Le Ray wrote:
> From: Divy Le Ray <divy@chelsio.com>
>
> cxgb3 used netdev_priv() and dev->priv for different purposes.
> In 2.6.23, netdev_priv() == dev->priv, cxgb3 needs a fix.
> This patch is a partial backport of Dave Miller's changes in the
> net-2.6.24 git branch.
>
> Without this fix, cxgb3 crashes on 2.6.23.
>
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
> ---
>
> drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 -
> drivers/net/cxgb3/adapter.h | 2 +
> drivers/net/cxgb3/cxgb3_main.c | 126 ++++++++++++++++++--------------
> drivers/net/cxgb3/cxgb3_offload.c | 16 +++-
> drivers/net/cxgb3/cxgb3_offload.h | 2 +
> drivers/net/cxgb3/sge.c | 23 ++++--
> drivers/net/cxgb3/t3cdev.h | 3 -
> 7 files changed, 105 insertions(+), 69 deletions(-)
applied 1-2
^ permalink raw reply
* Re: Tc bug (kernel crash) more info
From: Jarek Poplawski @ 2007-08-31 11:28 UTC (permalink / raw)
To: Badalian Vyacheslav; +Cc: netdev
In-Reply-To: <46D7F4AB.10009@bigtelecom.ru>
On Fri, Aug 31, 2007 at 02:59:55PM +0400, Badalian Vyacheslav wrote:
> May be this bug eq "[PATCH] [NET_SCHED] sch_prio.c: remove duplicate
> call of tc_classify()"?
>
> >I get kernel panic on 2.6.23-rc4-git2
> >This is netconsole log!
> ...
>
So, it looks like you have found a really new (unknown) HTB bug,
congratulations! We've only to find where is it hidden now...
I don't think tc_classify could do such a harm to HTB, and can't
see similar double calling as in sch_prio.
Jarek P.
^ permalink raw reply
* Re: [patch 0/1][RFC] add a private field to the sock structure
From: Arnaldo Carvalho de Melo @ 2007-08-31 11:26 UTC (permalink / raw)
To: David Miller; +Cc: dlezcano, netdev, ralf
In-Reply-To: <20070830.224049.35665219.davem@davemloft.net>
Em Thu, Aug 30, 2007 at 10:40:49PM -0700, David Miller escreveu:
> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Date: Wed, 29 Aug 2007 16:18:31 -0300
>
> > Nah, it still there, sk_protinfo, its just ax25 that uses it
> > (nudge(Ralf)). How do we state that a struct field is deprecated and
> > will be removed soon(tm)?
>
> You get rid of all the in-tree users and then just kill it :)
>
> More seriously, I don't think we need a deprecation schedule
> for a struct member, either it's not used in-tree anymore or
> it isn't. We'll go crazy with any other policy and it's
> difficult enough shrinking these things :-)
OK, I think its enough to say to dlezcano that he should avoid using
sk_protinfo, as soon as we do the work on AX.25 sk_protinfo will be
removed.
- Arnaldo
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox