Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: netdev_alloc_skb() use build_skb()
From: Eric Dumazet @ 2012-06-04 15:01 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Willy Tarreau, David Miller, netdev
In-Reply-To: <20120604141731.GA30226@redhat.com>

On Mon, 2012-06-04 at 17:17 +0300, Michael S. Tsirkin wrote:

> bnx2 and tg3 both do skb_reserve of at least NET_SKB_PAD
> after build_skb. You are saying it's not a must?
> 

32 would be the minimum. NETS_SKB_PAD is using a cache line (64 bytes
on most x86 current cpus) to avoid using half a cache line.

> Hmm so maybe we should teach the hypervisor to write data
> out at an offset. Interesting.
> 
> Another question is about very small packets truesize.
> build_skb sets truesize to frag_size but isn't
> this too small? We keep the whole page around, no?

We keep one page per cpu, at most.

For example on MTU=1500 and PAGE_SIZE=4096, one page is splitted into
two fragments, of 1500 + NET_SKB_PAD + align(shared_info), so its good
enough (this is very close from 2048 'truesize')

But yes, for some uses (wifi for example), we might use a full page per
skb, yet underestimate skb->truesize. Hopefully we can track these uses
and fix them.

ath9k for example could be changed, to be able to reassemble up to 3
frags instead of 2 frags, ie extending what did commit
0d95521ea74735826cb2e28bebf6a07392c75bfa (ath9k: use split rx
buffers to get rid of order-1 skb allocations)

^ permalink raw reply

* Re: [PATCH net-next] tcp: tcp_make_synack() can use alloc_skb()
From: David Miller @ 2012-06-04 15:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1338789043.2760.1719.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 04 Jun 2012 07:50:43 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> There is no value using sock_wmalloc() in tcp_make_synack().
> 
> A listener socket only sends SYNACK packets, they are not queued in a
> socket queue, only in Qdisc and device layers, so the number of in
> flight packets is limited in these layers. We used sock_wmalloc() with
> the %force parameter set to 1 to ignore socket limits anyway.
> 
> This patch removes two atomic operations per SYNACK packet.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Looks good, applied.

^ permalink raw reply

* Re: [PATCH net-next] tcp: tcp_make_synack() consumes dst parameter
From: David Miller @ 2012-06-04 15:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1338791601.2760.1725.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 04 Jun 2012 08:33:21 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> tcp_make_synack() clones the dst, and callers release it.
> 
> We can avoid two atomic operations per SYNACK if tcp_make_synack()
> consumes dst instead of cloning it.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] net: use consume_skb() in place of kfree_skb()
From: David Miller @ 2012-06-04 15:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1338808639.2760.1802.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 04 Jun 2012 13:17:19 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> Remove some dropwatch/drop_monitor false positives.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] sock_diag: add SK_MEMINFO_BACKLOG
From: David Miller @ 2012-06-04 15:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1338817835.2760.1815.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 04 Jun 2012 15:50:35 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> Adding socket backlog len in INET_DIAG_SKMEMINFO is really useful to
> diagnose various TCP problems.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* [PATCH (net.git) 0/4] stmmac fixes for net.git.
From: Giuseppe CAVALLARO @ 2012-06-04 15:37 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro

This set of patches fixes some problem in the driver included
in net.git.
A patch fixes a problem in the driver when built as dynamic
module. Another one fixes some useless initialisations in the
rx/tx processes.

Giuseppe Cavallaro (4):
  stmmac: remove two useless initialisation
  stmmac: fix driver's doc when run kernel-doc script
  stmmac: update driver's doc
  stmmac: fix driver Kconfig when built as module

 Documentation/networking/stmmac.txt                |   44 +++++++++++--------
 drivers/net/ethernet/stmicro/stmmac/Kconfig        |    5 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |    3 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   35 ++++++++++++++--
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c   |   29 +------------
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |    4 +-
 6 files changed, 62 insertions(+), 58 deletions(-)

-- 
1.7.4.4

^ permalink raw reply

* [PATCH (net.git) 2/4] stmmac: fix driver's doc when run kernel-doc script
From: Giuseppe CAVALLARO @ 2012-06-04 15:37 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro
In-Reply-To: <1338824270-9222-1-git-send-email-peppe.cavallaro@st.com>

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 0caae72..18ed878 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -833,8 +833,9 @@ static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
 
 /**
  * stmmac_selec_desc_mode
- * @dev : device pointer
- * Description: select the Enhanced/Alternate or Normal descriptors */
+ * @priv : private structure
+ * Description: select the Enhanced/Alternate or Normal descriptors
+ */
 static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
 {
 	if (priv->plat->enh_desc) {
@@ -1860,6 +1861,8 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
 /**
  * stmmac_dvr_probe
  * @device: device pointer
+ * @plat_dat: platform data pointer
+ * @addr: iobase memory address
  * Description: this is the main probe function used to
  * call the alloc_etherdev, allocate the priv structure.
  */
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH (net.git) 3/4] stmmac: update driver's doc
From: Giuseppe CAVALLARO @ 2012-06-04 15:37 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro
In-Reply-To: <1338824270-9222-1-git-send-email-peppe.cavallaro@st.com>

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 Documentation/networking/stmmac.txt |   44 +++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index ab1e8d7..5cb9a19 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -10,8 +10,8 @@ Currently this network device driver is for all STM embedded MAC/GMAC
 (i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000
 FF1152AMT0221 D1215994A VIRTEX FPGA board.
 
-DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether MAC 10/100
-Universal version 4.0 have been used for developing this driver.
+DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether
+MAC 10/100 Universal version 4.0 have been used for developing this driver.
 
 This driver supports both the platform bus and PCI.
 
@@ -54,27 +54,27 @@ net_device structure enabling the scatter/gather feature.
 When one or more packets are received, an interrupt happens. The interrupts
 are not queued so the driver has to scan all the descriptors in the ring during
 the receive process.
-This is based on NAPI so the interrupt handler signals only if there is work to be
-done, and it exits.
+This is based on NAPI so the interrupt handler signals only if there is work
+to be done, and it exits.
 Then the poll method will be scheduled at some future point.
 The incoming packets are stored, by the DMA, in a list of pre-allocated socket
 buffers in order to avoid the memcpy (Zero-copy).
 
 4.3) Timer-Driver Interrupt
-Instead of having the device that asynchronously notifies the frame receptions, the
-driver configures a timer to generate an interrupt at regular intervals.
-Based on the granularity of the timer, the frames that are received by the device
-will experience different levels of latency. Some NICs have dedicated timer
-device to perform this task. STMMAC can use either the RTC device or the TMU
-channel 2  on STLinux platforms.
+Instead of having the device that asynchronously notifies the frame receptions,
+the driver configures a timer to generate an interrupt at regular intervals.
+Based on the granularity of the timer, the frames that are received by the
+device will experience different levels of latency. Some NICs have dedicated
+timer device to perform this task. STMMAC can use either the RTC device or the
+TMU channel 2  on STLinux platforms.
 The timers frequency can be passed to the driver as parameter; when change it,
 take care of both hardware capability and network stability/performance impact.
-Several performance tests on STM platforms showed this optimisation allows to spare
-the CPU while having the maximum throughput.
+Several performance tests on STM platforms showed this optimisation allows to
+spare the CPU while having the maximum throughput.
 
 4.4) WOL
-Wake up on Lan feature through Magic and Unicast frames are supported for the GMAC
-core.
+Wake up on Lan feature through Magic and Unicast frames are supported for the
+GMAC core.
 
 4.5) DMA descriptors
 Driver handles both normal and enhanced descriptors. The latter has been only
@@ -106,7 +106,8 @@ Several driver's information can be passed through the platform
 These are included in the include/linux/stmmac.h header file
 and detailed below as well:
 
- struct plat_stmmacenet_data {
+struct plat_stmmacenet_data {
+	char *phy_bus_name;
 	int bus_id;
 	int phy_addr;
 	int interface;
@@ -124,19 +125,24 @@ and detailed below as well:
 	void (*bus_setup)(void __iomem *ioaddr);
 	int (*init)(struct platform_device *pdev);
 	void (*exit)(struct platform_device *pdev);
+	void *custom_cfg;
+	void *custom_data;
 	void *bsp_priv;
  };
 
 Where:
+ o phy_bus_name: phy bus name to attach to the stmmac.
  o bus_id: bus identifier.
  o phy_addr: the physical address can be passed from the platform.
 	    If it is set to -1 the driver will automatically
 	    detect it at run-time by probing all the 32 addresses.
  o interface: PHY device's interface.
  o mdio_bus_data: specific platform fields for the MDIO bus.
- o pbl: the Programmable Burst Length is maximum number of beats to
+ o dma_cfg: internal DMA parameters
+   o pbl: the Programmable Burst Length is maximum number of beats to
        be transferred in one DMA transaction.
        GMAC also enables the 4xPBL by default.
+   o fixed_burst/mixed_burst/burst_len
  o clk_csr: fixed CSR Clock range selection.
  o has_gmac: uses the GMAC core.
  o enh_desc: if sets the MAC will use the enhanced descriptor structure.
@@ -160,8 +166,9 @@ Where:
 	     this is sometime necessary on some platforms (e.g. ST boxes)
 	     where the HW needs to have set some PIO lines or system cfg
 	     registers.
- o custom_cfg: this is a custom configuration that can be passed while
-	      initialising the resources.
+ o custom_cfg/custom_data: this is a custom configuration that can be passed
+			   while initialising the resources.
+ o bsp_priv: another private poiter.
 
 For MDIO bus The we have:
 
@@ -180,7 +187,6 @@ Where:
  o irqs: list of IRQs, one per PHY.
  o probed_phy_irq: if irqs is NULL, use this for probed PHY.
 
-
 For DMA engine we have the following internal fields that should be
 tuned according to the HW capabilities.
 
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH (net.git) 4/4 (v2)] stmmac: fix driver Kconfig when built as module
From: Giuseppe CAVALLARO @ 2012-06-04 15:37 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro, Rayagond Kokatanur
In-Reply-To: <1338824270-9222-1-git-send-email-peppe.cavallaro@st.com>

This patches fixes the driver when built as dyn module.
In fact the platform part cannot be built and the probe fails
(thanks to Bob Liu that reported this bug).

v2: as D. Miller suggested, it is not necessary to make the
pci and the platform code mutually exclusive.
Having both could also help, at built time ,to verify that
all the code is validated and compiles fine.

Reported-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: David S. Miller <davem@davemloft.net>
cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/Kconfig        |    5 +--
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |    3 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   25 +++++++++++++++++
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c   |   29 +-------------------
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |    4 +--
 5 files changed, 31 insertions(+), 35 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index 0364283..0076f77 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -13,9 +13,8 @@ config STMMAC_ETH
 if STMMAC_ETH
 
 config STMMAC_PLATFORM
-	tristate "STMMAC platform bus support"
+	bool "STMMAC Platform bus support"
 	depends on STMMAC_ETH
-	default y
 	---help---
 	  This selects the platform specific bus support for
 	  the stmmac device driver. This is the driver used
@@ -26,7 +25,7 @@ config STMMAC_PLATFORM
 	  If unsure, say N.
 
 config STMMAC_PCI
-	tristate "STMMAC support on PCI bus (EXPERIMENTAL)"
+	bool "STMMAC PCI bus support (EXPERIMENTAL)"
 	depends on STMMAC_ETH && PCI && EXPERIMENTAL
 	---help---
 	  This is to select the Synopsys DWMAC available on PCI devices,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 6b5d060..6d07ba2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -95,7 +95,8 @@ extern int stmmac_mdio_register(struct net_device *ndev);
 extern void stmmac_set_ethtool_ops(struct net_device *netdev);
 extern const struct stmmac_desc_ops enh_desc_ops;
 extern const struct stmmac_desc_ops ndesc_ops;
-
+extern struct pci_driver stmmac_pci_driver;
+extern struct platform_driver stmmac_pltfr_driver;
 int stmmac_freeze(struct net_device *ndev);
 int stmmac_restore(struct net_device *ndev);
 int stmmac_resume(struct net_device *ndev);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 18ed878..8899e10 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -42,6 +42,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/slab.h>
 #include <linux/prefetch.h>
+#include <linux/pci.h>
 #ifdef CONFIG_STMMAC_DEBUG_FS
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
@@ -2092,6 +2093,30 @@ int stmmac_restore(struct net_device *ndev)
 }
 #endif /* CONFIG_PM */
 
+static int __init stmmac_init(void)
+{
+	int err = 0;
+
+	err = platform_driver_register(&stmmac_pltfr_driver);
+
+	if (!err) {
+		err = pci_register_driver(&stmmac_pci_driver);
+		if (err)
+			platform_driver_unregister(&stmmac_pltfr_driver);
+	}
+
+	return err;
+}
+
+static void __exit stmmac_exit(void)
+{
+	pci_unregister_driver(&stmmac_pci_driver);
+	platform_driver_unregister(&stmmac_pltfr_driver);
+}
+
+module_init(stmmac_init);
+module_exit(stmmac_exit);
+
 #ifndef MODULE
 static int __init stmmac_cmdline_opt(char *str)
 {
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 58fab53..cf826e6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -179,7 +179,7 @@ static DEFINE_PCI_DEVICE_TABLE(stmmac_id_table) = {
 
 MODULE_DEVICE_TABLE(pci, stmmac_id_table);
 
-static struct pci_driver stmmac_driver = {
+struct pci_driver stmmac_pci_driver = {
 	.name = STMMAC_RESOURCE_NAME,
 	.id_table = stmmac_id_table,
 	.probe = stmmac_pci_probe,
@@ -190,33 +190,6 @@ static struct pci_driver stmmac_driver = {
 #endif
 };
 
-/**
- * stmmac_init_module - Entry point for the driver
- * Description: This function is the entry point for the driver.
- */
-static int __init stmmac_init_module(void)
-{
-	int ret;
-
-	ret = pci_register_driver(&stmmac_driver);
-	if (ret < 0)
-		pr_err("%s: ERROR: driver registration failed\n", __func__);
-
-	return ret;
-}
-
-/**
- * stmmac_cleanup_module - Cleanup routine for the driver
- * Description: This function is the cleanup routine for the driver.
- */
-static void __exit stmmac_cleanup_module(void)
-{
-	pci_unregister_driver(&stmmac_driver);
-}
-
-module_init(stmmac_init_module);
-module_exit(stmmac_cleanup_module);
-
 MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet PCI driver");
 MODULE_AUTHOR("Rayagond Kokatanur <rayagond.kokatanur@vayavyalabs.com>");
 MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 3dd8f08..680d2b8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -255,7 +255,7 @@ static const struct of_device_id stmmac_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, stmmac_dt_ids);
 
-static struct platform_driver stmmac_driver = {
+struct platform_driver stmmac_pltfr_driver = {
 	.probe = stmmac_pltfr_probe,
 	.remove = stmmac_pltfr_remove,
 	.driver = {
@@ -266,8 +266,6 @@ static struct platform_driver stmmac_driver = {
 		   },
 };
 
-module_platform_driver(stmmac_driver);
-
 MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet PLATFORM driver");
 MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
 MODULE_LICENSE("GPL");
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH (net.git) 1/4] stmmac: remove two useless initialisation
From: Giuseppe CAVALLARO @ 2012-06-04 15:37 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro
In-Reply-To: <1338824270-9222-1-git-send-email-peppe.cavallaro@st.com>

This patch removes two useful initialisation in the
stmmac_rx and stmmac_tx function.
In the former, count var was already reset and in the
stmmac_tx we only need to increment the dirty pointer
w/o setting the entry var.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7096633..0caae72 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -677,7 +677,7 @@ static void stmmac_tx(struct stmmac_priv *priv)
 
 		priv->hw->desc->release_tx_desc(p);
 
-		entry = (++priv->dirty_tx) % txsize;
+		priv->dirty_tx++;
 	}
 	if (unlikely(netif_queue_stopped(priv->dev) &&
 		     stmmac_tx_avail(priv) > STMMAC_TX_THRESH(priv))) {
@@ -1307,7 +1307,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
 		display_ring(priv->dma_rx, rxsize);
 	}
 #endif
-	count = 0;
 	while (!priv->hw->desc->get_rx_owner(p)) {
 		int status;
 
-- 
1.7.4.4

^ permalink raw reply related

* Re: [PATCH v2] drop_monitor: dont sleep in atomic context
From: David Miller @ 2012-06-04 15:42 UTC (permalink / raw)
  To: nhorman; +Cc: eric.dumazet, netdev
In-Reply-To: <20120604104937.GC20232@hmsreliant.think-freely.org>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Mon, 4 Jun 2012 06:49:37 -0400

> On Mon, Jun 04, 2012 at 12:18:19PM +0200, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>> 
>> drop_monitor calls several sleeping functions while in atomic context.
>> 
>>  BUG: sleeping function called from invalid context at mm/slub.c:943
>>  in_atomic(): 1, irqs_disabled(): 0, pid: 2103, name: kworker/0:2
>>  Pid: 2103, comm: kworker/0:2 Not tainted 3.5.0-rc1+ #55
>>  Call Trace:
>>   [<ffffffff810697ca>] __might_sleep+0xca/0xf0
>>   [<ffffffff811345a3>] kmem_cache_alloc_node+0x1b3/0x1c0
>>   [<ffffffff8105578c>] ? queue_delayed_work_on+0x11c/0x130
>>   [<ffffffff815343fb>] __alloc_skb+0x4b/0x230
>>   [<ffffffffa00b0360>] ? reset_per_cpu_data+0x160/0x160 [drop_monitor]
>>   [<ffffffffa00b022f>] reset_per_cpu_data+0x2f/0x160 [drop_monitor]
>>   [<ffffffffa00b03ab>] send_dm_alert+0x4b/0xb0 [drop_monitor]
>>   [<ffffffff810568e0>] process_one_work+0x130/0x4c0
>>   [<ffffffff81058249>] worker_thread+0x159/0x360
>>   [<ffffffff810580f0>] ? manage_workers.isra.27+0x240/0x240
>>   [<ffffffff8105d403>] kthread+0x93/0xa0
>>   [<ffffffff816be6d4>] kernel_thread_helper+0x4/0x10
>>   [<ffffffff8105d370>] ? kthread_freezable_should_stop+0x80/0x80
>>   [<ffffffff816be6d0>] ? gs_change+0xb/0xb
>> 
>> Rework the logic to call the sleeping functions in right context.
>> 
>> Use standard timer/workqueue api to let system chose any cpu to perform
>> the allocation and netlink send.
>> 
>> Also avoid a loop if reset_per_cpu_data() cannot allocate memory :
>> use mod_timer() to wait 1/10 second before next try.
>> 
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Neil Horman <nhorman@tuxdriver.com>
> Reviewed-by: Neil Horman <nhorman@tuxdriver.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH] net/ethernet: ks8851_mll mac address configuration support added
From: David Miller @ 2012-06-04 15:43 UTC (permalink / raw)
  To: lamiaposta71; +Cc: netdev, adobriyan, thomas, raffaele.recalcati
In-Reply-To: <1338756223-7207-1-git-send-email-lamiaposta71@gmail.com>

From: Raffaele Recalcati <lamiaposta71@gmail.com>
Date: Sun,  3 Jun 2012 22:43:43 +0200

> From: Raffaele Recalcati <raffaele.recalcati@bticino.it>
> 
> Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>

Applied to net-next, thanks.

^ permalink raw reply

* Re: pull-request: can 2012-06-03
From: David Miller @ 2012-06-04 15:44 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can
In-Reply-To: <1338762120-12695-1-git-send-email-mkl@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon,  4 Jun 2012 00:21:56 +0200

> git@gitorious.org:linux-can/linux-can.git master

I can't pull from that tree.

[davem@bql net]$ git pull git@gitorious.org:linux-can/linux-can.git master
The authenticity of host 'gitorious.org (87.238.52.168)' can't be established.
RSA key fingerprint is 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitorious.org,87.238.52.168' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

^ permalink raw reply

* Re: [PATCH] net: Remove casts to same type
From: David Miller @ 2012-06-04 15:45 UTC (permalink / raw)
  To: joe; +Cc: netdev
In-Reply-To: <4b3738493b23bc386d3372012faa8cd3672a138d.1338780551.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Sun,  3 Jun 2012 20:41:40 -0700

> Adding casts of objects to the same type is unnecessary
> and confusing for a human reader.
> 
> For example, this cast:
> 
> 	int y;
> 	int *p = (int *)&y;
> 
> I used the coccinelle script below to find and remove these
> unnecessary casts.  I manually removed the conversions this
> script produces of casts with __force and __user.
> 
> @@
> type T;
> T *p;
> @@
> 
> -	(T *)p
> +	p
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to net-next, thanks Joe.

^ permalink raw reply

* Re: pull-request: can 2012-06-03
From: Marc Kleine-Budde @ 2012-06-04 15:46 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-can
In-Reply-To: <20120604.114443.2116610445330624803.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

On 06/04/2012 05:44 PM, David Miller wrote:
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Date: Mon,  4 Jun 2012 00:21:56 +0200
> 
>> git@gitorious.org:linux-can/linux-can.git master
> 
> I can't pull from that tree.
> 
> [davem@bql net]$ git pull git@gitorious.org:linux-can/linux-can.git master
> The authenticity of host 'gitorious.org (87.238.52.168)' can't be established.
> RSA key fingerprint is 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d.
> Are you sure you want to continue connecting (yes/no)? yes
> Warning: Permanently added 'gitorious.org,87.238.52.168' (RSA) to the list of known hosts.
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly

Doh,

git://gitorious.org/linux-can/linux-can.git master

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply

* Re: [PATCH 1/1] net/hyperv: Use wait_event on outstanding sends during device removal
From: David Miller @ 2012-06-04 15:48 UTC (permalink / raw)
  To: haiyangz; +Cc: netdev, kys, olaf, linux-kernel, devel
In-Reply-To: <1338820532-2345-2-git-send-email-haiyangz@microsoft.com>

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Mon,  4 Jun 2012 07:35:32 -0700

> +	wait_event(net_device->wait_drain,
> +		atomic_read(&net_device->num_outstanding_sends) == 0);

Please indent this properly.  The goal is not to indent using only
TAB characters, the goal is to line things up to the proper column
using TAB and space characters as needed.

You must make the first character on the second line be at the
first column after the openning parenthesis on the previous line.

^ permalink raw reply

* Re: [PATCH (net.git) 1/4] stmmac: remove two useless initialisation
From: David Miller @ 2012-06-04 15:49 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev
In-Reply-To: <1338824270-9222-2-git-send-email-peppe.cavallaro@st.com>

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Mon,  4 Jun 2012 17:37:47 +0200

> This patch removes two useful initialisation in the
> stmmac_rx and stmmac_tx function.
> In the former, count var was already reset and in the
> stmmac_tx we only need to increment the dirty pointer
> w/o setting the entry var.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

There are so many problems with this patch I do not know where
to start.

Your subject line says the initializations are "useless" yet
your commit message says they are "useful".

This is a cleanup, and does not fix any bugs, and is therefore
absolutely not appropriate for the 'net' tree.

I'm tossing this entire series, you need to be more careful
with your submissions.

^ permalink raw reply

* Re: [PATCH 0/1] net/hyperv: Use wait_event on outstanding sends during device removal
From: David Miller @ 2012-06-04 15:51 UTC (permalink / raw)
  To: haiyangz; +Cc: netdev, kys, olaf, linux-kernel, devel
In-Reply-To: <1338820532-2345-1-git-send-email-haiyangz@microsoft.com>

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Mon,  4 Jun 2012 07:35:31 -0700

> This patch is targeting net-next tree (when it's available for check in).
> 
> Haiyang Zhang (1):
>   net/hyperv: Use wait_event on outstanding sends during device removal

Why in the world are you doing this?

This patch you are already asking me to apply to the 'net' tree, and
changes already will automatically propagate from 'net' to
'net-next' the next time I merge those trees.

So you never need to submit bug fixes twice, once for 'net' and
once for 'net-next' so please do not do it.

^ permalink raw reply

* [PATCH (net.git)] net: icplus: fix interrupt mask
From: Giuseppe CAVALLARO @ 2012-06-04 15:51 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro

This patch fixes the interrupt mask for IC101 A/G devices
and now enables the link/speed/duplex interrupts.
This is done by setting the "INTR pin used" bit and cleaning
all the other bits in the Register 17.

Reported-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/phy/icplus.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index 5ac46f5..47f8e89 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -41,6 +41,8 @@ MODULE_LICENSE("GPL");
 #define IP1001_APS_ON			11	/* IP1001 APS Mode  bit */
 #define IP101A_G_APS_ON			2	/* IP101A/G APS Mode bit */
 #define IP101A_G_IRQ_CONF_STATUS	0x11	/* Conf Info IRQ & Status Reg */
+#define	IP101A_G_IRQ_PIN_USED		(1<<15) /* INTR pin used */
+#define	IP101A_G_IRQ_DEFAULT		IP101A_G_IRQ_PIN_USED
 
 static int ip175c_config_init(struct phy_device *phydev)
 {
@@ -136,6 +138,11 @@ static int ip1001_config_init(struct phy_device *phydev)
 	if (c < 0)
 		return c;
 
+	/* INTR pin used: speed/link/duplex will cause an interrupt */
+	c = phy_write(phydev, IP101A_G_IRQ_CONF_STATUS, IP101A_G_IRQ_DEFAULT);
+	if (c < 0)
+		return c;
+
 	if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
 		/* Additional delay (2ns) used to adjust RX clock phase
 		 * at RGMII interface */
-- 
1.7.4.4

^ permalink raw reply related

* Re: pull-request: can 2012-06-03
From: David Miller @ 2012-06-04 15:51 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can
In-Reply-To: <4FCCD86F.40007@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 04 Jun 2012 17:46:55 +0200

> On 06/04/2012 05:44 PM, David Miller wrote:
>> From: Marc Kleine-Budde <mkl@pengutronix.de>
>> Date: Mon,  4 Jun 2012 00:21:56 +0200
>> 
>>> git@gitorious.org:linux-can/linux-can.git master
>> 
>> I can't pull from that tree.
>> 
>> [davem@bql net]$ git pull git@gitorious.org:linux-can/linux-can.git master
>> The authenticity of host 'gitorious.org (87.238.52.168)' can't be established.
>> RSA key fingerprint is 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d.
>> Are you sure you want to continue connecting (yes/no)? yes
>> Warning: Permanently added 'gitorious.org,87.238.52.168' (RSA) to the list of known hosts.
>> Permission denied (publickey).
>> fatal: The remote end hung up unexpectedly
> 
> Doh,
> 
> git://gitorious.org/linux-can/linux-can.git master

Pulled, thanks.

^ permalink raw reply

* Re: pull-request: can-next 2012-06-04
From: Marc Kleine-Budde @ 2012-06-04 15:52 UTC (permalink / raw)
  To: davem; +Cc: Linux Netdev List, linux-can@vger.kernel.org
In-Reply-To: <4FCBEAAB.90708@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

On 06/04/2012 12:52 AM, Marc Kleine-Budde wrote:
> Hello David,
> 
> here are the first patches for net-next, they add power management
> support for the flexcan driver and clarify the documentation with
> respect to error messages.
> 
> regards, Marc
> 
> ---
> 
> The following changes since commit 31a67102f4762df5544bc2dfb34a931233d2a5b2:
> 
>   Fix blocking allocations called very early during bootup (2012-05-21 12:52:42 -0700)
> 
> are available in the git repository at:
>   git@gitorious.org:linux-can/linux-can-next.git master

That should be:

git://gitorious.org/linux-can/linux-can-next.git master

Sorry for the noise,
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply

* Re: [PATCH] net: Remove casts to same type
From: Joe Perches @ 2012-06-04 15:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20120604.114533.1720204611284591292.davem@davemloft.net>

On Mon, 2012-06-04 at 11:45 -0400, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> > Adding casts of objects to the same type is unnecessary
> > and confusing for a human reader.
[]
> > I used the coccinelle script below to find and remove these
> > unnecessary casts.  I manually removed the conversions this
> > script produces of casts with __force and __user.
> > 
> > @@
> > type T;
> > T *p;
> > @@
> > 
> > -	(T *)p
> > +	p
> Applied to net-next, thanks Joe.

Do you want the same thing for drivers/net?

It's pretty big and might be better broken into
commits by maintainer/directory.

^ permalink raw reply

* Re: [PATCH] net: Remove casts to same type
From: David Miller @ 2012-06-04 15:53 UTC (permalink / raw)
  To: joe; +Cc: netdev
In-Reply-To: <1338825128.8574.15.camel@joe2Laptop>

From: Joe Perches <joe@perches.com>
Date: Mon, 04 Jun 2012 08:52:08 -0700

> On Mon, 2012-06-04 at 11:45 -0400, David Miller wrote:
>> From: Joe Perches <joe@perches.com>
>> > Adding casts of objects to the same type is unnecessary
>> > and confusing for a human reader.
> []
>> > I used the coccinelle script below to find and remove these
>> > unnecessary casts.  I manually removed the conversions this
>> > script produces of casts with __force and __user.
>> > 
>> > @@
>> > type T;
>> > T *p;
>> > @@
>> > 
>> > -	(T *)p
>> > +	p
>> Applied to net-next, thanks Joe.
> 
> Do you want the same thing for drivers/net?
> 
> It's pretty big and might be better broken into
> commits by maintainer/directory.

I don't see any value beyond perhaps splitting it into
drivers/net/ethernet, drivers/net/wireless, and "rest".

^ permalink raw reply

* Re: [PATCH RFC] c_can_pci: generic module for c_can on PCI
From: Alan Cox @ 2012-06-04 15:56 UTC (permalink / raw)
  To: Federico Vaga
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Giancarlo Asnaghi,
	Alan Cox, Alessandro Rubini, linux-can, netdev, linux-kernel
In-Reply-To: <1338816766-7089-2-git-send-email-federico.vaga@gmail.com>

> +enum c_can_pci_reg_align {
> +	C_CAN_REG_ALIGN_16,
> +	C_CAN_REG_ALIGN_32,
> +};

Anythign wrong with 

bool aligned32;

> +
> +struct c_can_pci_data {
> +	unsigned int reg_align;	/* Set the register alignment in the memory */

Not the enum .. indeed

> +static u16 c_can_pci_read_reg_aligned_to_16bit(struct c_can_priv *priv,
> +						void *reg)

I'm a bit worried this function name might be too short ;)


> +	dev_info(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
> +		 KBUILD_MODNAME, priv->regs, dev->irq);

dev_dbg

> +	 * do not call pci_disable_device on sta2x11 because it
> +	 * break all other Bus masters on this EP
> +	 */
> +	if(pdev->vendor == PCI_VENDOR_ID_STMICRO &&
> +	   pdev->device == PCI_DEVICE_ID_STMICRO_CAN)
> +		goto out;

Is that the disabling or the dropping it into D3. We have a PCI quirk
flag for the latter. See "quirk_no_ata_d3". That will also avoid any
accidents elsewhere. Right now the quirk has "ata" in the name but the
ata is just historically because we had to quirk various disk controllers.

^ permalink raw reply

* Re: [PATCH (net.git) 1/4] stmmac: remove two useless initialisation
From: Giuseppe CAVALLARO @ 2012-06-04 15:58 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20120604.114940.813410325113851773.davem@davemloft.net>

On 6/4/2012 5:49 PM, David Miller wrote:
> From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
> Date: Mon,  4 Jun 2012 17:37:47 +0200
> 
>> This patch removes two useful initialisation in the
>> stmmac_rx and stmmac_tx function.
>> In the former, count var was already reset and in the
>> stmmac_tx we only need to increment the dirty pointer
>> w/o setting the entry var.
>>
>> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> 
> There are so many problems with this patch I do not know where
> to start.
> 
> Your subject line says the initializations are "useless" yet
> your commit message says they are "useful".

Sorry, I meant "useless".

> This is a cleanup, and does not fix any bugs, and is therefore
> absolutely not appropriate for the 'net' tree.

Yes this is not a fix but a cleanup.

I've not clear where I have to post this patch.
Do you mean, w/o net.git entry in the patch subject?
Can you tell me what I have to do? So will resend all the patches again
but I'll be more careful on all.

> I'm tossing this entire series, you need to be more careful
> with your submissions.

ok, thanks a lot.

peppe

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ 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