* [PATCHv2 net-next 2/4] caif: Bad assert triggering false positive.
From: Sjur Brændeland @ 2011-12-06 22:15 UTC (permalink / raw)
To: netdev, David Miller; +Cc: Sjur Brændeland
In-Reply-To: <1323209744-9718-1-git-send-email-sjur.brandeland@stericsson.com>
Fix bad assert on fragment size triggering false positive.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
net/caif/cfrfml.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c
index 81660f8..6dc75d4 100644
--- a/net/caif/cfrfml.c
+++ b/net/caif/cfrfml.c
@@ -190,7 +190,7 @@ out:
static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt)
{
- caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size);
+ caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size + RFM_HEAD_SIZE);
/* Add info for MUX-layer to route the packet out. */
cfpkt_info(pkt)->channel_id = rfml->serv.layer.id;
--
1.7.0.4
^ permalink raw reply related
* [PATCHv2 net-next 3/4] caif-shm: Bugfixes for caif_shmcore.c
From: Sjur Brændeland @ 2011-12-06 22:15 UTC (permalink / raw)
To: netdev, David Miller; +Cc: Sjur Brændeland
In-Reply-To: <1323209744-9718-1-git-send-email-sjur.brandeland@stericsson.com>
Various bugfixes for caif_shmcore.c:
- fix deadlocks due to improper usage of spin-lock
- add missing spin-lock init
- don't call dev_kfree_skb() with irqs disabled,
use dev_kfree_skb_irq() instead.
- fix potential skb null pointer de-reference.
Squashed original patches from:
Rabin Vincent <rabin.vincent@stericsson.com>
Durga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com>
Arun Murthy <arun.murthy@stericsson.com>
Bibek Basu <bibek.basu@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
Change since v1:
- s/dev_kfree_skb_any/dev_kfree_skb_irq/
- fixed two pointer cast warnings
drivers/net/caif/caif_shmcore.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
index d4b26fb..fd59e37 100644
--- a/drivers/net/caif/caif_shmcore.c
+++ b/drivers/net/caif/caif_shmcore.c
@@ -238,11 +238,11 @@ int caif_shmdrv_rx_cb(u32 mbx_msg, void *priv)
if ((avail_emptybuff > HIGH_WATERMARK) &&
(!pshm_drv->tx_empty_available)) {
pshm_drv->tx_empty_available = 1;
+ spin_unlock_irqrestore(&pshm_drv->lock, flags);
pshm_drv->cfdev.flowctrl
(pshm_drv->pshm_dev->pshm_netdev,
CAIF_FLOW_ON);
- spin_unlock_irqrestore(&pshm_drv->lock, flags);
/* Schedule the work queue. if required */
if (!work_pending(&pshm_drv->shm_tx_work))
@@ -285,6 +285,7 @@ static void shm_rx_work_func(struct work_struct *rx_work)
list_entry(pshm_drv->rx_full_list.next, struct buf_list,
list);
list_del_init(&pbuf->list);
+ spin_unlock_irqrestore(&pshm_drv->lock, flags);
/* Retrieve pointer to start of the packet descriptor area. */
pck_desc = (struct shm_pck_desc *) pbuf->desc_vptr;
@@ -360,6 +361,7 @@ static void shm_rx_work_func(struct work_struct *rx_work)
pck_desc++;
}
+ spin_lock_irqsave(&pshm_drv->lock, flags);
list_add_tail(&pbuf->list, &pshm_drv->rx_pend_list);
spin_unlock_irqrestore(&pshm_drv->lock, flags);
@@ -412,7 +414,6 @@ static void shm_tx_work_func(struct work_struct *tx_work)
if (skb == NULL)
goto send_msg;
-
/* Check the available no. of buffers in the empty list */
list_for_each(pos, &pshm_drv->tx_empty_list)
avail_emptybuff++;
@@ -421,9 +422,11 @@ static void shm_tx_work_func(struct work_struct *tx_work)
pshm_drv->tx_empty_available) {
/* Update blocking condition. */
pshm_drv->tx_empty_available = 0;
+ spin_unlock_irqrestore(&pshm_drv->lock, flags);
pshm_drv->cfdev.flowctrl
(pshm_drv->pshm_dev->pshm_netdev,
CAIF_FLOW_OFF);
+ spin_lock_irqsave(&pshm_drv->lock, flags);
}
/*
* We simply return back to the caller if we do not have space
@@ -469,6 +472,8 @@ static void shm_tx_work_func(struct work_struct *tx_work)
}
skb = skb_dequeue(&pshm_drv->sk_qhead);
+ if (skb == NULL)
+ break;
/* Copy in CAIF frame. */
skb_copy_bits(skb, 0, pbuf->desc_vptr +
pbuf->frm_ofs + SHM_HDR_LEN +
@@ -477,7 +482,7 @@ static void shm_tx_work_func(struct work_struct *tx_work)
pshm_drv->pshm_dev->pshm_netdev->stats.tx_packets++;
pshm_drv->pshm_dev->pshm_netdev->stats.tx_bytes +=
frmlen;
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
/* Fill in the shared memory packet descriptor area. */
pck_desc = (struct shm_pck_desc *) (pbuf->desc_vptr);
@@ -512,16 +517,11 @@ send_msg:
static int shm_netdev_tx(struct sk_buff *skb, struct net_device *shm_netdev)
{
struct shmdrv_layer *pshm_drv;
- unsigned long flags = 0;
pshm_drv = netdev_priv(shm_netdev);
- spin_lock_irqsave(&pshm_drv->lock, flags);
-
skb_queue_tail(&pshm_drv->sk_qhead, skb);
- spin_unlock_irqrestore(&pshm_drv->lock, flags);
-
/* Schedule Tx work queue. for deferred processing of skbs*/
if (!work_pending(&pshm_drv->shm_tx_work))
queue_work(pshm_drv->pshm_tx_workqueue, &pshm_drv->shm_tx_work);
@@ -606,6 +606,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
pshm_drv->shm_rx_addr = pshm_dev->shm_base_addr +
(NR_TX_BUF * TX_BUF_SZ);
+ spin_lock_init(&pshm_drv->lock);
INIT_LIST_HEAD(&pshm_drv->tx_empty_list);
INIT_LIST_HEAD(&pshm_drv->tx_pend_list);
INIT_LIST_HEAD(&pshm_drv->tx_full_list);
@@ -640,7 +641,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
tx_buf->frm_ofs = SHM_CAIF_FRM_OFS;
if (pshm_dev->shm_loopback)
- tx_buf->desc_vptr = (char *)tx_buf->phy_addr;
+ tx_buf->desc_vptr = (unsigned char *)tx_buf->phy_addr;
else
tx_buf->desc_vptr =
ioremap(tx_buf->phy_addr, TX_BUF_SZ);
@@ -664,7 +665,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
rx_buf->len = RX_BUF_SZ;
if (pshm_dev->shm_loopback)
- rx_buf->desc_vptr = (char *)rx_buf->phy_addr;
+ rx_buf->desc_vptr = (unsigned char *)rx_buf->phy_addr;
else
rx_buf->desc_vptr =
ioremap(rx_buf->phy_addr, RX_BUF_SZ);
--
1.7.0.4
^ permalink raw reply related
* [PATCHv2 net-next 4/4] caif: Replace BUG_ON with WARN_ON.
From: Sjur Brændeland @ 2011-12-06 22:15 UTC (permalink / raw)
To: netdev, David Miller; +Cc: Roar Førde, Sjur Brændeland
In-Reply-To: <1323209744-9718-1-git-send-email-sjur.brandeland@stericsson.com>
From: Roar Førde <roar.forde@stericsson.com>
BUG_ON is too strict in a number of circumstances,
use WARN_ON instead. Protocol errors should not halt the system.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
Since v1: removed and changed some OOM related printouts.
drivers/net/caif/caif_hsi.c | 2 +-
drivers/net/caif/caif_serial.c | 4 ++--
drivers/net/caif/caif_shmcore.c | 6 +++++-
net/caif/caif_dev.c | 10 ++++------
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index a85b29e..0a4fc62 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -933,7 +933,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
/* Create HSI frame. */
len = cfhsi_tx_frm(desc, cfhsi);
- BUG_ON(!len);
+ WARN_ON(!len);
/* Set up new transfer. */
res = cfhsi->dev->cfhsi_tx(cfhsi->tx_buf, len, cfhsi->dev);
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 23406e6..9341a2d 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -261,7 +261,7 @@ static int handle_tx(struct ser_device *ser)
skb_pull(skb, tty_wr);
if (skb->len == 0) {
struct sk_buff *tmp = skb_dequeue(&ser->head);
- BUG_ON(tmp != skb);
+ WARN_ON(tmp != skb);
if (in_interrupt())
dev_kfree_skb_irq(skb);
else
@@ -305,7 +305,7 @@ static void ldisc_tx_wakeup(struct tty_struct *tty)
ser = tty->disc_data;
BUG_ON(ser == NULL);
- BUG_ON(ser->tty != tty);
+ WARN_ON(ser->tty != tty);
handle_tx(ser);
}
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
index fd59e37..5b20413 100644
--- a/drivers/net/caif/caif_shmcore.c
+++ b/drivers/net/caif/caif_shmcore.c
@@ -337,7 +337,11 @@ static void shm_rx_work_func(struct work_struct *rx_work)
/* Get a suitable CAIF packet and copy in data. */
skb = netdev_alloc_skb(pshm_drv->pshm_dev->pshm_netdev,
frm_pck_len + 1);
- BUG_ON(skb == NULL);
+
+ if (skb == NULL) {
+ pr_info("OOM: Try next frame in descriptor\n");
+ break;
+ }
p = skb_put(skb, frm_pck_len);
memcpy(p, pbuf->desc_vptr + frm_pck_ofs, frm_pck_len);
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 9b298c1..b0ce14f 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -58,7 +58,6 @@ static int q_high = 50; /* Percent */
struct cfcnfg *get_cfcnfg(struct net *net)
{
struct caif_net *caifn;
- BUG_ON(!net);
caifn = net_generic(net, caif_net_id);
if (!caifn)
return NULL;
@@ -69,7 +68,6 @@ EXPORT_SYMBOL(get_cfcnfg);
static struct caif_device_entry_list *caif_device_list(struct net *net)
{
struct caif_net *caifn;
- BUG_ON(!net);
caifn = net_generic(net, caif_net_id);
if (!caifn)
return NULL;
@@ -507,15 +505,15 @@ static struct notifier_block caif_device_notifier = {
static int caif_init_net(struct net *net)
{
struct caif_net *caifn = net_generic(net, caif_net_id);
- BUG_ON(!caifn);
+ if (WARN_ON(!caifn))
+ return -EINVAL;
+
INIT_LIST_HEAD(&caifn->caifdevs.list);
mutex_init(&caifn->caifdevs.lock);
caifn->cfg = cfcnfg_create();
- if (!caifn->cfg) {
- pr_warn("can't create cfcnfg\n");
+ if (!caifn->cfg)
return -ENOMEM;
- }
return 0;
}
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH net-next] bnx2x: Fix compile errors if CONFIG_CNIC is not set
From: Eilon Greenstein @ 2011-12-06 22:16 UTC (permalink / raw)
To: Michael Chan, Joe Perches, Dmitry Kravkov
Cc: Eric Dumazet, davem@davemloft.net, netdev@vger.kernel.org,
Barak Witkowski
In-Reply-To: <1323207770.7517.7.camel@HP1>
On Tue, 2011-12-06 at 13:42 -0800, Michael Chan wrote:
> On Tue, 2011-12-06 at 13:25 -0800, Joe Perches wrote:
> > On Tue, 2011-12-06 at 22:03 +0100, Eric Dumazet wrote:
> > > Le mardi 06 décembre 2011 à 12:58 -0800, Michael Chan a écrit :
> > > > Don't provide FCoE and iSCSI statistics to management firmware if
> > > > CONFIG_CNIC is not set. Some needed structure fields are not defined
> > > > without CONFIG_CNIC.
> > > Thanks for the fast answer, and yes, no more build error :)
> >
> > That works, but is that the best solution?
> >
> > Another option is for bnx2x_handle_drv_info_req
> > to return DRV_MSG_CODE_DRV_INFO_NACK
> >
>
> Eilon (bnx2x lead maintainer) will need to decide which is the most
> appropriate solution as he is most familiar with the firmware. I don't
> know if sending NACK to the firmware will have other negative effects or
> not. Eilon should be online in about 8 hours and he can send a
> follow-up patch if necessary.
>
> > Maybe like:
> >
> > switch (op_code) {
> > case ETH_STATS_OPCODE:
> > bnx2x_drv_info_ether_stat(bp);
> > break;
> > #ifdef BCM_CNIC
> > case FCOE_STATS_OPCODE:
> > bnx2x_drv_info_fcoe_stat(bp);
> > break;
> > case ISCSI_STATS_OPCODE:
> > bnx2x_drv_info_iscsi_stat(bp);
> > break;
> > #endif
> > default:
> > /* if op code isn't supported - send NACK */
> > bnx2x_fw_command(bp, DRV_MSG_CODE_DRV_INFO_NACK, 0);
> > return;
> > }
> >
> >
> >
>
Joe is right. This latest patch breaks the FW assumption, but at least
everything compiles now, so it is not as urgent. We will send a patch in
that spirit in the morning.
Thanks,
Eilon
^ permalink raw reply
* ipv6: Make third arg to anycast_dst_alloc() bool.
From: David Miller @ 2011-12-06 22:20 UTC (permalink / raw)
To: netdev
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/net/ip6_route.h | 2 +-
net/ipv6/addrconf.c | 2 +-
net/ipv6/anycast.c | 2 +-
net/ipv6/route.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 5e91b72..f9dbf47 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -102,7 +102,7 @@ extern void fib6_force_start_gc(struct net *net);
extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
const struct in6_addr *addr,
- int anycast);
+ bool anycast);
extern int ip6_dst_hoplimit(struct dst_entry *dst);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 058cc22..94f3fd9 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -630,7 +630,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
goto out;
}
- rt = addrconf_dst_alloc(idev, addr, 0);
+ rt = addrconf_dst_alloc(idev, addr, false);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
goto out;
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index fc1cdcd..cc540f9 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -289,7 +289,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr)
goto out;
}
- rt = addrconf_dst_alloc(idev, addr, 1);
+ rt = addrconf_dst_alloc(idev, addr, true);
if (IS_ERR(rt)) {
kfree(aca);
err = PTR_ERR(rt);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 09412ba..f0b582b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2056,7 +2056,7 @@ static int ip6_pkt_prohibit_out(struct sk_buff *skb)
struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
const struct in6_addr *addr,
- int anycast)
+ bool anycast)
{
struct net *net = dev_net(idev->dev);
struct rt6_info *rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops,
--
1.7.7.3
^ permalink raw reply related
* ipv6: Move xfrm_lookup() call down into icmp6_dst_alloc().
From: David Miller @ 2011-12-06 22:20 UTC (permalink / raw)
To: netdev
And return error pointers.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/net/ip6_route.h | 2 +-
net/ipv6/mcast.c | 18 ++----------------
net/ipv6/ndisc.c | 9 +--------
net/ipv6/route.c | 12 ++++++++----
4 files changed, 12 insertions(+), 29 deletions(-)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index f9dbf47..789d5f4 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -95,7 +95,7 @@ extern struct rt6_info *rt6_lookup(struct net *net,
extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
- const struct in6_addr *addr);
+ struct flowi6 *fl6);
extern int icmp6_dst_gc(void);
extern void fib6_force_start_gc(struct net *net);
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 518cbb9..ea34d58 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1410,18 +1410,11 @@ static void mld_sendpack(struct sk_buff *skb)
csum_partial(skb_transport_header(skb),
mldlen, 0));
- dst = icmp6_dst_alloc(skb->dev, NULL, &ipv6_hdr(skb)->daddr);
-
- if (!dst) {
- err = -ENOMEM;
- goto err_out;
- }
-
icmpv6_flow_init(net->ipv6.igmp_sk, &fl6, ICMPV6_MLD2_REPORT,
&ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
skb->dev->ifindex);
+ dst = icmp6_dst_alloc(skb->dev, NULL, &fl6);
- dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
err = 0;
if (IS_ERR(dst)) {
err = PTR_ERR(dst);
@@ -1785,17 +1778,10 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
rcu_read_lock();
idev = __in6_dev_get(skb->dev);
- dst = icmp6_dst_alloc(skb->dev, NULL, &ipv6_hdr(skb)->daddr);
- if (!dst) {
- err = -ENOMEM;
- goto err_out;
- }
-
icmpv6_flow_init(sk, &fl6, type,
&ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
skb->dev->ifindex);
-
- dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
+ dst = icmp6_dst_alloc(skb->dev, NULL, &fl6);
if (IS_ERR(dst)) {
err = PTR_ERR(dst);
goto err_out;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index e72c8af..f3e50c2 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -516,14 +516,7 @@ void ndisc_send_skb(struct sk_buff *skb,
type = icmp6h->icmp6_type;
icmpv6_flow_init(sk, &fl6, type, saddr, daddr, dev->ifindex);
-
- dst = icmp6_dst_alloc(dev, neigh, daddr);
- if (!dst) {
- kfree_skb(skb);
- return;
- }
-
- dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
+ dst = icmp6_dst_alloc(dev, neigh, &fl6);
if (IS_ERR(dst)) {
kfree_skb(skb);
return;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f0b582b..d98cf41 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1068,8 +1068,9 @@ static DEFINE_SPINLOCK(icmp6_dst_lock);
struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
- const struct in6_addr *addr)
+ struct flowi6 *fl6)
{
+ struct dst_entry *dst;
struct rt6_info *rt;
struct inet6_dev *idev = in6_dev_get(dev);
struct net *net = dev_net(dev);
@@ -1080,13 +1081,14 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0);
if (unlikely(!rt)) {
in6_dev_put(idev);
+ dst = ERR_PTR(-ENOMEM);
goto out;
}
if (neigh)
neigh_hold(neigh);
else {
- neigh = __neigh_lookup_errno(&nd_tbl, addr, dev);
+ neigh = __neigh_lookup_errno(&nd_tbl, &fl6->daddr, dev);
if (IS_ERR(neigh))
neigh = NULL;
}
@@ -1095,7 +1097,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
rt->dst.output = ip6_output;
dst_set_neighbour(&rt->dst, neigh);
atomic_set(&rt->dst.__refcnt, 1);
- rt->rt6i_dst.addr = *addr;
+ rt->rt6i_dst.addr = fl6->daddr;
rt->rt6i_dst.plen = 128;
rt->rt6i_idev = idev;
dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255);
@@ -1107,8 +1109,10 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
fib6_force_start_gc(net);
+ dst = xfrm_lookup(net, &rt->dst, flowi6_to_flowi(fl6), NULL, 0);
+
out:
- return &rt->dst;
+ return dst;
}
int icmp6_dst_gc(void)
--
1.7.7.3
^ permalink raw reply related
* Re: [PATCHv2 net-next 1/4] caif-hsi: Remove wake line modification when flushing FIFO
From: David Miller @ 2011-12-06 22:22 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev, christian.auby
In-Reply-To: <1323209744-9718-1-git-send-email-sjur.brandeland@stericsson.com>
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 6 Dec 2011 23:15:41 +0100
> From: Christian Auby <christian.auby@stericsson.com>
>
> Raising wake before flushing FIFO and lowering it after caused a
> spike on AC wake that were sometimes detected and acted upon by the
> modem. Fixed this by remove wake line modification when flushing FIFO.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Applied.
^ permalink raw reply
* Re: [PATCHv2 net-next 2/4] caif: Bad assert triggering false positive.
From: David Miller @ 2011-12-06 22:22 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev
In-Reply-To: <1323209744-9718-2-git-send-email-sjur.brandeland@stericsson.com>
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 6 Dec 2011 23:15:42 +0100
> Fix bad assert on fragment size triggering false positive.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Applied.
^ permalink raw reply
* Re: [PATCHv2 net-next 3/4] caif-shm: Bugfixes for caif_shmcore.c
From: David Miller @ 2011-12-06 22:22 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev
In-Reply-To: <1323209744-9718-3-git-send-email-sjur.brandeland@stericsson.com>
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 6 Dec 2011 23:15:43 +0100
> Various bugfixes for caif_shmcore.c:
> - fix deadlocks due to improper usage of spin-lock
> - add missing spin-lock init
> - don't call dev_kfree_skb() with irqs disabled,
> use dev_kfree_skb_irq() instead.
> - fix potential skb null pointer de-reference.
>
> Squashed original patches from:
> Rabin Vincent <rabin.vincent@stericsson.com>
> Durga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com>
> Arun Murthy <arun.murthy@stericsson.com>
> Bibek Basu <bibek.basu@stericsson.com>
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> ---
> Change since v1:
> - s/dev_kfree_skb_any/dev_kfree_skb_irq/
> - fixed two pointer cast warnings
Applied.
^ permalink raw reply
* Re: [PATCHv2 net-next 4/4] caif: Replace BUG_ON with WARN_ON.
From: David Miller @ 2011-12-06 22:22 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev, roar.forde
In-Reply-To: <1323209744-9718-4-git-send-email-sjur.brandeland@stericsson.com>
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 6 Dec 2011 23:15:44 +0100
> From: Roar Førde <roar.forde@stericsson.com>
>
> BUG_ON is too strict in a number of circumstances,
> use WARN_ON instead. Protocol errors should not halt the system.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> ---
> Since v1: removed and changed some OOM related printouts.
Applied.
^ permalink raw reply
* [PATCH 0/3] crypto: Add per-cpu transform helpers
From: Seth Jennings @ 2011-12-06 22:45 UTC (permalink / raw)
To: David S . Miller
Cc: Seth Jennings, linux-crypto, linux-kernel, netdev, Eric Dumazet,
Brian King, Robert Jennings
This patchset includes two new functions for the cryptographic library,
crypto_alloc_percpu_tfms() and crypto_free_percpu_tfms(), which assist users
in allocating and freeing per-cpu transforms.
It also includes typing wrappers for the compression algorithm class.
The reason for this patch is that during my work to enable page compression
via the cryptographic API in the zcache staging driver, and realized that I
had rewritten some per-cpu transform code that already exists in the
xfrm_ipcomp code.
In an effort to avoid duplication, this patchset moves the per-cpu code into
helper functions in the cryptographic library and makes the necessary
modifications to the xfrm_ipcomp code.
After this change is (hopefully) merged, I will submit the zcache driver
changes, which will be the second user of these helpers.
Seth Jennings (3):
crypto: Add per-cpu transform alloc() and free()
crypto: Add inline per-cpu wrappers for compression
xfrm: Modify xfrm_ipcomp code to use new per-cpu helpers
crypto/api.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/crypto.h | 28 +++++++++++++++++++++
net/xfrm/xfrm_ipcomp.c | 34 ++++++--------------------
3 files changed, 98 insertions(+), 26 deletions(-)
--
1.7.5.4
^ permalink raw reply
* Indicate Your Interest
From: Mr.Vincent Cheng @ 2011-12-06 22:49 UTC (permalink / raw)
I am Mr.Vincent Cheng, GBS, JP Chairman of the Hong Kong and Shanghai
BankingCorporation Limited. I have a business proposal of USD
$10,500,000.00. Your
earliest response to this letter will be appreciated, upon the confirmation
of your response all further details and document will be issued to you.
Endeavour to let me know your decision rather than keep me waiting
Email:vincentcheng048@yahoo.co.jp
Best Regards,
Mr.Vincent Cheng
^ permalink raw reply
* Re: [PATCH net-next] remove an outdated reference to T/TCP
From: Yuchung Cheng @ 2011-12-06 23:00 UTC (permalink / raw)
To: David Miller; +Cc: rick.jones2, netdev
In-Reply-To: <20111206.164243.402402261622724566.davem@davemloft.net>
On Tue, Dec 6, 2011 at 1:42 PM, David Miller <davem@davemloft.net> wrote:
>
> From: Rick Jones <rick.jones2@hp.com>
> Date: Tue, 06 Dec 2011 13:39:23 -0800
>
> > On 12/06/2011 12:19 PM, David Miller wrote:
> >> From: Rick Jones<rick.jones2@hp.com>
> >> Date: Tue, 6 Dec 2011 12:00:05 -0800 (PST)
> >>
> >>>
> >>> Remove a particularly out of date bit of comment referring to T/TCP.
> >>>
> >>> Signed-off-by: Rick Jones<rick.jones2@hp.com>
> >>
> >> I think it should stay because it discusses the potential bad side
> >> effects of queueing any data that might be in the SYN.
> >
> > How about just the sentence that mentioned T/TCP explicitly since
> > T/TCP is most definitely no longer starting to be used?-) The rest of
> > it can be discussed when/if TCP Fast Open arrives :)
>
> T/TCP gives the statement context, as in referencing something that
> might make us want to at least theoretically consider handling the
> data.
I am fine keeping the comment as is. This does remind me to put more
comments on this part of the code in our upcoming Fast Open patch :)
^ permalink raw reply
* [PATCH net-next 1/3] bridge: refactor fdb_notify
From: Stephen Hemminger @ 2011-12-06 23:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20111206230223.191544130@vyatta.com>
[-- Attachment #1: br-local-notify.patch --]
[-- Type: text/plain, Size: 1338 bytes --]
Move fdb_notify outside of fdb_create. This fixes the problem
that notification of local entries are not flagged correctly.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/bridge/br_fdb.c 2011-12-06 14:58:24.122561721 -0800
+++ b/net/bridge/br_fdb.c 2011-12-06 15:01:23.656521166 -0800
@@ -347,7 +347,6 @@ static struct net_bridge_fdb_entry *fdb_
fdb->is_static = 0;
fdb->updated = fdb->used = jiffies;
hlist_add_head_rcu(&fdb->hlist, head);
- fdb_notify(fdb, RTM_NEWNEIGH);
}
return fdb;
}
@@ -379,6 +378,7 @@ static int fdb_insert(struct net_bridge
return -ENOMEM;
fdb->is_local = fdb->is_static = 1;
+ fdb_notify(fdb, RTM_NEWNEIGH);
return 0;
}
@@ -424,9 +424,11 @@ void br_fdb_update(struct net_bridge *br
}
} else {
spin_lock(&br->hash_lock);
- if (likely(!fdb_find(head, addr)))
- fdb_create(head, source, addr);
-
+ if (likely(!fdb_find(head, addr))) {
+ fdb = fdb_create(head, source, addr);
+ if (fdb)
+ fdb_notify(fdb, RTM_NEWNEIGH);
+ }
/* else we lose race and someone else inserts
* it first, don't bother updating
*/
@@ -572,6 +574,7 @@ static int fdb_add_entry(struct net_brid
fdb = fdb_create(head, source, addr);
if (!fdb)
return -ENOMEM;
+ fdb_notify(fdb, RTM_NEWNEIGH);
} else {
if (flags & NLM_F_EXCL)
return -EEXIST;
^ permalink raw reply
* [PATCH net-next 3/3] bridge: add local MAC address to forwarding table
From: Stephen Hemminger @ 2011-12-06 23:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20111206230223.191544130@vyatta.com>
[-- Attachment #1: br-local-mac-fdb.patch --]
[-- Type: text/plain, Size: 3953 bytes --]
If user has configured a MAC address that is not one of the existing
ports of the bridge, then we need to add a special entry in the forwarding
table. This forwarding table entry has no outgoing port so it has to be
treated a little differently. The special entry is reported by the netlink
interface with ifindex of zero, but ignored by the old interface since there
is no usable way to put it in the ABI.
Reported-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/bridge/br_device.c | 7 +++++--
net/bridge/br_fdb.c | 26 +++++++++++++++++++++++---
net/bridge/br_forward.c | 2 +-
net/bridge/br_private.h | 1 +
4 files changed, 30 insertions(+), 6 deletions(-)
--- a/net/bridge/br_device.c 2011-12-06 14:51:02.144261262 -0800
+++ b/net/bridge/br_device.c 2011-12-06 14:51:55.192894304 -0800
@@ -170,8 +170,11 @@ static int br_set_mac_address(struct net
return -EINVAL;
spin_lock_bh(&br->lock);
- memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
- br_stp_change_bridge_id(br, addr->sa_data);
+ if (compare_ether_addr(dev->dev_addr, addr->sa_data)) {
+ memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+ br_fdb_change_mac_address(br, addr->sa_data);
+ br_stp_change_bridge_id(br, addr->sa_data);
+ }
br->flags |= BR_SET_MAC_ADDR;
spin_unlock_bh(&br->lock);
--- a/net/bridge/br_fdb.c 2011-12-06 14:51:39.688709288 -0800
+++ b/net/bridge/br_fdb.c 2011-12-06 14:51:55.196894351 -0800
@@ -127,6 +127,18 @@ void br_fdb_changeaddr(struct net_bridge
spin_unlock_bh(&br->hash_lock);
}
+void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr)
+{
+ struct net_bridge_fdb_entry *f;
+
+ /* If old entry was unassociated with any port, then delete it. */
+ f = __br_fdb_get(br, br->dev->dev_addr);
+ if (f && f->is_local && !f->dst)
+ fdb_delete(br, f);
+
+ fdb_insert(br, NULL, newaddr);
+}
+
void br_fdb_cleanup(unsigned long _data)
{
struct net_bridge *br = (struct net_bridge *)_data;
@@ -250,7 +262,7 @@ int br_fdb_test_addr(struct net_device *
ret = 0;
else {
fdb = __br_fdb_get(port->br, addr);
- ret = fdb && fdb->dst->dev != dev &&
+ ret = fdb && fdb->dst && fdb->dst->dev != dev &&
fdb->dst->state == BR_STATE_FORWARDING;
}
rcu_read_unlock();
@@ -282,6 +294,10 @@ int br_fdb_fillbuf(struct net_bridge *br
if (has_expired(br, f))
continue;
+ /* ignore pseudo entry for local MAC address */
+ if (!f->dst)
+ continue;
+
if (skip) {
--skip;
continue;
@@ -462,14 +478,13 @@ static int fdb_fill_info(struct sk_buff
if (nlh == NULL)
return -EMSGSIZE;
-
ndm = nlmsg_data(nlh);
ndm->ndm_family = AF_BRIDGE;
ndm->ndm_pad1 = 0;
ndm->ndm_pad2 = 0;
ndm->ndm_flags = 0;
ndm->ndm_type = 0;
- ndm->ndm_ifindex = fdb->dst->dev->ifindex;
+ ndm->ndm_ifindex = fdb->dst ? fdb->dst->dev->ifindex : 0;
ndm->ndm_state = fdb_to_nud(fdb);
NLA_PUT(skb, NDA_LLADDR, ETH_ALEN, &fdb->addr);
--- a/net/bridge/br_forward.c 2011-12-06 14:51:02.188261787 -0800
+++ b/net/bridge/br_forward.c 2011-12-06 14:51:55.196894351 -0800
@@ -98,7 +98,7 @@ static void __br_forward(const struct ne
/* called with rcu_read_lock */
void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb)
{
- if (should_deliver(to, skb)) {
+ if (to && should_deliver(to, skb)) {
__br_deliver(to, skb);
return;
}
--- a/net/bridge/br_private.h 2011-12-06 14:51:02.128261071 -0800
+++ b/net/bridge/br_private.h 2011-12-06 14:51:55.196894351 -0800
@@ -348,6 +348,7 @@ extern void br_fdb_fini(void);
extern void br_fdb_flush(struct net_bridge *br);
extern void br_fdb_changeaddr(struct net_bridge_port *p,
const unsigned char *newaddr);
+extern void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr);
extern void br_fdb_cleanup(unsigned long arg);
extern void br_fdb_delete_by_port(struct net_bridge *br,
const struct net_bridge_port *p, int do_all);
^ permalink raw reply
* [PATCH net-next 0/3] bridge forwarding database patches
From: Stephen Hemminger @ 2011-12-06 23:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev
These three patches address issue of receiving packets when
bridge mac address is modified.
^ permalink raw reply
* [PATCH net-next 2/3] bridge: rearrange fdb notifications
From: Stephen Hemminger @ 2011-12-06 23:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20111206230223.191544130@vyatta.com>
[-- Attachment #1: br-notify-refactor.patch --]
[-- Type: text/plain, Size: 3551 bytes --]
Pass bridge to fdb_notify so it can determine correct namespace based
on namespace of bridge rather than namespace of destination port.
Also makes next patch easier.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/bridge/br_fdb.c 2011-12-06 15:01:23.656521166 -0800
+++ b/net/bridge/br_fdb.c 2011-12-06 15:02:12.448870810 -0800
@@ -28,7 +28,8 @@
static struct kmem_cache *br_fdb_cache __read_mostly;
static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
const unsigned char *addr);
-static void fdb_notify(const struct net_bridge_fdb_entry *, int);
+static void fdb_notify(struct net_bridge *br,
+ const struct net_bridge_fdb_entry *, int);
static u32 fdb_salt __read_mostly;
@@ -80,10 +81,10 @@ static void fdb_rcu_free(struct rcu_head
kmem_cache_free(br_fdb_cache, ent);
}
-static inline void fdb_delete(struct net_bridge_fdb_entry *f)
+static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f)
{
- fdb_notify(f, RTM_DELNEIGH);
hlist_del_rcu(&f->hlist);
+ fdb_notify(br, f, RTM_DELNEIGH);
call_rcu(&f->rcu, fdb_rcu_free);
}
@@ -114,7 +115,7 @@ void br_fdb_changeaddr(struct net_bridge
}
/* delete old one */
- fdb_delete(f);
+ fdb_delete(br, f);
goto insert;
}
}
@@ -144,7 +145,7 @@ void br_fdb_cleanup(unsigned long _data)
continue;
this_timer = f->updated + delay;
if (time_before_eq(this_timer, jiffies))
- fdb_delete(f);
+ fdb_delete(br, f);
else if (time_before(this_timer, next_timer))
next_timer = this_timer;
}
@@ -165,7 +166,7 @@ void br_fdb_flush(struct net_bridge *br)
struct hlist_node *h, *n;
hlist_for_each_entry_safe(f, h, n, &br->hash[i], hlist) {
if (!f->is_static)
- fdb_delete(f);
+ fdb_delete(br, f);
}
}
spin_unlock_bh(&br->hash_lock);
@@ -209,7 +210,7 @@ void br_fdb_delete_by_port(struct net_br
}
}
- fdb_delete(f);
+ fdb_delete(br, f);
skip_delete: ;
}
}
@@ -370,7 +371,7 @@ static int fdb_insert(struct net_bridge
br_warn(br, "adding interface %s with same address "
"as a received packet\n",
source->dev->name);
- fdb_delete(fdb);
+ fdb_delete(br, fdb);
}
fdb = fdb_create(head, source, addr);
@@ -378,7 +379,7 @@ static int fdb_insert(struct net_bridge
return -ENOMEM;
fdb->is_local = fdb->is_static = 1;
- fdb_notify(fdb, RTM_NEWNEIGH);
+ fdb_notify(br, fdb, RTM_NEWNEIGH);
return 0;
}
@@ -493,9 +494,10 @@ static inline size_t fdb_nlmsg_size(void
+ nla_total_size(sizeof(struct nda_cacheinfo));
}
-static void fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
+static void fdb_notify(struct net_bridge *br,
+ const struct net_bridge_fdb_entry *fdb, int type)
{
- struct net *net = dev_net(fdb->dst->dev);
+ struct net *net = dev_net(br->dev);
struct sk_buff *skb;
int err = -ENOBUFS;
@@ -574,7 +576,7 @@ static int fdb_add_entry(struct net_brid
fdb = fdb_create(head, source, addr);
if (!fdb)
return -ENOMEM;
- fdb_notify(fdb, RTM_NEWNEIGH);
+ fdb_notify(br, fdb, RTM_NEWNEIGH);
} else {
if (flags & NLM_F_EXCL)
return -EEXIST;
@@ -590,7 +592,7 @@ static int fdb_add_entry(struct net_brid
fdb->is_local = fdb->is_static = 0;
fdb->updated = fdb->used = jiffies;
- fdb_notify(fdb, RTM_NEWNEIGH);
+ fdb_notify(br, fdb, RTM_NEWNEIGH);
}
return 0;
@@ -670,7 +672,7 @@ static int fdb_delete_by_addr(struct net
if (!fdb)
return -ENOENT;
- fdb_delete(fdb);
+ fdb_delete(p->br, fdb);
return 0;
}
^ permalink raw reply
* Re: [net-next RFC PATCH 5/5] virtio-net: flow director support
From: Sridhar Samudrala @ 2011-12-06 23:10 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: krkumar2, xma, kvm, virtualization, levinsasha928, netdev,
bhutchings
In-Reply-To: <20111206161422.GA3245@redhat.com>
On 12/6/2011 8:14 AM, Michael S. Tsirkin wrote:
> On Tue, Dec 06, 2011 at 07:42:54AM -0800, Sridhar Samudrala wrote:
>> On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote:
>>> On Tue, Dec 6, 2011 at 10:21 AM, Jason Wang<jasowang@redhat.com> wrote:
>>>> On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote:
>>>>> On Tue, Dec 6, 2011 at 6:33 AM, Jason Wang<jasowang@redhat.com> wrote:
>>>>>> On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote:
>>>>>>> On Mon, Dec 5, 2011 at 8:59 AM, Jason Wang<jasowang@redhat.com>
>>>>>>> wrote:
>>>>> The vcpus are just threads and may not be bound to physical CPUs, so
>>>>> what is the big picture here? Is the guest even in the position to
>>>>> set the best queue mappings today?
>>>> Not sure it could publish the best mapping but the idea is to make sure the
>>>> packets of a flow were handled by the same guest vcpu and may be the same
>>>> vhost thread in order to eliminate the packet reordering and lock
>>>> contention. But this assumption does not take the bouncing of vhost or vcpu
>>>> threads which would also affect the result.
>>> Okay, this is why I'd like to know what the big picture here is. What
>>> solution are you proposing? How are we going to have everything from
>>> guest application, guest kernel, host threads, and host NIC driver
>>> play along so we get the right steering up the entire stack. I think
>>> there needs to be an answer to that before changing virtio-net to add
>>> any steering mechanism.
>>>
>>>
>> Yes. Also the current model of a vhost thread per VM's interface
>> doesn't help with packet steering
>> all the way from the guest to the host physical NIC.
>>
>> I think we need to have vhost thread(s) per-CPU that can handle
>> packets to/from physical NIC's
>> TX/RX queues.
>> Currently we have a single vhost thread for a VM's i/f
>> that handles all the packets from
>> various flows coming from a multi-queue physical NIC.
>>
>> Thanks
>> Sridhar
> It's not hard to try that:
> 1. revert c23f3445e68e1db0e74099f264bc5ff5d55ebdeb
> this will convert our thread to a workqueue
> 2. convert the workqueue to a per-cpu one
>
> It didn't work that well in the past, but YMMV
Yes. I tried this before we went ahead with per-interface vhost
threading model.
At that time, per-cpu vhost showed a regression with a single-VM and
per-vq vhost showed good performance improvements upto 8 VMs.
So just making it per-cpu would not be enough. I think we may need a way
to schedule vcpu threads on the same cpu-socket as vhost.
Another aspect we need to look into is the splitting of vhost thread
into separate
threads for TX and RX. Shirley is doing some work in this area and she
is seeing
perf. improvements as long as TX and RX threads are on the same cpu-socket.
>
> On the surface I'd say a single thread makes some sense
> as long as guest uses a single queue.
>
But this may not be scalable long term when we want to support a large
number of VMs each
having multiple virtio-net interfaces with multiple queues.
Thanks
Sridhar
^ permalink raw reply
* Re: bridge: HSR support
From: Arvid Brodin @ 2011-12-06 23:23 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20111028175421.339b7c49@s6510.linuxnetplumber.net>
Stephen Hemminger wrote:
> On Fri, 28 Oct 2011 17:34:18 +0200
> Arvid Brodin <arvid.brodin@enea.com> wrote:
>
>> Ok, so after a lot of reading and looking through code I have this idea of a
>> standalone solution:
>>
>> 1) Add ioctls to create (and remove) "hsr" netdevs which encapsulates two
>> physical Ethernet interfaces each (somewhat like the bridge code does, but
>> with precisely 2 interfaces slaved).
>
> Please use the newer netlink interface and the master attribute for this
> rather than inventing yet another ioctl.
Is the rtnl interface documented anywhere (the usage of the different IFLA_
flags etc.)? Specifically: how do I use the IFLA_MASTER flag (what's the
meaning of the 32-bit data it wants, and how is it used by the kernel)? I
haven't been very successful figuring this out by looking at the kernel code.
Also, how do I best tell the kernel which my slave devices are when creating
the hsr device? Should I create my own IFLA_HSR_UNSPEC, etc, or can I use some
of the generic flags?
Oh, and the kernel (struct rtnl_link_ops).newlink method has two (struct
nlattr *[]) params: tb and data. What are their roles?
--
Arvid Brodin
Enea Services Stockholm AB
^ permalink raw reply
* atl1c: WARNING: at net/sched/sch_generic.c:255 dev_watchdog
From: Borislav Petkov @ 2011-12-06 23:27 UTC (permalink / raw)
To: netdev; +Cc: LKML
Hi,
this seems like a pretty old issue judging by a quick net search. It
still triggers on latest -rc4 here, below the whole trace. I'm willing
to test patches :).
[14622.820555] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
[14632.816280] ------------[ cut here ]------------
[14632.816314] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x237/0x240()
[14632.816323] Hardware name: 30515QG
[14632.816332] NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out
[14632.816340] Modules linked in: microcode powernow_k8 mperf cpufreq_stats cpufreq_conservative cpufreq_powersave cpufreq_userspace binfmt_misc uinput kvm_amd kvm fuse dm_crypt dm_mod ipv6 vfat fat loop snd_hda_codec_conexant snd_hda_codec_hdmi usbhid cdc_ncm usbnet cdc_wdm cdc_acm arc4 snd_hda_intel snd_hda_codec snd_hwdep rtl8192c_common rtlwifi snd_pcm mac80211 thinkpad_acpi snd_seq snd_timer snd_seq_device radeon ohci_hcd ehci_hcd evdev snd atl1c nvram cfg80211 pcspkr k10temp ttm rfkill soundcore snd_page_alloc video processor drm_kms_helper ac thermal button battery thermal_sys [last unloaded: rtl8192ce]
[14632.816594] Pid: 0, comm: kworker/0:0 Not tainted 3.2.0-rc4+ #32
[14632.816603] Call Trace:
[14632.816611] <IRQ> [<ffffffff8104537f>] warn_slowpath_common+0x7f/0xc0
[14632.816640] [<ffffffff81045476>] warn_slowpath_fmt+0x46/0x50
[14632.816658] [<ffffffff81399087>] dev_watchdog+0x237/0x240
[14632.816673] [<ffffffff81055845>] run_timer_softirq+0x195/0x4e0
[14632.816687] [<ffffffff810557af>] ? run_timer_softirq+0xff/0x4e0
[14632.816700] [<ffffffff81398e50>] ? pfifo_fast_init+0xa0/0xa0
[14632.816716] [<ffffffff8104c935>] __do_softirq+0xc5/0x290
[14632.816730] [<ffffffff81078644>] ? clockevents_program_event+0x74/0x100
[14632.816746] [<ffffffff8142692c>] call_softirq+0x1c/0x30
[14632.816760] [<ffffffff81003d75>] do_softirq+0x85/0xc0
[14632.816773] [<ffffffff8104ce36>] irq_exit+0x96/0xe0
[14632.816786] [<ffffffff81426fab>] smp_apic_timer_interrupt+0x6b/0x98
[14632.816799] [<ffffffff814260b0>] apic_timer_interrupt+0x70/0x80
[14632.816807] <EOI> [<ffffffff81009f96>] ? native_sched_clock+0x26/0x70
[14632.816842] [<ffffffffa005f160>] ? acpi_idle_enter_simple+0xd2/0x114 [processor]
[14632.816863] [<ffffffffa005f165>] ? acpi_idle_enter_simple+0xd7/0x114 [processor]
[14632.816884] [<ffffffffa005f160>] ? acpi_idle_enter_simple+0xd2/0x114 [processor]
[14632.816902] [<ffffffff813591cc>] cpuidle_idle_call+0xcc/0x240
[14632.816915] [<ffffffff8100097b>] ? cpu_idle+0xbb/0x130
[14632.816932] [<ffffffff8100098f>] cpu_idle+0xcf/0x130
[14632.816946] [<ffffffff814152ec>] start_secondary+0x1fc/0x203
[14632.816958] ---[ end trace 48e9f392fdd335fa ]---
[14632.842367] atl1c 0000:02:00.0: irq 44 for MSI/MSI-X
[14632.842649] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
Thanks.
--
Regards/Gruss,
Boris.
^ permalink raw reply
* Re: bridge: HSR support
From: Stephen Hemminger @ 2011-12-06 23:27 UTC (permalink / raw)
To: Arvid Brodin; +Cc: netdev
In-Reply-To: <4EDEA3E9.3070004@enea.com>
On Wed, 7 Dec 2011 00:23:21 +0100
Arvid Brodin <arvid.brodin@enea.com> wrote:
> Stephen Hemminger wrote:
> > On Fri, 28 Oct 2011 17:34:18 +0200
> > Arvid Brodin <arvid.brodin@enea.com> wrote:
> >
> >> Ok, so after a lot of reading and looking through code I have this idea of a
> >> standalone solution:
> >>
> >> 1) Add ioctls to create (and remove) "hsr" netdevs which encapsulates two
> >> physical Ethernet interfaces each (somewhat like the bridge code does, but
> >> with precisely 2 interfaces slaved).
> >
> > Please use the newer netlink interface and the master attribute for this
> > rather than inventing yet another ioctl.
>
>
> Is the rtnl interface documented anywhere (the usage of the different IFLA_
> flags etc.)? Specifically: how do I use the IFLA_MASTER flag (what's the
> meaning of the 32-bit data it wants, and how is it used by the kernel)? I
> haven't been very successful figuring this out by looking at the kernel code.
Look at bridging or bonding. the u32 is the ifindex of the master device (ie
where packets are being forwarded to).
>
> Also, how do I best tell the kernel which my slave devices are when creating
> the hsr device? Should I create my own IFLA_HSR_UNSPEC, etc, or can I use some
> of the generic flags?
Look at macvlan, vlan, or bridging. There this is done by processing a newlink
message.
> Oh, and the kernel (struct rtnl_link_ops).newlink method has two (struct
> nlattr *[]) params: tb and data. What are their roles?
>
>
^ permalink raw reply
* Re: v6: faster tree-based sysctl implementation
From: Anca Emanuel @ 2011-12-06 23:42 UTC (permalink / raw)
To: Lucian Adrian Grijincu
Cc: Eric W . Biederman, linux-kernel, netdev, Octavian Purdila,
David S . Miller, Alexey Dobriyan, Damien Millescamps
In-Reply-To: <CAPLs8y8vhioqc3CPrD7ugmVkR2DjKWNm8+T5j9QQnrxi=BgvdA@mail.gmail.com>
On Tue, Dec 6, 2011 at 4:33 PM, Lucian Adrian Grijincu
<lucian.grijincu@gmail.com> wrote:
> Sysctl uses a slow algorithm: O(N^2) for insertions, O(N) for lookup,
> with a relatively big constant.
> The performance is acceptable when N is small, but sometimes it can
> grow to bigger values.
> One case where N can grow to very large values is when you add network
> interfaces.
>
[snip]
>
> This algorithm is O(N * logN) for insert and O(logN) for lookup.
>
>
>> You add more code. This is not good. If you reduce the code, then it
>> will be interesting.
>
> Thank you. I know that, but it's easier said than done. I'd welcome
> some feedback in what could be simplified in my patches :)
>From an "airplane view" you can make the algorithms generic, and find
other places in kernel that can use them.
If you do that, I am sure you will get the attention.
^ permalink raw reply
* Re: v6: faster tree-based sysctl implementation
From: Anca Emanuel @ 2011-12-07 0:08 UTC (permalink / raw)
To: Lucian Adrian Grijincu
Cc: Eric W . Biederman, linux-kernel, netdev, Octavian Purdila,
David S . Miller, Alexey Dobriyan, Damien Millescamps,
Stephen Rothwell
In-Reply-To: <CAJL_dMtvgnZHH0uLE3j7Mg2Xqwt2rd90Uy0pUxm6muPmjFbkQg@mail.gmail.com>
You can ask Stephen Rothwell to include your tree in next.
git://github.com/luciang/linux-2.6-new-sysctl.git v6-new-sysctl-alg
^ permalink raw reply
* Re: atl1c: WARNING: at net/sched/sch_generic.c:255 dev_watchdog
From: Josh Boyer @ 2011-12-07 0:12 UTC (permalink / raw)
To: Borislav Petkov, netdev, LKML
In-Reply-To: <20111206232741.GA5368@x1.osrc.amd.com>
On Tue, Dec 6, 2011 at 6:27 PM, Borislav Petkov <bp@alien8.de> wrote:
> Hi,
>
> this seems like a pretty old issue judging by a quick net search. It
> still triggers on latest -rc4 here, below the whole trace. I'm willing
> to test patches :).
>
> [14622.820555] atl1c 0000:02:00.0: atl1c: eth0 NIC Link is Up<100 Mbps Full Duplex>
> [14632.816280] ------------[ cut here ]------------
> [14632.816314] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x237/0x240()
> [14632.816323] Hardware name: 30515QG
> [14632.816332] NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out
Matthew Garrett has a patch to the atl1c driver that changed it's ASPM
behavior that seemed to help. Dave Miller applied it, but I don't see
it in linux-next for some reason.
http://comments.gmane.org/gmane.linux.kernel/1214694
josh
^ permalink raw reply
* (unknown),
From: Mr.Vincent Cheng @ 2011-12-07 0:24 UTC (permalink / raw)
I am Mr.Vincent Cheng, GBS, JP Chairman of the Hong Kong and Shanghai
BankingCorporation Limited. I have a business proposal of USD
$10,500,000.00. Your
earliest response to this letter will be appreciated, upon the confirmation
of your response all further details and document will be issued to you.
Endeavour to let me know your decision rather than keep me waiting
Email:vincentcheng048@yahoo.co.jp
Best Regards,
Mr.Vincent Cheng
^ 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