* Re: [RFC PATCH 1/9] ipvs network name space aware
From: Hans Schillstrom @ 2010-10-18 13:23 UTC (permalink / raw)
To: Daniel Lezcano
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
wensong@linux-vs.org
In-Reply-To: <4CBC3182.80605@free.fr>
On Monday 18 October 2010 13:37:38 Daniel Lezcano wrote:
> On 10/18/2010 11:54 AM, Hans Schillstrom wrote:
> > On Monday 18 October 2010 10:59:25 Daniel Lezcano wrote:
> >
> >> On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
> >>
> >>> This part contains the include files
> >>> where include/net/netns/ip_vs.h is new and contains all moved vars.
> >>>
> >>> SUMMARY
> >>>
> >>> include/net/ip_vs.h | 136 ++++---
> >>> include/net/net_namespace.h | 2 +
> >>> include/net/netns/ip_vs.h | 112 +++++
> >>>
> >>> Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
> >>> ---
> >>>
> >>>
> >>>
> >> [ ... ]
> >>
> >>
> >>> #ifdef CONFIG_IP_VS_IPV6
> >>> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> >>> index bd10a79..b59cdc5 100644
> >>> --- a/include/net/net_namespace.h
> >>> +++ b/include/net/net_namespace.h
> >>> @@ -15,6 +15,7 @@
> >>> #include<net/netns/ipv4.h>
> >>> #include<net/netns/ipv6.h>
> >>> #include<net/netns/dccp.h>
> >>> +#include<net/netns/ip_vs.h>
> >>> #include<net/netns/x_tables.h>
> >>> #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
> >>> #include<net/netns/conntrack.h>
> >>> @@ -91,6 +92,7 @@ struct net {
> >>> struct sk_buff_head wext_nlevents;
> >>> #endif
> >>> struct net_generic *gen;
> >>> + struct netns_ipvs *ipvs;
> >>> };
> >>>
> >>>
> >> IMHO, it would be better to use the net_generic infra-structure instead
> >> of adding a new field in the netns structure.
> >>
> >>
> >>
> > I realized that to, but the performance penalty is quite high with net_generic :-(
> > But on the other hand if you are going to backport it, (without recompiling the kernel)
> > you gonna need it!
> >
>
> Hmm, yes. We don't want to have the init_net_ns performances to be impacted.
>
> You use here a pointer which will be dereferenced like the net_generic,
> I don't think there will be
> a big difference between using net_generic and using a pointer in the
> net namespace structure.
>
> The difference is the id usage, but this one is based on the idr which
> is quite fast.
>
I'm not so sure about that, have a look at net_generic and rcu_read_lock
and compare
ipvs = net->ipvs;
vs.
ipvs = net_generic(net, id)
static inline void *net_generic(struct net *net, int id)
{
struct net_generic *ng;
void *ptr;
rcu_read_lock();
ng = rcu_dereference(net->gen);
BUG_ON(id == 0 || id > ng->len);
ptr = ng->ptr[id - 1];
rcu_read_unlock();
return ptr;
}
...
static inline void rcu_read_lock(void)
{
__rcu_read_lock();
__acquire(RCU);
rcu_read_acquire();
}
Another way of doing it is to pass the ipvs ptr instead of the net ptr,
and add *net to the ipvs struct.
> We should experiment a bit here to compare both solutions.
Agre
>
I single stepped through the rcu_read_lock() on a x86_64
and it's quite many "stepi" that you need to enter :-(
> IMHO, we can (1) create a non-pointer netns_ipvs field in the net
> namespace structure or (2) use a pointer [with net_generic].
>
> (1) is the faster but with the drawback of having a bigger memory
> footprint even if the ipvs module is not loaded.
> In this case we have to take care of what we store in the netns_ipvs
> structure, that is reduce the per namespace table and so. At the first
> glance, I think we can reduce this to the sysctls and a very few data,
> for example using global tables tagged with the namespace and we don't
> break the cacheline alignment optimization.
>
> (2) is slower but as the memory is allocated and freed when the module
> is loaded/unloaded. What I don't like with this approach is we add some
> overhead even if the netns is not compiled in the kernel.
>
or (3)
Like (1) with data that needs to be cache aligned in "struct net"
and the rest in an ipvs struct.
Global hash tables or not ?
> > My sugestion, take both with a configuration switch like:
> > (i.e. avoid the rcu locking)
> >
> > --- net/ip_vs.h ---
> > ...
> > extern int ip_vs_net_id; /* net id for ip_vs */
> >
> >
> > static inline struct netns_ipvs * net_ipvs(struct net* net, int id) {
> > #ifdef CONFIG_IP_VS_FAST_NETNS
> > return net->ipvs;
> > #else
> > return (struct netns_ipvs *)net_generic(net, id);
> > #endif
> > }
> > ...
> >
> > and where you need the netns_ipvs struct ptr,
> > [snip]
> > struct ip_vs_conn *ip_vs_conn_in_get(struct net *net, ....
> > {
> > struct netns_ipvs *ipvs = net_ipvs(net, ip_vs_net_id);
> > ...
> >
>
> It is a nice way to wrap both solutions but at this point I don't think
> it is worth to add a 3rd option to compile ipvs.
>
>
--
Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>
^ permalink raw reply
* [PATCH V3 0/8] can: mcp251x: fix and optimize driver
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
Moin,
this series of patches improves the mcp251x driver. It first fixes the
local_softirq_pending problem. Then the amount of SPI transfers is reduced
in order to optimise the driver. A further patch cleans up the chip model
selection.
This series has been tested with a mcp2515 on i.MX35.
Please review, test and consider to apply.
regards, Marc
--
The following changes since commit 724829b3ad8e8aeb0aec46de383d35bfa1ad3875:
David S. Miller (1):
tipc: Kill tipc_get_mode() completely.
are available in the git repository at:
git://git.pengutronix.de/git/mkl/linux-2.6.git can/mcp251x-for-net-next
Marc Kleine-Budde (5):
can: mcp251x: fix NOHZ local_softirq_pending 08 warning
can: mcp251x: write intf only when needed
can: mcp251x: Don't use pdata->model for chip selection anymore
can: mcp251x: define helper functions mcp251x_is_2510, mcp251x_is_2515
can: mcp251x: optimize 2515, rx int gets cleared automatically
Sascha Hauer (3):
can: mcp251x: increase rx_errors on overflow, not only rx_over_errors
can: mcp251x: allow to read two registers in one spi transfer
can: mcp251x: read-modify-write eflag only when needed
drivers/net/can/mcp251x.c | 95 +++++++++++++++++++++++++---------
include/linux/can/platform/mcp251x.h | 4 --
2 files changed, 70 insertions(+), 29 deletions(-)
^ permalink raw reply
* [PATCH 1/8] can: mcp251x: fix NOHZ local_softirq_pending 08 warning
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
This patch replaces netif_rx() with netif_rx_ni() which has to be used
from the threaded interrupt i.e. process context context.
Thanks to Christian Pellegrin for pointing at the right fix:
481a8199142c050b72bff8a1956a49fd0a75bbe0 by Oliver Hartkopp.
Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
---
drivers/net/can/mcp251x.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index b11a0cb..c06e023 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -451,7 +451,7 @@ static void mcp251x_hw_rx(struct spi_device *spi, int buf_idx)
priv->net->stats.rx_packets++;
priv->net->stats.rx_bytes += frame->can_dlc;
- netif_rx(skb);
+ netif_rx_ni(skb);
}
static void mcp251x_hw_sleep(struct spi_device *spi)
@@ -676,7 +676,7 @@ static void mcp251x_error_skb(struct net_device *net, int can_id, int data1)
if (skb) {
frame->can_id = can_id;
frame->data[1] = data1;
- netif_rx(skb);
+ netif_rx_ni(skb);
} else {
dev_err(&net->dev,
"cannot allocate error skb\n");
--
1.7.0.4
^ permalink raw reply related
* [PATCH 2/8] can: mcp251x: increase rx_errors on overflow, not only rx_over_errors
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
---
drivers/net/can/mcp251x.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index c06e023..fdea752 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -816,10 +816,14 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
if (intf & CANINTF_ERRIF) {
/* Handle overflow counters */
if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR)) {
- if (eflag & EFLG_RX0OVR)
+ if (eflag & EFLG_RX0OVR) {
net->stats.rx_over_errors++;
- if (eflag & EFLG_RX1OVR)
+ net->stats.rx_errors++;
+ }
+ if (eflag & EFLG_RX1OVR) {
net->stats.rx_over_errors++;
+ net->stats.rx_errors++;
+ }
can_id |= CAN_ERR_CRTL;
data1 |= CAN_ERR_CRTL_RX_OVERFLOW;
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH 3/8] can: mcp251x: allow to read two registers in one spi transfer
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Marc Kleine-Budde,
Uwe Kleine-König
In-Reply-To: <1287408674-15412-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Sascha Hauer <s.hauer@pengutronix.de>
This patch bases on work done earlier by David Jander.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: David Jander <david@protonic.nl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/mcp251x.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index fdea752..9b3466a 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -319,6 +319,20 @@ static u8 mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
return val;
}
+static void mcp251x_read_2regs(struct spi_device *spi, uint8_t reg,
+ uint8_t *v1, uint8_t *v2)
+{
+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+
+ priv->spi_tx_buf[0] = INSTRUCTION_READ;
+ priv->spi_tx_buf[1] = reg;
+
+ mcp251x_spi_trans(spi, 4);
+
+ *v1 = priv->spi_rx_buf[2];
+ *v2 = priv->spi_rx_buf[3];
+}
+
static void mcp251x_write_reg(struct spi_device *spi, u8 reg, uint8_t val)
{
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
@@ -754,10 +768,11 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
mutex_lock(&priv->mcp_lock);
while (!priv->force_quit) {
enum can_state new_state;
- u8 intf = mcp251x_read_reg(spi, CANINTF);
- u8 eflag;
+ u8 intf, eflag;
int can_id = 0, data1 = 0;
+ mcp251x_read_2regs(spi, CANINTF, &intf, &eflag);
+
if (intf & CANINTF_RX0IF) {
mcp251x_hw_rx(spi, 0);
/* Free one buffer ASAP */
@@ -770,7 +785,6 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
mcp251x_write_bits(spi, CANINTF, intf, 0x00);
- eflag = mcp251x_read_reg(spi, EFLG);
mcp251x_write_reg(spi, EFLG, 0x00);
/* Update can state */
--
1.7.0.4
_______________________________________________
Socketcan-core mailing list
Socketcan-core@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/socketcan-core
^ permalink raw reply related
* [PATCH 4/8] can: mcp251x: read-modify-write eflag only when needed
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Use read-modify-write instead of a simple write to change the register
contents, to close existing the race window between the original manual
read and write.
Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
---
drivers/net/can/mcp251x.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 9b3466a..7e2f951 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -785,7 +785,8 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
mcp251x_write_bits(spi, CANINTF, intf, 0x00);
- mcp251x_write_reg(spi, EFLG, 0x00);
+ if (eflag)
+ mcp251x_write_bits(spi, EFLG, eflag, 0x00);
/* Update can state */
if (eflag & EFLG_TXBO) {
--
1.7.0.4
^ permalink raw reply related
* [PATCH 5/8] can: mcp251x: write intf only when needed
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core; +Cc: netdev, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl@pengutronix.de>
This patch introduces a variable "clear_intf" that hold the bits that
should be cleared. Only read-modify-write register if "clear_intf"
is set.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/mcp251x.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 7e2f951..f5e2edd 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -125,6 +125,8 @@
# define CANINTF_TX0IF 0x04
# define CANINTF_RX1IF 0x02
# define CANINTF_RX0IF 0x01
+# define CANINTF_ERR_TX \
+ (CANINTF_ERRIF | CANINTF_TX2IF | CANINTF_TX1IF | CANINTF_TX0IF)
#define EFLG 0x2d
# define EFLG_EWARN 0x01
# define EFLG_RXWAR 0x02
@@ -769,10 +771,12 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
while (!priv->force_quit) {
enum can_state new_state;
u8 intf, eflag;
+ u8 clear_intf = 0;
int can_id = 0, data1 = 0;
mcp251x_read_2regs(spi, CANINTF, &intf, &eflag);
+ /* receive buffer 0 */
if (intf & CANINTF_RX0IF) {
mcp251x_hw_rx(spi, 0);
/* Free one buffer ASAP */
@@ -780,10 +784,17 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
0x00);
}
- if (intf & CANINTF_RX1IF)
+ /* receive buffer 1 */
+ if (intf & CANINTF_RX1IF) {
mcp251x_hw_rx(spi, 1);
+ clear_intf |= CANINTF_RX1IF;
+ }
- mcp251x_write_bits(spi, CANINTF, intf, 0x00);
+ /* any error or tx interrupt we need to clear? */
+ if (intf & CANINTF_ERR_TX)
+ clear_intf |= intf & CANINTF_ERR_TX;
+ if (clear_intf)
+ mcp251x_write_bits(spi, CANINTF, clear_intf, 0x00);
if (eflag)
mcp251x_write_bits(spi, EFLG, eflag, 0x00);
--
1.7.0.4
^ permalink raw reply related
* [PATCH 6/8] can: mcp251x: Don't use pdata->model for chip selection anymore
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core
Cc: netdev, Marc Kleine-Budde, Christian Pellegrin, Marc Zyngier
In-Reply-To: <1287408674-15412-1-git-send-email-mkl@pengutronix.de>
Since commit e446630c960946b5c1762e4eadb618becef599e7, i.e. v2.6.35-rc1,
the mcp251x chip model can be selected via the modalias member in the
struct spi_board_info. The driver stores the actual model in the
struct mcp251x_platform_data.
>From the driver point of view the platform_data should be read only.
Since all in-tree users of the mcp251x have already been converted to
the modalias method, this patch moves the "model" member from the
struct mcp251x_platform_data to the driver's private data structure.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Christian Pellegrin <chripell@fsfe.org>
Cc: Marc Zyngier <maz@misterjones.org>
---
drivers/net/can/mcp251x.c | 24 ++++++++++++------------
include/linux/can/platform/mcp251x.h | 4 ----
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index f5e2edd..0386bed 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -38,14 +38,14 @@
* static struct mcp251x_platform_data mcp251x_info = {
* .oscillator_frequency = 8000000,
* .board_specific_setup = &mcp251x_setup,
- * .model = CAN_MCP251X_MCP2510,
* .power_enable = mcp251x_power_enable,
* .transceiver_enable = NULL,
* };
*
* static struct spi_board_info spi_board_info[] = {
* {
- * .modalias = "mcp251x",
+ * .modalias = "mcp2510",
+ * // or "mcp2515" depending on your controller
* .platform_data = &mcp251x_info,
* .irq = IRQ_EINT13,
* .max_speed_hz = 2*1000*1000,
@@ -224,10 +224,16 @@ static struct can_bittiming_const mcp251x_bittiming_const = {
.brp_inc = 1,
};
+enum mcp251x_model {
+ CAN_MCP251X_MCP2510 = 0x2510,
+ CAN_MCP251X_MCP2515 = 0x2515,
+};
+
struct mcp251x_priv {
struct can_priv can;
struct net_device *net;
struct spi_device *spi;
+ enum mcp251x_model model;
struct mutex mcp_lock; /* SPI device lock */
@@ -362,10 +368,9 @@ static void mcp251x_write_bits(struct spi_device *spi, u8 reg,
static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,
int len, int tx_buf_idx)
{
- struct mcp251x_platform_data *pdata = spi->dev.platform_data;
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
- if (pdata->model == CAN_MCP251X_MCP2510) {
+ if (priv->model == CAN_MCP251X_MCP2510) {
int i;
for (i = 1; i < TXBDAT_OFF + len; i++)
@@ -408,9 +413,8 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
int buf_idx)
{
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
- struct mcp251x_platform_data *pdata = spi->dev.platform_data;
- if (pdata->model == CAN_MCP251X_MCP2510) {
+ if (priv->model == CAN_MCP251X_MCP2510) {
int i, len;
for (i = 1; i < RXBDAT_OFF; i++)
@@ -951,16 +955,12 @@ static int __devinit mcp251x_can_probe(struct spi_device *spi)
struct net_device *net;
struct mcp251x_priv *priv;
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
- int model = spi_get_device_id(spi)->driver_data;
int ret = -ENODEV;
if (!pdata)
/* Platform data is required for osc freq */
goto error_out;
- if (model)
- pdata->model = model;
-
/* Allocate can/net device */
net = alloc_candev(sizeof(struct mcp251x_priv), TX_ECHO_SKB_MAX);
if (!net) {
@@ -977,6 +977,7 @@ static int __devinit mcp251x_can_probe(struct spi_device *spi)
priv->can.clock.freq = pdata->oscillator_frequency / 2;
priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_LISTENONLY;
+ priv->model = spi_get_device_id(spi)->driver_data;
priv->net = net;
dev_set_drvdata(&spi->dev, priv);
@@ -1150,8 +1151,7 @@ static int mcp251x_can_resume(struct spi_device *spi)
#define mcp251x_can_resume NULL
#endif
-static struct spi_device_id mcp251x_id_table[] = {
- { "mcp251x", 0 /* Use pdata.model */ },
+static const struct spi_device_id mcp251x_id_table[] = {
{ "mcp2510", CAN_MCP251X_MCP2510 },
{ "mcp2515", CAN_MCP251X_MCP2515 },
{ },
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h
index dba2826..8e20540 100644
--- a/include/linux/can/platform/mcp251x.h
+++ b/include/linux/can/platform/mcp251x.h
@@ -12,7 +12,6 @@
/**
* struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
* @oscillator_frequency: - oscillator frequency in Hz
- * @model: - actual type of chip
* @board_specific_setup: - called before probing the chip (power,reset)
* @transceiver_enable: - called to power on/off the transceiver
* @power_enable: - called to power on/off the mcp *and* the
@@ -25,9 +24,6 @@
struct mcp251x_platform_data {
unsigned long oscillator_frequency;
- int model;
-#define CAN_MCP251X_MCP2510 0x2510
-#define CAN_MCP251X_MCP2515 0x2515
int (*board_specific_setup)(struct spi_device *spi);
int (*transceiver_enable)(int enable);
int (*power_enable) (int enable);
--
1.7.0.4
^ permalink raw reply related
* [PATCH 7/8] can: mcp251x: define helper functions mcp251x_is_2510, mcp251x_is_2515
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core; +Cc: netdev, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/mcp251x.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 0386bed..7f8aa4c 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -258,6 +258,16 @@ struct mcp251x_priv {
int restart_tx;
};
+#define MCP251X_IS(_model) \
+static inline int mcp251x_is_##_model(struct spi_device *spi) \
+{ \
+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev); \
+ return priv->model == CAN_MCP251X_MCP##_model; \
+}
+
+MCP251X_IS(2510);
+MCP251X_IS(2515);
+
static void mcp251x_clean(struct net_device *net)
{
struct mcp251x_priv *priv = netdev_priv(net);
@@ -370,7 +380,7 @@ static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,
{
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
- if (priv->model == CAN_MCP251X_MCP2510) {
+ if (mcp251x_is_2510(spi)) {
int i;
for (i = 1; i < TXBDAT_OFF + len; i++)
@@ -414,7 +424,7 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
{
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
- if (priv->model == CAN_MCP251X_MCP2510) {
+ if (mcp251x_is_2510(spi)) {
int i, len;
for (i = 1; i < RXBDAT_OFF; i++)
--
1.7.0.4
^ permalink raw reply related
* [PATCH 8/8] can: mcp251x: optimize 2515, rx int gets cleared automatically
From: Marc Kleine-Budde @ 2010-10-18 13:31 UTC (permalink / raw)
To: socketcan-core; +Cc: netdev, Marc Kleine-Budde
In-Reply-To: <1287408674-15412-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/mcp251x.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 7f8aa4c..c664be2 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -793,15 +793,20 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
/* receive buffer 0 */
if (intf & CANINTF_RX0IF) {
mcp251x_hw_rx(spi, 0);
- /* Free one buffer ASAP */
- mcp251x_write_bits(spi, CANINTF, intf & CANINTF_RX0IF,
- 0x00);
+ /*
+ * Free one buffer ASAP
+ * (The MCP2515 does this automatically.)
+ */
+ if (mcp251x_is_2510(spi))
+ mcp251x_write_bits(spi, CANINTF, CANINTF_RX0IF, 0x00);
}
/* receive buffer 1 */
if (intf & CANINTF_RX1IF) {
mcp251x_hw_rx(spi, 1);
- clear_intf |= CANINTF_RX1IF;
+ /* the MCP2515 does this automatically */
+ if (mcp251x_is_2510(spi))
+ clear_intf |= CANINTF_RX1IF;
}
/* any error or tx interrupt we need to clear? */
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH net-next 0/6] bnx2x: patch series
From: David Miller @ 2010-10-18 14:01 UTC (permalink / raw)
To: dmitry; +Cc: netdev, eilong, vladz
In-Reply-To: <1287392355.11597.16.camel@lb-tlvb-dmitry>
From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Mon, 18 Oct 2010 10:59:15 +0200
> This is the respin of previous series with following changes:
> 1. removed patch with gso_size
> 2. removed FUNC_FLG_RSS flag and appropriate "if"s (as suggested by Joe Perches)
> 3. update version
>
> Please, consider applying to net-next
All applied, thanks.
^ permalink raw reply
* [PATCH 2/2] drivers/net/ax88796.c: Return error code in failure
From: Julia Lawall @ 2010-10-18 14:11 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: kernel-janitors, netdev, linux-kernel
In this code, 0 is returned on failure, even though other
failures return -ENOMEM or other similar values.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@a@
identifier alloc;
identifier ret;
constant C;
expression x;
@@
x = alloc(...);
if (x == NULL) { <+... \(ret = -C; \| return -C; \) ...+> }
@@
identifier f, a.alloc;
expression ret;
expression x,e1,e2,e3;
@@
ret = 0
... when != ret = e1
*x = alloc(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
Another call to platform_get_resource in the same function uses -ENXIO, so
I have used the same value here.
drivers/net/ax88796.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index 20e946b..b6da4cf 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -864,6 +864,7 @@ static int ax_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (res == NULL) {
dev_err(&pdev->dev, "no IRQ specified\n");
+ ret = -ENXIO;
goto exit_mem;
}
^ permalink raw reply related
* Re: [PATCH 6/8] can: mcp251x: Don't use pdata->model for chip selection anymore
From: Marc Zyngier @ 2010-10-18 13:49 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: socketcan-core, netdev, Christian Pellegrin
In-Reply-To: <1287408674-15412-7-git-send-email-mkl@pengutronix.de>
On Mon, 18 Oct 2010 15:31:12 +0200, Marc Kleine-Budde <mkl@pengutronix.de>
wrote:
> Since commit e446630c960946b5c1762e4eadb618becef599e7, i.e. v2.6.35-rc1,
> the mcp251x chip model can be selected via the modalias member in the
> struct spi_board_info. The driver stores the actual model in the
> struct mcp251x_platform_data.
>
> From the driver point of view the platform_data should be read only.
> Since all in-tree users of the mcp251x have already been converted to
> the modalias method, this patch moves the "model" member from the
> struct mcp251x_platform_data to the driver's private data structure.
>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: Christian Pellegrin <chripell@fsfe.org>
> Cc: Marc Zyngier <maz@misterjones.org>
Acked-by: Marc Zyngier <maz@misterjones.org>
--
Who you jivin' with that Cosmik Debris?
^ permalink raw reply
* Re: [PATCH V3 0/8] can: mcp251x: fix and optimize driver
From: David Miller @ 2010-10-18 14:12 UTC (permalink / raw)
To: mkl-bIcnvbaLZ9MEGnE8C9+IrQ
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1287408674-15412-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Date: Mon, 18 Oct 2010 15:31:06 +0200
> Moin,
>
> this series of patches improves the mcp251x driver. It first fixes the
> local_softirq_pending problem. Then the amount of SPI transfers is reduced
> in order to optimise the driver. A further patch cleans up the chip model
> selection.
>
> This series has been tested with a mcp2515 on i.MX35.
>
> Please review, test and consider to apply.
...
> git://git.pengutronix.de/git/mkl/linux-2.6.git can/mcp251x-for-net-next
Pulled, thanks.
^ permalink raw reply
* Re: [PATCH 6/8] can: mcp251x: Don't use pdata->model for chip selection anymore
From: Marc Kleine-Budde @ 2010-10-18 14:14 UTC (permalink / raw)
To: Marc Zyngier
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <d4c9d3f3d2843bd9cdb4cbb6a75236ce@localhost>
[-- Attachment #1.1: Type: text/plain, Size: 1349 bytes --]
On 10/18/2010 03:49 PM, Marc Zyngier wrote:
>
> On Mon, 18 Oct 2010 15:31:12 +0200, Marc Kleine-Budde <mkl@pengutronix.de>
> wrote:
>> Since commit e446630c960946b5c1762e4eadb618becef599e7, i.e. v2.6.35-rc1,
>> the mcp251x chip model can be selected via the modalias member in the
>> struct spi_board_info. The driver stores the actual model in the
>> struct mcp251x_platform_data.
>>
>> From the driver point of view the platform_data should be read only.
>> Since all in-tree users of the mcp251x have already been converted to
>> the modalias method, this patch moves the "model" member from the
>> struct mcp251x_platform_data to the driver's private data structure.
>>
>> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
>> Cc: Christian Pellegrin <chripell-VaTbYqLCNhc@public.gmane.org>
>> Cc: Marc Zyngier <maz-20xNzvSXLT6hUMvJH42dtQ@public.gmane.org>
>
> Acked-by: Marc Zyngier <maz-20xNzvSXLT6hUMvJH42dtQ@public.gmane.org>
Thanks, but I was to slow to push your Ack, David has pulled already.
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 188 bytes --]
_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core
^ permalink raw reply
* Re: [PATCH] qlcnic: update ethtool stats
From: David Miller @ 2010-10-18 14:23 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty
In-Reply-To: <1287402468-10249-1-git-send-email-amit.salecha@qlogic.com>
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Mon, 18 Oct 2010 04:47:48 -0700
> Added statistics for Nic Partition supported adapter.
> These statistics are maintined in device.
>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Applied.
^ permalink raw reply
* Re: [PATCH NEXT 1/2] netxen: fix race in tx stop queue
From: David Miller @ 2010-10-18 14:23 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty, rajesh.borundia
In-Reply-To: <1287403422-10431-1-git-send-email-amit.salecha@qlogic.com>
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Mon, 18 Oct 2010 05:03:41 -0700
> From: Rajesh Borundia <rajesh.borundia@qlogic.com>
>
> There is race between netif_stop_queue and netif_stopped_queue
> check.So check once again if buffers are available to avoid race.
> With above logic we can also get rid of tx lock in process_cmd_ring.
>
> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Applied.
^ permalink raw reply
* Re: [PATCH NEXT 2/2] netxen: mask correctable error
From: David Miller @ 2010-10-18 14:23 UTC (permalink / raw)
To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty
In-Reply-To: <1287403422-10431-2-git-send-email-amit.salecha@qlogic.com>
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Mon, 18 Oct 2010 05:03:42 -0700
> HW workaround:
> Disable logging of correctable error for some NX3031 based adapter.
>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Applied.
^ permalink raw reply
* Re: [PATCH] IPv4: route.c: Change checks against 0xffffffff to ipv4_is_lbcast()
From: David Miller @ 2010-10-18 14:23 UTC (permalink / raw)
To: awalls; +Cc: netdev, linux-kernel, kuznet, jmorris, kaber
In-Reply-To: <1287364282.2320.20.camel@morgan.silverblock.net>
From: Andy Walls <awalls@md.metrocast.net>
Date: Sun, 17 Oct 2010 21:11:22 -0400
>
> Change a few checks against the hardcoded broadcast address,
> 0xffffffff, to ipv4_is_lbcast(). Remove some existing checks
> using ipv4_is_lbcast() that are now obviously superfluous.
>
> Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Applied.
^ permalink raw reply
* Re: [RFC PATCH 1/9] ipvs network name space aware
From: Daniel Lezcano @ 2010-10-18 14:26 UTC (permalink / raw)
To: Hans Schillstrom
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
wensong@linux-vs.org
In-Reply-To: <201010181523.49568.hans.schillstrom@ericsson.com>
On 10/18/2010 03:23 PM, Hans Schillstrom wrote:
> On Monday 18 October 2010 13:37:38 Daniel Lezcano wrote:
>
>> On 10/18/2010 11:54 AM, Hans Schillstrom wrote:
>>
>>> On Monday 18 October 2010 10:59:25 Daniel Lezcano wrote:
>>>
>>>
>>>> On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
>>>>
>>>>
>>>>> This part contains the include files
>>>>> where include/net/netns/ip_vs.h is new and contains all moved vars.
>>>>>
>>>>> SUMMARY
>>>>>
>>>>> include/net/ip_vs.h | 136 ++++---
>>>>> include/net/net_namespace.h | 2 +
>>>>> include/net/netns/ip_vs.h | 112 +++++
>>>>>
>>>>> Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
>>>>> ---
>>>>>
>>>>>
>>>>>
>>>>>
>>>> [ ... ]
>>>>
>>>>
>>>>
>>>>> #ifdef CONFIG_IP_VS_IPV6
>>>>> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
>>>>> index bd10a79..b59cdc5 100644
>>>>> --- a/include/net/net_namespace.h
>>>>> +++ b/include/net/net_namespace.h
>>>>> @@ -15,6 +15,7 @@
>>>>> #include<net/netns/ipv4.h>
>>>>> #include<net/netns/ipv6.h>
>>>>> #include<net/netns/dccp.h>
>>>>> +#include<net/netns/ip_vs.h>
>>>>> #include<net/netns/x_tables.h>
>>>>> #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
>>>>> #include<net/netns/conntrack.h>
>>>>> @@ -91,6 +92,7 @@ struct net {
>>>>> struct sk_buff_head wext_nlevents;
>>>>> #endif
>>>>> struct net_generic *gen;
>>>>> + struct netns_ipvs *ipvs;
>>>>> };
>>>>>
>>>>>
>>>>>
>>>> IMHO, it would be better to use the net_generic infra-structure instead
>>>> of adding a new field in the netns structure.
>>>>
>>>>
>>>>
>>>>
>>> I realized that to, but the performance penalty is quite high with net_generic :-(
>>> But on the other hand if you are going to backport it, (without recompiling the kernel)
>>> you gonna need it!
>>>
>>>
>> Hmm, yes. We don't want to have the init_net_ns performances to be impacted.
>>
>> You use here a pointer which will be dereferenced like the net_generic,
>> I don't think there will be
>> a big difference between using net_generic and using a pointer in the
>> net namespace structure.
>>
>> The difference is the id usage, but this one is based on the idr which
>> is quite fast.
>>
>>
> I'm not so sure about that, have a look at net_generic and rcu_read_lock
> and compare
> ipvs = net->ipvs;
> vs.
> ipvs = net_generic(net, id)
>
> static inline void *net_generic(struct net *net, int id)
> {
> struct net_generic *ng;
> void *ptr;
>
> rcu_read_lock();
> ng = rcu_dereference(net->gen);
> BUG_ON(id == 0 || id> ng->len);
> ptr = ng->ptr[id - 1];
> rcu_read_unlock();
>
> return ptr;
> }
> ...
> static inline void rcu_read_lock(void)
> {
> __rcu_read_lock();
> __acquire(RCU);
> rcu_read_acquire();
> }
>
Yep, right. In fact I don't really like the net_generic and an ipvs ptr.
I am not sure it is adequate for this component.
> Another way of doing it is to pass the ipvs ptr instead of the net ptr,
> and add *net to the ipvs struct.
>
>
>> We should experiment a bit here to compare both solutions.
>>
> Agre
>
>>
> I single stepped through the rcu_read_lock() on a x86_64
> and it's quite many "stepi" that you need to enter :-(
>
>
>> IMHO, we can (1) create a non-pointer netns_ipvs field in the net
>> namespace structure or (2) use a pointer [with net_generic].
>>
>> (1) is the faster but with the drawback of having a bigger memory
>> footprint even if the ipvs module is not loaded.
>> In this case we have to take care of what we store in the netns_ipvs
>> structure, that is reduce the per namespace table and so. At the first
>> glance, I think we can reduce this to the sysctls and a very few data,
>> for example using global tables tagged with the namespace and we don't
>> break the cacheline alignment optimization.
>>
>> (2) is slower but as the memory is allocated and freed when the module
>> is loaded/unloaded. What I don't like with this approach is we add some
>> overhead even if the netns is not compiled in the kernel.
>>
>>
> or (3)
> Like (1) with data that needs to be cache aligned in "struct net"
> and the rest in an ipvs struct.
>
Ah, right. That could be a nice solution.
> Global hash tables or not ?
>
In the past, we used global hash tables because of the cacheline miss.
^ permalink raw reply
* Re: [PATCH 2/3] cxgb4: function namespace cleanup (v2)
From: David Miller @ 2010-10-18 14:31 UTC (permalink / raw)
To: swise; +Cc: dm, shemminger, divy, leedom, netdev
In-Reply-To: <4CBA6DC8.4010104@opengridcomputing.com>
From: Steve Wise <swise@opengridcomputing.com>
Date: Sat, 16 Oct 2010 22:30:16 -0500
> I'll add a patch this week to utilize the tcp stats.
Ok, thanks Steve.
Stephen, please respin the two cxgb4 patches without the
tcp stat function removal.
^ permalink raw reply
* Re: [PATCH 2/3] cxgb4: function namespace cleanup (v2)
From: Stephen Hemminger @ 2010-10-18 14:47 UTC (permalink / raw)
To: Steve Wise
Cc: Dimitris Michailidis, Divy Le Ray, David S. Miller, Casey Leedom,
netdev
In-Reply-To: <4CBA6DC8.4010104@opengridcomputing.com>
On Sat, 16 Oct 2010 22:30:16 -0500
Steve Wise <swise@opengridcomputing.com> wrote:
>
> On 10/16/2010 1:16 AM, Dimitris Michailidis wrote:
> > Stephen Hemminger wrote:
> >> On Fri, 15 Oct 2010 18:11:42 -0700
> >> Dimitris Michailidis <dm@chelsio.com> wrote:
> >>
> >>> Stephen Hemminger wrote:
> >>>> Make functions only used in one file local.
> >>>> Remove lots of dead code, relating to unsupported functions
> >>>> in mainline driver like RSS, IPv6, and TCP offload.
> >>> Thanks, this looks OK. One exception, cxgb4_get_tcp_stats was
> >>> intended to be used by the rdma driver. I see that driver doesn't
> >>> call it presently but if you don't mind can we give Steve a few
> >>> hours to tell us if he has any imminent plans to use it. If he
> >>> doesn't offer to do something to use it for .37 it goes.
> >>
> >> The kernel source tree is not your development place holder tree.
> >> At least #ifdef the code out for now.
> >
> > I am trying to protect Stephen Rothwell's time by checking that the IB
> > folks don't plan to add a call to this in their tree while we remove
> > the function in net-next. There's supposed to be a call in the IB
> > driver. I don't know why there isn't one or whether they are planning
> > to fix it for .37. I see the potential for a linux-next conflict and
> > I am trying to avoid it. #ifdef doesn't help, if it's not needed we
> > can remove it for good.
>
> I'll add a patch this week to utilize the tcp stats.
In cxgb4 only or both cxgb3 and cxgb4?
^ permalink raw reply
* Re: [PATCH 2/3] cxgb4: function namespace cleanup (v2)
From: Steve Wise @ 2010-10-18 14:53 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Dimitris Michailidis, Divy Le Ray, David S. Miller, Casey Leedom,
netdev
In-Reply-To: <20101018074713.0d0b91fd@nehalam>
On 10/18/2010 09:47 AM, Stephen Hemminger wrote:
> On Sat, 16 Oct 2010 22:30:16 -0500
> Steve Wise<swise@opengridcomputing.com> wrote:
>
>
>> On 10/16/2010 1:16 AM, Dimitris Michailidis wrote:
>>
>>> Stephen Hemminger wrote:
>>>
>>>> On Fri, 15 Oct 2010 18:11:42 -0700
>>>> Dimitris Michailidis<dm@chelsio.com> wrote:
>>>>
>>>>
>>>>> Stephen Hemminger wrote:
>>>>>
>>>>>> Make functions only used in one file local.
>>>>>> Remove lots of dead code, relating to unsupported functions
>>>>>> in mainline driver like RSS, IPv6, and TCP offload.
>>>>>>
>>>>> Thanks, this looks OK. One exception, cxgb4_get_tcp_stats was
>>>>> intended to be used by the rdma driver. I see that driver doesn't
>>>>> call it presently but if you don't mind can we give Steve a few
>>>>> hours to tell us if he has any imminent plans to use it. If he
>>>>> doesn't offer to do something to use it for .37 it goes.
>>>>>
>>>> The kernel source tree is not your development place holder tree.
>>>> At least #ifdef the code out for now.
>>>>
>>> I am trying to protect Stephen Rothwell's time by checking that the IB
>>> folks don't plan to add a call to this in their tree while we remove
>>> the function in net-next. There's supposed to be a call in the IB
>>> driver. I don't know why there isn't one or whether they are planning
>>> to fix it for .37. I see the potential for a linux-next conflict and
>>> I am trying to avoid it. #ifdef doesn't help, if it's not needed we
>>> can remove it for good.
>>>
>> I'll add a patch this week to utilize the tcp stats.
>>
> In cxgb4 only or both cxgb3 and cxgb4?
>
iw_cxgb3 already uses the cxgb3 TCP MIB.
Steve.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] igbvf: Remove unneeded pm_qos* calls
From: David Miller @ 2010-10-18 15:12 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, gregory.v.rose
In-Reply-To: <20101016032547.1925.27290.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 15 Oct 2010 20:26:47 -0700
> From: Greg Rose <gregory.v.rose@intel.com>
>
> Power Management Quality of Service is not supported or used by the VF
> driver.
>
> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] igb: fix stats handling
From: David Miller @ 2010-10-18 15:12 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, eric.dumazet
In-Reply-To: <20101016032707.1925.10161.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 15 Oct 2010 20:27:10 -0700
> From: Eric Dumazet <eric.dumazet@gmail.com>
>
> There are currently some problems with igb.
>
> - On 32bit arches, maintaining 64bit counters without proper
> synchronization between writers and readers.
>
> - Stats updated every two seconds, as reported by Jesper.
> (Jesper provided a patch for this)
>
> - Potential problem between worker thread and ethtool -S
>
> This patch uses u64_stats_sync, and convert everything to be 64bit safe,
> SMP safe, even on 32bit arches. It integrates Jesper idea of providing
> accurate stats at the time user reads them.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ 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