Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH v3 net-next 4/4] filter: add minimal BPF JIT emitted image disassembler
From: David Miller @ 2013-03-20 17:17 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, eric.dumazet, edumazet
In-Reply-To: <1363711172-9728-5-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 19 Mar 2013 17:39:32 +0100

> This is a minimal stand-alone user space helper, that allows for debugging or
> verification of emitted BPF JIT images.

As Ben Hutchings suggested, please respin this such that the tool
goes somewhere under tools/

Creating a tools/net/ subdirectory for small programs like this is
fine.

Thanks!

^ permalink raw reply

* Re: [PATCH v3 net-next 3/4] filter: add ANC_PAY_OFFSET instruction for loading payload start offset
From: David Miller @ 2013-03-20 17:16 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, eric.dumazet
In-Reply-To: <1363711172-9728-4-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 19 Mar 2013 17:39:31 +0100

> It is very useful to do dynamic truncation of packets. In particular,
> we're interested to push the necessary header bytes to the user space and
> cut off user payload that should probably not be transferred for some reasons
> (e.g. privacy, speed, or others). With the ancillary extension PAY_OFFSET,
> we can load it into the accumulator, and return it. E.g. in bpfc syntax ...
> 
>         ld #poff        ; { 0x20, 0, 0, 0xfffff034 },
>         ret a           ; { 0x16, 0, 0, 0x00000000 },
> 
> ... as a filter will accomplish this without having to do a big hackery in
> a BPF filter itself. Follow-up JIT implementations are welcome.
> 
> Thanks to Eric Dumazet for suggesting and discussing this during the
> Netfilter Workshop in Copenhagen.
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH v3 net-next 2/4] net: flow_dissector: add __skb_get_poff to get a start offset to payload
From: David Miller @ 2013-03-20 17:16 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, eric.dumazet
In-Reply-To: <1363711172-9728-3-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 19 Mar 2013 17:39:30 +0100

> __skb_get_poff() returns the offset to the payload as far as it could
> be dissected. The main user is currently BPF, so that we can dynamically
> truncate packets without needing to push actual payload to the user
> space and instead can analyze headers only.
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/1]core:Change a wrong explain about dev_get_by_name
From: Ben Hutchings @ 2013-03-20 17:10 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: tingwei liu, netdev, Alexey Kuznetsov, davem
In-Reply-To: <1363793549.3333.12.camel@edumazet-glaptop>

On Wed, 2013-03-20 at 08:32 -0700, Eric Dumazet wrote:
> On Wed, 2013-03-20 at 17:33 +0800, tingwei liu wrote:
> > From 5d787e8c3725efa6af3036eeb52aba1905c70de9 Mon Sep 17 00:00:00 2001
> > From: root <root@linux-19.site>
> > Date: Wed, 20 Mar 2013 17:39:59 +0800
> > Subject: [PATCH] Change a wrong explain about dev_get_by_name
> > 
> 
> No changelog ? This patch really needs a changelog.
> 
> I have no idea why we should document this function being not safe in
> irq context.
> 
> Most part of networking stack is non safe in hard irq context.
> 
> Should we add a comment in front of all possible entry points ?

If they are wrongly documented as 'can be called from any context', yes.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply

* trinity fuzz-tester mailing list.
From: Dave Jones @ 2013-03-20 16:37 UTC (permalink / raw)
  To: Linux Kernel; +Cc: netdev, linux-mm

I've been getting enough private mail about the trinity fuzz-tester that
there needs to be some coordination between people patching the same code etc.

To this end, there's now a mailing list..

Send a mail with 'subscribe trinity' in the body to majordomo@vger.kernel.org to subscribe.

My thanks to the folks at vger for hosting it, so I don't have to.

	Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCH] dynticks: avoid flow_cache_flush() interrupting every core
From: Frederic Weisbecker @ 2013-03-20 16:37 UTC (permalink / raw)
  To: David Miller
  Cc: cmetcalf, netdev, linux-kernel, gilad, sasha.levin, akpm, paulmck,
	yoshfuji
In-Reply-To: <20130320.121704.1797978839297064162.davem@davemloft.net>

2013/3/20 David Miller <davem@davemloft.net>:
> From: Chris Metcalf <cmetcalf@tilera.com>
> Date: Tue, 19 Mar 2013 17:35:58 -0400
>
>> Previously, if you did an "ifconfig down" or similar on one core, and
>> the kernel had CONFIG_XFRM enabled, every core would be interrupted to
>> check its percpu flow list for items that could be garbage collected.
>>
>> With this change, we generate a mask of cores that actually have any
>> percpu items, and only interrupt those cores.  When we are trying to
>> isolate a set of cpus from interrupts, this is important to do.
>>
>> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
>> ---
>> This change stands alone so could be taken into the net tree if
>> desired, but it is most useful in the context of Frederic Weisbecker's
>> linux-dynticks work.  So it could be taken up through either tree,
>> but it certainly needs sign-off from someone familiar with net/core/flow.c.
>
> I'm find with this going into the dynticks changes:
>
> Acked-by: David S. Miller <davem@davemloft.net>

At it looks pretty self-contained, can that perhaps go through the
networking tree?

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: fix psock_fanout selftest hash collision
From: David Miller @ 2013-03-20 16:33 UTC (permalink / raw)
  To: willemb; +Cc: netdev
In-Reply-To: <1363761764-4374-1-git-send-email-willemb@google.com>

From: Willem de Bruijn <willemb@google.com>
Date: Wed, 20 Mar 2013 02:42:44 -0400

> Fix flaky results with PACKET_FANOUT_HASH depending on whether the
> two flows hash into the same packet socket or not.
> 
> Also adds tests for PACKET_FANOUT_LB and PACKET_FANOUT_CPU and
> replaces the counting method with a packet ring.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Applied, thanks.  I'll retest on my sparc64 box later today.

^ permalink raw reply

* [PATCH] chelsio: add headroom in RX path
From: Eric Dumazet @ 2013-03-20 16:33 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

Drivers should reserve some headroom in skb used in receive path,
to avoid future head reallocation.

One possible way to do that is to use dev_alloc_skb() instead
of alloc_skb(), so that NET_SKB_PAD bytes are reserved.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 drivers/net/ethernet/chelsio/cxgb/sge.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 4829769..89bef50 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -835,7 +835,7 @@ static void refill_free_list(struct sge *sge, struct freelQ *q)
 		struct sk_buff *skb;
 		dma_addr_t mapping;
 
-		skb = alloc_skb(q->rx_buffer_size, GFP_ATOMIC);
+		skb = dev_alloc_skb(q->rx_buffer_size);
 		if (!skb)
 			break;
 

^ permalink raw reply related

* Re: [PATCH] net: fec: Define indexes as 'unsigned int'
From: David Miller @ 2013-03-20 16:29 UTC (permalink / raw)
  To: festevam; +Cc: netdev, fabio.estevam
In-Reply-To: <1363793467-18860-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <festevam@gmail.com>
Date: Wed, 20 Mar 2013 12:31:07 -0300

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Fix the following warnings that happen when building with W=1 option:
> 
> drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_free_buffers':
> drivers/net/ethernet/freescale/fec.c:1337:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_alloc_buffers':
> drivers/net/ethernet/freescale/fec.c:1361:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_init':
> drivers/net/ethernet/freescale/fec.c:1631:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied, thanks.

^ permalink raw reply

* [PATCH net-next] bnx2x: AER revised
From: Yuval Mintz @ 2013-03-20 15:21 UTC (permalink / raw)
  To: davem, netdev; +Cc: eilong, Yuval Mintz, Ariel Elior

Revised bnx2x implementation of PCI Express Advanced Error Recovery -
stop and free driver resources according to the AER flow (instead of the
currently implemented `hope-for-the-best' release approach), and do not make
any assumptions on the HW state after slot reset.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
---
Hi Dave,

Please apply this patch to `net-next'.

Thanks,
Yuval
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h      |   3 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c  |   4 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h  |   4 +
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 149 +++++++++++++++++++----
 4 files changed, 130 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index a4729c7..c59da2d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1226,10 +1226,11 @@ enum {
 
 
 struct bnx2x_prev_path_list {
+	struct list_head list;
 	u8 bus;
 	u8 slot;
 	u8 path;
-	struct list_head list;
+	u8 aer;
 	u8 undi;
 };
 
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 8091de7..6f8a81c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2010,7 +2010,7 @@ static int bnx2x_init_hw(struct bnx2x *bp, u32 load_code)
  * Cleans the object that have internal lists without sending
  * ramrods. Should be run when interrutps are disabled.
  */
-static void bnx2x_squeeze_objects(struct bnx2x *bp)
+void bnx2x_squeeze_objects(struct bnx2x *bp)
 {
 	int rc;
 	unsigned long ramrod_flags = 0, vlan_mac_flags = 0;
@@ -2774,7 +2774,7 @@ load_error0:
 #endif /* ! BNX2X_STOP_ON_ERROR */
 }
 
-static int bnx2x_drain_tx_queues(struct bnx2x *bp)
+int bnx2x_drain_tx_queues(struct bnx2x *bp)
 {
 	u8 rc = 0, cos, i;
 
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index f9098d8..54e1b14 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1402,4 +1402,8 @@ static inline bool bnx2x_is_valid_ether_addr(struct bnx2x *bp, u8 *addr)
  *
  */
 void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len);
+
+int bnx2x_drain_tx_queues(struct bnx2x *bp);
+void bnx2x_squeeze_objects(struct bnx2x *bp);
+
 #endif /* BNX2X_CMN_H */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 4902d1e..10b0748 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9718,6 +9718,31 @@ static struct bnx2x_prev_path_list *
 	return NULL;
 }
 
+static int bnx2x_prev_path_mark_eeh(struct bnx2x *bp)
+{
+	struct bnx2x_prev_path_list *tmp_list;
+	int rc;
+
+	rc = down_interruptible(&bnx2x_prev_sem);
+	if (rc) {
+		BNX2X_ERR("Received %d when tried to take lock\n", rc);
+		return rc;
+	}
+
+	tmp_list = bnx2x_prev_path_get_entry(bp);
+	if (tmp_list) {
+		tmp_list->aer = 1;
+		rc = 0;
+	} else {
+		BNX2X_ERR("path %d: Entry does not exist for eeh; Flow occurs before initial insmod is over ?\n",
+			  BP_PATH(bp));
+	}
+
+	up(&bnx2x_prev_sem);
+
+	return rc;
+}
+
 static bool bnx2x_prev_is_path_marked(struct bnx2x *bp)
 {
 	struct bnx2x_prev_path_list *tmp_list;
@@ -9726,14 +9751,15 @@ static bool bnx2x_prev_is_path_marked(struct bnx2x *bp)
 	if (down_trylock(&bnx2x_prev_sem))
 		return false;
 
-	list_for_each_entry(tmp_list, &bnx2x_prev_list, list) {
-		if (PCI_SLOT(bp->pdev->devfn) == tmp_list->slot &&
-		    bp->pdev->bus->number == tmp_list->bus &&
-		    BP_PATH(bp) == tmp_list->path) {
+	tmp_list = bnx2x_prev_path_get_entry(bp);
+	if (tmp_list) {
+		if (tmp_list->aer) {
+			DP(NETIF_MSG_HW, "Path %d was marked by AER\n",
+			   BP_PATH(bp));
+		} else {
 			rc = true;
 			BNX2X_DEV_INFO("Path %d was already cleaned from previous drivers\n",
 				       BP_PATH(bp));
-			break;
 		}
 	}
 
@@ -9747,6 +9773,28 @@ static int bnx2x_prev_mark_path(struct bnx2x *bp, bool after_undi)
 	struct bnx2x_prev_path_list *tmp_list;
 	int rc;
 
+	rc = down_interruptible(&bnx2x_prev_sem);
+	if (rc) {
+		BNX2X_ERR("Received %d when tried to take lock\n", rc);
+		return rc;
+	}
+
+	/* Check whether the entry for this path already exists */
+	tmp_list = bnx2x_prev_path_get_entry(bp);
+	if (tmp_list) {
+		if (!tmp_list->aer) {
+			BNX2X_ERR("Re-Marking the path.\n");
+		} else {
+			DP(NETIF_MSG_HW, "Removing AER indication from path %d\n",
+			   BP_PATH(bp));
+			tmp_list->aer = 0;
+		}
+		up(&bnx2x_prev_sem);
+		return 0;
+	}
+	up(&bnx2x_prev_sem);
+
+	/* Create an entry for this path and add it */
 	tmp_list = kmalloc(sizeof(struct bnx2x_prev_path_list), GFP_KERNEL);
 	if (!tmp_list) {
 		BNX2X_ERR("Failed to allocate 'bnx2x_prev_path_list'\n");
@@ -9756,6 +9804,7 @@ static int bnx2x_prev_mark_path(struct bnx2x *bp, bool after_undi)
 	tmp_list->bus = bp->pdev->bus->number;
 	tmp_list->slot = PCI_SLOT(bp->pdev->devfn);
 	tmp_list->path = BP_PATH(bp);
+	tmp_list->aer = 0;
 	tmp_list->undi = after_undi ? (1 << BP_PORT(bp)) : 0;
 
 	rc = down_interruptible(&bnx2x_prev_sem);
@@ -9763,8 +9812,8 @@ static int bnx2x_prev_mark_path(struct bnx2x *bp, bool after_undi)
 		BNX2X_ERR("Received %d when tried to take lock\n", rc);
 		kfree(tmp_list);
 	} else {
-		BNX2X_DEV_INFO("Marked path [%d] - finished previous unload\n",
-				BP_PATH(bp));
+		DP(NETIF_MSG_HW, "Marked path [%d] - finished previous unload\n",
+		   BP_PATH(bp));
 		list_add(&tmp_list->list, &bnx2x_prev_list);
 		up(&bnx2x_prev_sem);
 	}
@@ -10003,6 +10052,7 @@ static int bnx2x_prev_unload(struct bnx2x *bp)
 	}
 
 	do {
+		int aer = 0;
 		/* Lock MCP using an unload request */
 		fw = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS, 0);
 		if (!fw) {
@@ -10011,7 +10061,18 @@ static int bnx2x_prev_unload(struct bnx2x *bp)
 			break;
 		}
 
-		if (fw == FW_MSG_CODE_DRV_UNLOAD_COMMON) {
+		rc = down_interruptible(&bnx2x_prev_sem);
+		if (rc) {
+			BNX2X_ERR("Cannot check for AER; Received %d when tried to take lock\n",
+				  rc);
+		} else {
+			/* If Path is marked by EEH, ignore unload status */
+			aer = !!(bnx2x_prev_path_get_entry(bp) &&
+				 bnx2x_prev_path_get_entry(bp)->aer);
+		}
+		up(&bnx2x_prev_sem);
+
+		if (fw == FW_MSG_CODE_DRV_UNLOAD_COMMON || aer) {
 			rc = bnx2x_prev_unload_common(bp);
 			break;
 		}
@@ -12632,9 +12693,7 @@ static void bnx2x_remove_one(struct pci_dev *pdev)
 
 static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
 {
-	int i;
-
-	bp->state = BNX2X_STATE_ERROR;
+	bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT;
 
 	bp->rx_mode = BNX2X_RX_MODE_NONE;
 
@@ -12643,29 +12702,21 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
 
 	/* Stop Tx */
 	bnx2x_tx_disable(bp);
-
-	bnx2x_netif_stop(bp, 0);
 	/* Delete all NAPI objects */
 	bnx2x_del_all_napi(bp);
 	if (CNIC_LOADED(bp))
 		bnx2x_del_all_napi_cnic(bp);
+	netdev_reset_tc(bp->dev);
 
 	del_timer_sync(&bp->timer);
+	cancel_delayed_work(&bp->sp_task);
+	cancel_delayed_work(&bp->period_task);
 
-	bnx2x_stats_handle(bp, STATS_EVENT_STOP);
-
-	/* Release IRQs */
-	bnx2x_free_irq(bp);
-
-	/* Free SKBs, SGEs, TPA pool and driver internals */
-	bnx2x_free_skbs(bp);
-
-	for_each_rx_queue(bp, i)
-		bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
-
-	bnx2x_free_mem(bp);
+	spin_lock_bh(&bp->stats_lock);
+	bp->stats_state = STATS_STATE_DISABLED;
+	spin_unlock_bh(&bp->stats_lock);
 
-	bp->state = BNX2X_STATE_CLOSED;
+	bnx2x_save_statistics(bp);
 
 	netif_carrier_off(bp->dev);
 
@@ -12701,6 +12752,8 @@ static pci_ers_result_t bnx2x_io_error_detected(struct pci_dev *pdev,
 
 	rtnl_lock();
 
+	BNX2X_ERR("IO error detected\n");
+
 	netif_device_detach(dev);
 
 	if (state == pci_channel_io_perm_failure) {
@@ -12711,6 +12764,8 @@ static pci_ers_result_t bnx2x_io_error_detected(struct pci_dev *pdev,
 	if (netif_running(dev))
 		bnx2x_eeh_nic_unload(bp);
 
+	bnx2x_prev_path_mark_eeh(bp);
+
 	pci_disable_device(pdev);
 
 	rtnl_unlock();
@@ -12729,9 +12784,10 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct bnx2x *bp = netdev_priv(dev);
+	int i;
 
 	rtnl_lock();
-
+	BNX2X_ERR("IO slot reset initializing...\n");
 	if (pci_enable_device(pdev)) {
 		dev_err(&pdev->dev,
 			"Cannot re-enable PCI device after reset\n");
@@ -12745,6 +12801,42 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
 	if (netif_running(dev))
 		bnx2x_set_power_state(bp, PCI_D0);
 
+	if (netif_running(dev)) {
+		BNX2X_ERR("IO slot reset --> driver unload\n");
+		if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) {
+			u32 v;
+
+			v = SHMEM2_RD(bp,
+				      drv_capabilities_flag[BP_FW_MB_IDX(bp)]);
+			SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)],
+				  v & ~DRV_FLAGS_CAPABILITIES_LOADED_L2);
+		}
+		bnx2x_drain_tx_queues(bp);
+		bnx2x_send_unload_req(bp, UNLOAD_RECOVERY);
+		bnx2x_netif_stop(bp, 1);
+		bnx2x_free_irq(bp);
+
+		/* Report UNLOAD_DONE to MCP */
+		bnx2x_send_unload_done(bp, true);
+
+		bp->sp_state = 0;
+		bp->port.pmf = 0;
+
+		bnx2x_prev_unload(bp);
+
+		/* We should have resetted the engine, so It's fair to
+		 * assume the FW will no longer write to the bnx2x driver.
+		 */
+		bnx2x_squeeze_objects(bp);
+		bnx2x_free_skbs(bp);
+		for_each_rx_queue(bp, i)
+			bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE);
+		bnx2x_free_fp_mem(bp);
+		bnx2x_free_mem(bp);
+
+		bp->state = BNX2X_STATE_CLOSED;
+	}
+
 	rtnl_unlock();
 
 	return PCI_ERS_RESULT_RECOVERED;
@@ -12771,6 +12863,9 @@ static void bnx2x_io_resume(struct pci_dev *pdev)
 
 	bnx2x_eeh_recover(bp);
 
+	bp->fw_seq = SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) &
+							DRV_MSG_SEQ_NUMBER_MASK;
+
 	if (netif_running(dev))
 		bnx2x_nic_load(bp, LOAD_NORMAL);
 
-- 
1.8.1.227.g44fe835

^ permalink raw reply related

* Re: [PATCH 2/2] sh_eth: check TSU registers ioremap() error
From: David Miller @ 2013-03-20 16:23 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj
In-Reply-To: <201303200241.33137.sergei.shtylyov@cogentembedded.com>

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 20 Mar 2013 02:41:32 +0300

> One must check the result of ioremap() -- in this case it prevents potential
> kernel oops when initializing TSU registers further on...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH 1/2] sh_eth: fix bitbang memory leak
From: David Miller @ 2013-03-20 16:23 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj
In-Reply-To: <201303200240.23975.sergei.shtylyov@cogentembedded.com>

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 20 Mar 2013 02:40:23 +0300

> sh_mdio_init() allocates pointer to 'struct bb_info' but only stores it locally,
> so that sh_mdio_release() can't free it on driver unload.  Add the pointer to
> 'struct bb_info' to 'struct sh_eth_private', so that sh_mdio_init() can save
> 'bitbang' variable for sh_mdio_release() to be able to free it later...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH] net/irda: add missing error path release_sock call
From: David Miller @ 2013-03-20 16:23 UTC (permalink / raw)
  To: keescook; +Cc: linux-kernel, samuel, netdev, spender
In-Reply-To: <20130320151924.GA4955@www.outflux.net>

From: Kees Cook <keescook@chromium.org>
Date: Wed, 20 Mar 2013 08:19:24 -0700

> This makes sure that release_sock is called for all error conditions in
> irda_getsockopt.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Reported-by: Brad Spengler <spender@grsecurity.net>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] net: ethernet: davinci_emac: make local function emac_poll_controller() static
From: Mugunthan V N @ 2013-03-20 16:22 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: jiri-rHqAuBHg3fBzbRFIqnYvSA, netdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <CAPgLHd8=u1jepO+Z0HExYyyybaYtVcdqk0yhtmnLUieUhEGLTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 3/20/2013 8:31 PM, Wei Yongjun wrote:
> From: Wei Yongjun<yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> emac_poll_controller() was not declared. It should be static.
>
> Signed-off-by: Wei Yongjun<yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
Acked-by: Mugunthan V N <mugunthanvnm-l0cyMroinI0@public.gmane.org>

Regards
Mugunthan V N

^ permalink raw reply

* Re: [PATCH -next] openvswitch: fix error return code in ovs_vport_cmd_set()
From: David Miller @ 2013-03-20 16:22 UTC (permalink / raw)
  To: jesse; +Cc: weiyj.lk, yongjun_wei, dev, netdev
In-Reply-To: <CAEP_g=8zxp4jcNN93iEGzA2aNbmM7g+=PaWbTEyJiwzwS5Qnsg@mail.gmail.com>

From: Jesse Gross <jesse@nicira.com>
Date: Wed, 20 Mar 2013 08:57:53 -0700

> On Wed, Mar 20, 2013 at 5:14 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Fix to return a negative error code from the error handling
>> case instead of 0, as returned elsewhere in this function.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> This isn't right because at this point in the function the change has
> already been made, only the notification allocation failed.  Therefore
> we don't want to return an error since the caller will assume that
> nothing has changed; instead an error is set on the Netlink socket.

Then the way to fix this is to allocate the netlink SKB first, before
any config changes occur, then pass that SKB into ovs_vport_cmd_build_info.

We can still get errors, for -EMSGSIZE situations, but I'd say that'd
be an implementation bug that should be logged.  If we aren't allocating
large enough SKBs for the netlink reply, that's really an internal
error.

^ permalink raw reply

* Re: [PATCH -next] lpc_eth: fix error return code in lpc_eth_drv_probe()
From: David Miller @ 2013-03-20 16:19 UTC (permalink / raw)
  To: weiyj.lk
  Cc: grant.likely, rob.herring, stigge, edumazet, gregkh, jiri,
	yongjun_wei, netdev, devicetree-discuss
In-Reply-To: <CAPgLHd-49BjXc1pwxhSCExNwTuM9rg4Yj6A2PyqnUq=fgm3YKA@mail.gmail.com>

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Wed, 20 Mar 2013 20:21:48 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] dynticks: avoid flow_cache_flush() interrupting every core
From: David Miller @ 2013-03-20 16:17 UTC (permalink / raw)
  To: cmetcalf
  Cc: netdev, linux-kernel, fweisbec, gilad, sasha.levin, akpm, paulmck,
	yoshfuji
In-Reply-To: <201303192143.r2JLhZIX020469@farm-0021.internal.tilera.com>

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Tue, 19 Mar 2013 17:35:58 -0400

> Previously, if you did an "ifconfig down" or similar on one core, and
> the kernel had CONFIG_XFRM enabled, every core would be interrupted to
> check its percpu flow list for items that could be garbage collected.
> 
> With this change, we generate a mask of cores that actually have any
> percpu items, and only interrupt those cores.  When we are trying to
> isolate a set of cpus from interrupts, this is important to do.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
> ---
> This change stands alone so could be taken into the net tree if
> desired, but it is most useful in the context of Frederic Weisbecker's
> linux-dynticks work.  So it could be taken up through either tree,
> but it certainly needs sign-off from someone familiar with net/core/flow.c.

I'm find with this going into the dynticks changes:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH] NET: ipconfig: Fix newline handling in log message.
From: David Miller @ 2013-03-20 16:16 UTC (permalink / raw)
  To: mfuzzey; +Cc: netdev
In-Reply-To: <20130319181929.10606.24517.stgit@localhost>

From: Martin Fuzzey <mfuzzey@parkeon.com>
Date: Tue, 19 Mar 2013 19:19:29 +0100

> When using ipconfig the logs currently look like:
> 
> Single name server:
> [    3.467270] IP-Config: Complete:
> [    3.470613]      device=eth0, hwaddr=ac:de:48:00:00:01, ipaddr=172.16.42.2, mask=255.255.255.0, gw=172.16.42.1
> [    3.480670]      host=infigo-1, domain=, nis-domain=(none)
> [    3.486166]      bootserver=172.16.42.1, rootserver=172.16.42.1, rootpath=
> [    3.492910]      nameserver0=172.16.42.1[    3.496853] ALSA device list:
> 
> Three name servers:
> [    3.496949] IP-Config: Complete:
> [    3.500293]      device=eth0, hwaddr=ac:de:48:00:00:01, ipaddr=172.16.42.2, mask=255.255.255.0, gw=172.16.42.1
> [    3.510367]      host=infigo-1, domain=, nis-domain=(none)
> [    3.515864]      bootserver=172.16.42.1, rootserver=172.16.42.1, rootpath=
> [    3.522635]      nameserver0=172.16.42.1, nameserver1=172.16.42.100
> [    3.529149] , nameserver2=172.16.42.200
> 
> Fix newline handling for these cases
> 
> Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3 net-next 1/4] flow_keys: include thoff into flow_keys for later usage
From: David Miller @ 2013-03-20 16:15 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, eric.dumazet
In-Reply-To: <1363711172-9728-2-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 19 Mar 2013 17:39:29 +0100

> In skb_flow_dissect(), we perform a dissection of a skbuff. Since we're
> doing the work here anyway, also store thoff for a later usage, e.g. in
> the BPF filter.
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
>  This patch also needs to go into the net tree, since Eric or Jason will
>  post a bug fix on top of this one.

Applied to 'net', thanks Daniel.

^ permalink raw reply

* Re: [PATCH 00/12] l2tp bugfix patchset
From: David Miller @ 2013-03-20 16:14 UTC (permalink / raw)
  To: tparkin; +Cc: netdev
In-Reply-To: <1363709483-24021-1-git-send-email-tparkin@katalix.com>

From: Tom Parkin <tparkin@katalix.com>
Date: Tue, 19 Mar 2013 16:11:11 +0000

> This l2tp bugfix patchset addresses a number of issues.
> 
> The first five patches in the series prevent l2tp sessions pinning an l2tp
> tunnel open.  This occurs because the l2tp tunnel is torn down in the tunnel
> socket destructor, but each session holds a tunnel socket reference which
> prevents tunnels with sessions being deleted.  The solution I've implemented
> here involves adding a .destroy hook to udp code, as discussed previously on
> netdev[1].
> 
> The subsequent seven patches address futher bugs exposed by fixing the problem
> above, or exposed through stress testing the implementation above.  Patch 11
> (avoid deadlock in l2tp stats update) isn't directly related to tunnel/session
> lifetimes, but it does prevent deadlocks on i386 kernels running on 64 bit
> hardware.
> 
> This patchset has been tested on 32 and 64 bit preempt/non-preempt kernels,
> using iproute2, openl2tp, and custom-made stress test code.
> 
> [1] http://comments.gmane.org/gmane.linux.network/259169

All applied, thanks for fixing all of these bugs Tom.

^ permalink raw reply

* Re: [PATCH 5/5] net: mdio-octeon: Use module_platform_driver()
From: David Daney @ 2013-03-20 16:12 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: netdev, davem, David Daney
In-Reply-To: <1363779692-4395-5-git-send-email-sachin.kamat@linaro.org>

On 03/20/2013 04:41 AM, Sachin Kamat wrote:
> module_platform_driver macro removes some boilerplate and
> simplifies the code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: David Daney <ddaney@caviumnetworks.com>

I was going to send the equivalent patch.

Acked-by: David Daney <ddaney@caviumnetworks.com>


> ---
>   drivers/net/phy/mdio-octeon.c |   13 +------------
>   1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
> index 09297fe..c2c878d 100644
> --- a/drivers/net/phy/mdio-octeon.c
> +++ b/drivers/net/phy/mdio-octeon.c
> @@ -197,18 +197,7 @@ void octeon_mdiobus_force_mod_depencency(void)
>   }
>   EXPORT_SYMBOL(octeon_mdiobus_force_mod_depencency);
>
> -static int __init octeon_mdiobus_mod_init(void)
> -{
> -	return platform_driver_register(&octeon_mdiobus_driver);
> -}
> -
> -static void __exit octeon_mdiobus_mod_exit(void)
> -{
> -	platform_driver_unregister(&octeon_mdiobus_driver);
> -}
> -
> -module_init(octeon_mdiobus_mod_init);
> -module_exit(octeon_mdiobus_mod_exit);
> +module_platform_driver(octeon_mdiobus_driver);
>
>   MODULE_DESCRIPTION(DRV_DESCRIPTION);
>   MODULE_VERSION(DRV_VERSION);
>

^ permalink raw reply

* Re: [PATCH 2/2] thermal: shorten too long mcast group name
From: David Miller @ 2013-03-20 16:08 UTC (permalink / raw)
  To: yamato; +Cc: netdev
In-Reply-To: <1363693648-10015-3-git-send-email-yamato@redhat.com>

From: Masatake YAMATO <yamato@redhat.com>
Date: Tue, 19 Mar 2013 20:47:28 +0900

> The original name is too long.
> 
> Signed-off-by: Masatake YAMATO <yamato@redhat.com>

This change needs to go in via the Thermal driver maintainers.

^ permalink raw reply

* Re: [PATCH 1/2] genetlink: trigger BUG_ON if a group name is too long
From: David Miller @ 2013-03-20 16:07 UTC (permalink / raw)
  To: yamato; +Cc: netdev
In-Reply-To: <1363693648-10015-2-git-send-email-yamato@redhat.com>

From: Masatake YAMATO <yamato@redhat.com>
Date: Tue, 19 Mar 2013 20:47:27 +0900

> Trigger BUG_ON if a group name is longer than GENL_NAMSIZ.
> 
> Signed-off-by: Masatake YAMATO <yamato@redhat.com>

Applied, thanks.

Although I'm disappointed that the compiler doesn't say anything about
this in the assignment.

We're assigning "char[16] = STRING" and it doesn't say anything if the
final NULL char doesn't fit into the array.

^ permalink raw reply

* Re: [PATCH v3 1/1 net-next] NET: FEC: dynamtic check DMA desc buff type
From: Uwe Kleine-König @ 2013-03-20 16:04 UTC (permalink / raw)
  To: Frank Li
  Cc: lznuaa, davem, s.hauer, netdev, shawn.guo, linux-arm-kernel,
	kernel
In-Reply-To: <1357265063-30528-1-git-send-email-Frank.Li@freescale.com>

Hello,

On Fri, Jan 04, 2013 at 10:04:23AM +0800, Frank Li wrote:
> MX6 and mx28 support enhanced DMA descriptor buff to support 1588
> ptp. But MX25, MX3x, MX5x can't support enhanced DMA descriptor buff.
> Check fec type and choose correct DMA descriptor buff type.
> 
> Remove static config CONFIG_FEC_PTP.
> ptp function will be auto detected.
Your patch (now as ff43da86c69d76a726ffe7d1666148960dc1d108 in v3.9-rc1)
breaks building with CONFIG_FEC=m:

	ERROR: "fec_ptp_init" [drivers/net/ethernet/freescale/fec.ko] undefined!
	ERROR: "fec_ptp_ioctl" [drivers/net/ethernet/freescale/fec.ko] undefined!
	ERROR: "fec_ptp_start_cyclecounter" [drivers/net/ethernet/freescale/fec.ko] undefined!

IMHO you should build fec.o and fec_ptp.o into the same module as they
cannot live without each other anyhow.

Having said I wonder if it would be worthwile to support FEC without
PTP_1588_CLOCK. For example make the above three functions static
inlines if CONFIG_PTP_1588_CLOCK=n and drop the select on the latter.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply

* Re: [PATCH -next] openvswitch: fix error return code in ovs_vport_cmd_set()
From: Jesse Gross @ 2013-03-20 15:57 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <CAPgLHd_6+xnMKZBzH3KySpFv7hUzzNot7GBYSCAPLDRbC5HjsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Mar 20, 2013 at 5:14 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

This isn't right because at this point in the function the change has
already been made, only the notification allocation failed.  Therefore
we don't want to return an error since the caller will assume that
nothing has changed; instead an error is set on the Netlink socket.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox