Netdev List
 help / color / mirror / Atom feed
* [net-next 0/8][pull request] Intel Wired LAN Driver Update
From: Jeff Kirsher @ 2011-09-21 10:12 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo

The following series contains updates to ixgbe and pci.  The pci patch
is a small update to add a flag to indicate when a device has been
assigned by KVM.  The ixgbe patches consist of the following:

  - reconfigure SR-IOV init to take advantage of the new pci flag
  - DCB cleanups/fixes
  - add WOL support for x540
  - a few cleanup/fixes

The following are changes since commit 9c9b1f24f2aa31a3cea94939edc551f68ebadc89:
  net/phy: add IC+ IP101A and support APS.
and are available in the git repository at:
  git://github.com/Jkirsher/net-next.git

Don Skidmore (1):
  ixgbe: cleanup X540 interrupt enablement

Emil Tantilov (3):
  ixgbe: avoid HW lockup when adapter is reset with Tx work pending
  ixgbe: add WOL support for X540
  ixgbe: remove global reset to the MAC

Greg Rose (2):
  pci: Add flag indicating device has been assigned by KVM
  ixgbe: Reconfigure SR-IOV Init

John Fastabend (2):
  ixgbe: DCB, do not call set_state() from IEEE mode
  ixgbe: dcb, set priority to traffic class mappings

 drivers/net/ethernet/intel/ixgbe/ixgbe.h         |    2 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c   |   15 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c   |   13 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |  145 +++++++++-------
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c     |   36 ++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h     |    3 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c  |   57 +++----
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |   13 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  141 ++++-----------
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c   |  207 +++++++++++++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h   |    5 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |   10 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c    |   31 +---
 include/linux/pci.h                              |    2 +
 virt/kvm/assigned-dev.c                          |    2 +
 virt/kvm/iommu.c                                 |    4 +
 17 files changed, 443 insertions(+), 245 deletions(-)

-- 
1.7.6.2

^ permalink raw reply

* EMail ID Awarded Nine Hundred And Fifty Thousand British Pounds In The Benz Cash Splash
From: artkearney @ 2011-09-21 10:10 UTC (permalink / raw)




send details Name, Tel, Address, Country.

^ permalink raw reply

* [PATCH] xfrm: Perform a replay check after return from async codepaths
From: Steffen Klassert @ 2011-09-21  9:38 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, netdev

When asyncronous crypto algorithms are used, there might be many
packets that passed the xfrm replay check, but the replay advance
function is not called yet for these packets. So the replay check
function would accept a replay of all of these packets. Also the
system might crash if there are more packets in async processing
than the size of the anti replay window, because the replay advance
function would try to update the replay window beyond the bounds.

This pach adds a second replay check after resuming from the async
processing to fix these issues.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_input.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index a026b0e..54a0dc2 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -212,6 +212,11 @@ resume:
 		/* only the first xfrm gets the encap type */
 		encap_type = 0;
 
+		if (async && x->repl->check(x, skb, seq)) {
+			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
+			goto drop_unlock;
+		}
+
 		x->repl->advance(x, seq);
 
 		x->curlft.bytes += skb->len;
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH 39/57] net: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21  9:28 UTC (permalink / raw)
  To: linux-arch-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Jaroslav Kysela, Christian Lamparter, Klaus Kudielka,
	Thomas Sailer, Jeff Kirsher, Bob Liu, Joe Perches,
	Jean-Paul Roubelat, Joerg Reuter,
	cbe-oss-dev-uLR06cmDAlY/bJ5BZ2RsiQ, Samuel Ortiz, Grant Grundler,
	Lucas De Marchi, John W. Linville,
	yong.zhang0-Re5JQEeQqe8AvxtiuMwx3w,
	uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b,
	linux-hams-u79uwXL29TY76Z2rM5mHXA, tglx-hfZtesqFncYOwBW4kG4KsQ,
	Breno Leitao, John Crispin, Nicolas Pitre, Geoff Levand
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/net/ethernet/adi/bfin_mac.c          |    4 ++--
 drivers/net/ethernet/amd/sun3lance.c         |    2 +-
 drivers/net/ethernet/broadcom/bcm63xx_enet.c |    4 ++--
 drivers/net/ethernet/dec/tulip/de4x5.c       |    2 +-
 drivers/net/ethernet/freescale/fec.c         |    2 +-
 drivers/net/ethernet/hp/hp100.c              |    2 +-
 drivers/net/ethernet/ibm/ehea/ehea_main.c    |    6 +++---
 drivers/net/ethernet/korina.c                |    8 ++++----
 drivers/net/ethernet/lantiq_etop.c           |    4 ++--
 drivers/net/ethernet/marvell/pxa168_eth.c    |    2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c     |    2 +-
 drivers/net/ethernet/natsemi/jazzsonic.c     |    2 +-
 drivers/net/ethernet/natsemi/xtsonic.c       |    2 +-
 drivers/net/ethernet/pasemi/pasemi_mac.c     |    4 ++--
 drivers/net/ethernet/smsc/smc91x.h           |    2 +-
 drivers/net/ethernet/smsc/smsc9420.c         |    2 +-
 drivers/net/ethernet/ti/davinci_emac.c       |    2 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c |    2 +-
 drivers/net/hamradio/baycom_ser_fdx.c        |    2 +-
 drivers/net/hamradio/baycom_ser_hdx.c        |    2 +-
 drivers/net/hamradio/scc.c                   |    2 +-
 drivers/net/hamradio/yam.c                   |    2 +-
 drivers/net/irda/bfin_sir.c                  |    4 ++--
 drivers/net/irda/donauboe.c                  |    4 ++--
 drivers/net/irda/sh_irda.c                   |    2 +-
 drivers/net/irda/sh_sir.c                    |    2 +-
 drivers/net/wan/hostess_sv11.c               |    2 +-
 drivers/net/wan/sealevel.c                   |    2 +-
 drivers/net/wireless/p54/p54spi.c            |    2 +-
 include/net/irda/irda_device.h               |    2 +-
 30 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index b6d69c9..0d3804f 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -531,7 +531,7 @@ static int bfin_mac_ethtool_setwol(struct net_device *dev,
 	if (lp->wol && !lp->irq_wake_requested) {
 		/* register wake irq handler */
 		rc = request_irq(IRQ_MAC_WAKEDET, bfin_mac_wake_interrupt,
-				 IRQF_DISABLED, "EMAC_WAKE", dev);
+				 0, "EMAC_WAKE", dev);
 		if (rc)
 			return rc;
 		lp->irq_wake_requested = true;
@@ -1544,7 +1544,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
 	/* now, enable interrupts */
 	/* register irq handler */
 	rc = request_irq(IRQ_MAC_RX, bfin_mac_interrupt,
-			IRQF_DISABLED, "EMAC_RX", ndev);
+			0, "EMAC_RX", ndev);
 	if (rc) {
 		dev_err(&pdev->dev, "Cannot request Blackfin MAC RX IRQ!\n");
 		rc = -EBUSY;
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 080b71f..9aee9f7 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -358,7 +358,7 @@ static int __init lance_probe( struct net_device *dev)
 
 	REGA(CSR0) = CSR0_STOP;
 
-	if (request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev) < 0) {
+	if (request_irq(LANCE_IRQ, lance_interrupt, 0, "SUN3 Lance", dev) < 0) {
 #ifdef CONFIG_SUN3
 		iounmap((void __iomem *)ioaddr);
 #endif
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 05b0228..3fc0d8a 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -840,13 +840,13 @@ static int bcm_enet_open(struct net_device *dev)
 	if (ret)
 		goto out_phy_disconnect;
 
-	ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, IRQF_DISABLED,
+	ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0,
 			  dev->name, dev);
 	if (ret)
 		goto out_freeirq;
 
 	ret = request_irq(priv->irq_tx, bcm_enet_isr_dma,
-			  IRQF_DISABLED, dev->name, dev);
+			  0, dev->name, dev);
 	if (ret)
 		goto out_freeirq_rx;
 
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 871bcaa..7dd7989 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -1321,7 +1321,7 @@ de4x5_open(struct net_device *dev)
     if (request_irq(dev->irq, de4x5_interrupt, IRQF_SHARED,
 		                                     lp->adapter_name, dev)) {
 	printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq);
-	if (request_irq(dev->irq, de4x5_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	if (request_irq(dev->irq, de4x5_interrupt, IRQF_SHARED,
 			                             lp->adapter_name, dev)) {
 	    printk("\n              Cannot get IRQ- reconfigure your hardware.\n");
 	    disable_ast(dev);
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 158b82e..9de7569 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1508,7 +1508,7 @@ fec_probe(struct platform_device *pdev)
 		irq = platform_get_irq(pdev, i);
 		if (i && irq < 0)
 			break;
-		ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev);
+		ret = request_irq(irq, fec_enet_interrupt, 0, pdev->name, ndev);
 		if (ret) {
 			while (--i >= 0) {
 				irq = platform_get_irq(pdev, i);
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index 6a5ee07..4c4f3f4 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -1097,7 +1097,7 @@ static int hp100_open(struct net_device *dev)
 	/* New: if bus is PCI or EISA, interrupts might be shared interrupts */
 	if (request_irq(dev->irq, hp100_interrupt,
 			lp->bus == HP100_BUS_PCI || lp->bus ==
-			HP100_BUS_EISA ? IRQF_SHARED : IRQF_DISABLED,
+			HP100_BUS_EISA ? IRQF_SHARED : 0,
 			"hp100", dev)) {
 		printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq);
 		return -EAGAIN;
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 583bcd3..19459c5 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1340,7 +1340,7 @@ static int ehea_reg_interrupts(struct net_device *dev)
 
 	ret = ibmebus_request_irq(port->qp_eq->attr.ist1,
 				  ehea_qp_aff_irq_handler,
-				  IRQF_DISABLED, port->int_aff_name, port);
+				  0, port->int_aff_name, port);
 	if (ret) {
 		netdev_err(dev, "failed registering irq for qp_aff_irq_handler:ist=%X\n",
 			   port->qp_eq->attr.ist1);
@@ -1358,7 +1358,7 @@ static int ehea_reg_interrupts(struct net_device *dev)
 			 "%s-queue%d", dev->name, i);
 		ret = ibmebus_request_irq(pr->eq->attr.ist1,
 					  ehea_recv_irq_handler,
-					  IRQF_DISABLED, pr->int_send_name,
+					  0, pr->int_send_name,
 					  pr);
 		if (ret) {
 			netdev_err(dev, "failed registering irq for ehea_queue port_res_nr:%d, ist=%X\n",
@@ -3513,7 +3513,7 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
 		     (unsigned long)adapter);
 
 	ret = ibmebus_request_irq(adapter->neq->attr.ist1,
-				  ehea_interrupt_neq, IRQF_DISABLED,
+				  ehea_interrupt_neq, 0,
 				  "ehea_neq", adapter);
 	if (ret) {
 		dev_err(&dev->dev, "requesting NEQ IRQ failed\n");
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index d8430f4..2a96cd5 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -1001,14 +1001,14 @@ static int korina_open(struct net_device *dev)
 	 * that handles the Done Finished
 	 * Ovr and Und Events */
 	ret = request_irq(lp->rx_irq, korina_rx_dma_interrupt,
-			IRQF_DISABLED, "Korina ethernet Rx", dev);
+			0, "Korina ethernet Rx", dev);
 	if (ret < 0) {
 		printk(KERN_ERR "%s: unable to get Rx DMA IRQ %d\n",
 		    dev->name, lp->rx_irq);
 		goto err_release;
 	}
 	ret = request_irq(lp->tx_irq, korina_tx_dma_interrupt,
-			IRQF_DISABLED, "Korina ethernet Tx", dev);
+			0, "Korina ethernet Tx", dev);
 	if (ret < 0) {
 		printk(KERN_ERR "%s: unable to get Tx DMA IRQ %d\n",
 		    dev->name, lp->tx_irq);
@@ -1017,7 +1017,7 @@ static int korina_open(struct net_device *dev)
 
 	/* Install handler for overrun error. */
 	ret = request_irq(lp->ovr_irq, korina_ovr_interrupt,
-			IRQF_DISABLED, "Ethernet Overflow", dev);
+			0, "Ethernet Overflow", dev);
 	if (ret < 0) {
 		printk(KERN_ERR "%s: unable to get OVR IRQ %d\n",
 		    dev->name, lp->ovr_irq);
@@ -1026,7 +1026,7 @@ static int korina_open(struct net_device *dev)
 
 	/* Install handler for underflow error. */
 	ret = request_irq(lp->und_irq, korina_und_interrupt,
-			IRQF_DISABLED, "Ethernet Underflow", dev);
+			0, "Ethernet Underflow", dev);
 	if (ret < 0) {
 		printk(KERN_ERR "%s: unable to get UND IRQ %d\n",
 		    dev->name, lp->und_irq);
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 6bb2b95..d9a268c 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -280,7 +280,7 @@ ltq_etop_hw_init(struct net_device *dev)
 
 		if (IS_TX(i)) {
 			ltq_dma_alloc_tx(&ch->dma);
-			request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+			request_irq(irq, ltq_etop_dma_irq, 0,
 				"etop_tx", priv);
 		} else if (IS_RX(i)) {
 			ltq_dma_alloc_rx(&ch->dma);
@@ -289,7 +289,7 @@ ltq_etop_hw_init(struct net_device *dev)
 				if (ltq_etop_alloc_skb(ch))
 					return -ENOMEM;
 			ch->dma.desc = 0;
-			request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+			request_irq(irq, ltq_etop_dma_irq, 0,
 				"etop_rx", priv);
 		}
 		ch->dma.irq = irq;
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 1a3033d..8abc407 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1131,7 +1131,7 @@ static int pxa168_eth_open(struct net_device *dev)
 	int err;
 
 	err = request_irq(dev->irq, pxa168_eth_int_handler,
-			  IRQF_DISABLED, dev->name, dev);
+			  0, dev->name, dev);
 	if (err) {
 		dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
 		return -EAGAIN;
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index d19c849..a6b427b 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -899,7 +899,7 @@ static int ks_net_open(struct net_device *netdev)
 	struct ks_net *ks = netdev_priv(netdev);
 	int err;
 
-#define	KS_INT_FLAGS	(IRQF_DISABLED|IRQF_TRIGGER_LOW)
+#define	KS_INT_FLAGS	(IRQF_TRIGGER_LOW)
 	/* lock the card, even if we may not actually do anything
 	 * else at the moment.
 	 */
diff --git a/drivers/net/ethernet/natsemi/jazzsonic.c b/drivers/net/ethernet/natsemi/jazzsonic.c
index fc7c6a9..ecc3467 100644
--- a/drivers/net/ethernet/natsemi/jazzsonic.c
+++ b/drivers/net/ethernet/natsemi/jazzsonic.c
@@ -84,7 +84,7 @@ static int jazzsonic_open(struct net_device* dev)
 {
 	int retval;
 
-	retval = request_irq(dev->irq, sonic_interrupt, IRQF_DISABLED,
+	retval = request_irq(dev->irq, sonic_interrupt, 0,
 				"sonic", dev);
 	if (retval) {
 		printk(KERN_ERR "%s: unable to get IRQ %d.\n",
diff --git a/drivers/net/ethernet/natsemi/xtsonic.c b/drivers/net/ethernet/natsemi/xtsonic.c
index ccf61b9..04de013 100644
--- a/drivers/net/ethernet/natsemi/xtsonic.c
+++ b/drivers/net/ethernet/natsemi/xtsonic.c
@@ -95,7 +95,7 @@ static int xtsonic_open(struct net_device *dev)
 {
 	int retval;
 
-	retval = request_irq(dev->irq, sonic_interrupt, IRQF_DISABLED,
+	retval = request_irq(dev->irq, sonic_interrupt, 0,
 				"sonic", dev);
 	if (retval) {
 		printk(KERN_ERR "%s: unable to get IRQ %d.\n",
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index 5322095..bc6cb6a 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1218,7 +1218,7 @@ static int pasemi_mac_open(struct net_device *dev)
 	snprintf(mac->tx_irq_name, sizeof(mac->tx_irq_name), "%s tx",
 		 dev->name);
 
-	ret = request_irq(mac->tx->chan.irq, pasemi_mac_tx_intr, IRQF_DISABLED,
+	ret = request_irq(mac->tx->chan.irq, pasemi_mac_tx_intr, 0,
 			  mac->tx_irq_name, mac->tx);
 	if (ret) {
 		dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n",
@@ -1229,7 +1229,7 @@ static int pasemi_mac_open(struct net_device *dev)
 	snprintf(mac->rx_irq_name, sizeof(mac->rx_irq_name), "%s rx",
 		 dev->name);
 
-	ret = request_irq(mac->rx->chan.irq, pasemi_mac_rx_intr, IRQF_DISABLED,
+	ret = request_irq(mac->rx->chan.irq, pasemi_mac_rx_intr, 0,
 			  mac->rx_irq_name, mac->rx);
 	if (ret) {
 		dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n",
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 5f53fbb..e6319f5 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -271,7 +271,7 @@ static inline void mcf_outsw(void *a, unsigned char *p, int l)
 #define SMC_insw(a, r, p, l)	mcf_insw(a + r, p, l)
 #define SMC_outsw(a, r, p, l)	mcf_outsw(a + r, p, l)
 
-#define SMC_IRQ_FLAGS		(IRQF_DISABLED)
+#define SMC_IRQ_FLAGS		(0)
 
 #else
 
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index 4f15680..5b6d9ae 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1359,7 +1359,7 @@ static int smsc9420_open(struct net_device *dev)
 	smsc9420_reg_write(pd, INT_STAT, 0xFFFFFFFF);
 	smsc9420_pci_flush_write(pd);
 
-	if (request_irq(dev->irq, smsc9420_isr, IRQF_SHARED | IRQF_DISABLED,
+	if (request_irq(dev->irq, smsc9420_isr, IRQF_SHARED,
 			DRV_NAME, pd)) {
 		smsc_warn(IFUP, "Unable to use IRQ = %d", dev->irq);
 		result = -ENODEV;
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 815c797..ba8cb9d 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1553,7 +1553,7 @@ static int emac_dev_open(struct net_device *ndev)
 
 	while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) {
 		for (i = res->start; i <= res->end; i++) {
-			if (request_irq(i, emac_irq, IRQF_DISABLED,
+			if (request_irq(i, emac_irq, 0,
 					ndev->name, ndev))
 				goto rollback;
 		}
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
index ddb33cf..b47bfe2 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
@@ -1732,7 +1732,7 @@ static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
 		goto fail_alloc_irq;
 	}
 	result = request_irq(card->irq, gelic_card_interrupt,
-			     IRQF_DISABLED, netdev->name, card);
+			     0, netdev->name, card);
 
 	if (result) {
 		dev_info(ctodev(card), "%s:request_irq failed (%d)\n",
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..636b65c 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
 	outb(0, FCR(dev->base_addr));  /* disable FIFOs */
 	outb(0x0d, MCR(dev->base_addr));
 	outb(0, IER(dev->base_addr));
-	if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	if (request_irq(dev->irq, ser12_interrupt, IRQF_SHARED,
 			"baycom_ser_fdx", dev)) {
 		release_region(dev->base_addr, SER12_EXTENT);
 		return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..f9a8976 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
 	outb(0, FCR(dev->base_addr));  /* disable FIFOs */
 	outb(0x0d, MCR(dev->base_addr));
 	outb(0, IER(dev->base_addr));
-	if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	if (request_irq(dev->irq, ser12_interrupt, IRQF_SHARED,
 			"baycom_ser12", dev)) {
 		release_region(dev->base_addr, SER12_EXTENT);       
 		return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 3365581..f432f32 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1735,7 +1735,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 			if (!Ivec[hwcfg.irq].used && hwcfg.irq)
 			{
 				if (request_irq(hwcfg.irq, scc_isr,
-						IRQF_DISABLED, "AX.25 SCC",
+						0, "AX.25 SCC",
 						(void *)(long) hwcfg.irq))
 					printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq);
 				else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 96a98d2..9d60f06 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -890,7 +890,7 @@ static int yam_open(struct net_device *dev)
 		goto out_release_base;
 	}
 	outb(0, IER(dev->base_addr));
-	if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, dev->name, dev)) {
+	if (request_irq(dev->irq, yam_interrupt, IRQF_SHARED, dev->name, dev)) {
 		printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
 		ret = -EBUSY;
 		goto out_release_base;
diff --git a/drivers/net/irda/bfin_sir.c b/drivers/net/irda/bfin_sir.c
index 9d4ce1a..529317b 100644
--- a/drivers/net/irda/bfin_sir.c
+++ b/drivers/net/irda/bfin_sir.c
@@ -410,12 +410,12 @@ static int bfin_sir_startup(struct bfin_sir_port *port, struct net_device *dev)
 
 #else
 
-	if (request_irq(port->irq, bfin_sir_rx_int, IRQF_DISABLED, "BFIN_SIR_RX", dev)) {
+	if (request_irq(port->irq, bfin_sir_rx_int, 0, "BFIN_SIR_RX", dev)) {
 		dev_warn(&dev->dev, "Unable to attach SIR RX interrupt\n");
 		return -EBUSY;
 	}
 
-	if (request_irq(port->irq+1, bfin_sir_tx_int, IRQF_DISABLED, "BFIN_SIR_TX", dev)) {
+	if (request_irq(port->irq+1, bfin_sir_tx_int, 0, "BFIN_SIR_TX", dev)) {
 		dev_warn(&dev->dev, "Unable to attach SIR TX interrupt\n");
 		free_irq(port->irq, dev);
 		return -EBUSY;
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index b45b2cc..04e4528 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1353,7 +1353,7 @@ toshoboe_net_open (struct net_device *dev)
     return 0;
 
   rc = request_irq (self->io.irq, toshoboe_interrupt,
-                    IRQF_SHARED | IRQF_DISABLED, dev->name, self);
+                    IRQF_SHARED, dev->name, self);
   if (rc)
   	return rc;
 
@@ -1560,7 +1560,7 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
   self->io.fir_base = self->base;
   self->io.fir_ext = OBOE_IO_EXTENT;
   self->io.irq = pci_dev->irq;
-  self->io.irqflags = IRQF_SHARED | IRQF_DISABLED;
+  self->io.irqflags = IRQF_SHARED;
 
   self->speed = self->io.speed = 9600;
   self->async = 0;
diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
index d275e27..bc77767 100644
--- a/drivers/net/irda/sh_irda.c
+++ b/drivers/net/irda/sh_irda.c
@@ -809,7 +809,7 @@ static int __devinit sh_irda_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ndev);
 
-	if (request_irq(irq, sh_irda_irq, IRQF_DISABLED, "sh_irda", self)) {
+	if (request_irq(irq, sh_irda_irq, 0, "sh_irda", self)) {
 		dev_warn(&pdev->dev, "Unable to attach sh_irda interrupt\n");
 		goto err_mem_4;
 	}
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index ed7d7d6..d5575f7 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -761,7 +761,7 @@ static int __devinit sh_sir_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ndev);
 
-	if (request_irq(irq, sh_sir_irq, IRQF_DISABLED, "sh_sir", self)) {
+	if (request_irq(irq, sh_sir_irq, 0, "sh_sir", self)) {
 		dev_warn(&pdev->dev, "Unable to attach sh_sir interrupt\n");
 		goto err_mem_4;
 	}
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index 3d80e42..3d74166 100644
--- a/drivers/net/wan/hostess_sv11.c
+++ b/drivers/net/wan/hostess_sv11.c
@@ -220,7 +220,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)
 	/* We want a fast IRQ for this device. Actually we'd like an even faster
 	   IRQ ;) - This is one driver RtLinux is made for */
 
-	if (request_irq(irq, z8530_interrupt, IRQF_DISABLED,
+	if (request_irq(irq, z8530_interrupt, 0,
 			"Hostess SV11", sv) < 0) {
 		pr_warn("IRQ %d already in use\n", irq);
 		goto err_irq;
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c
index 0b4fd05..6027e47 100644
--- a/drivers/net/wan/sealevel.c
+++ b/drivers/net/wan/sealevel.c
@@ -266,7 +266,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,
 	/* We want a fast IRQ for this device. Actually we'd like an even faster
 	   IRQ ;) - This is one driver RtLinux is made for */
 
-	if (request_irq(irq, z8530_interrupt, IRQF_DISABLED,
+	if (request_irq(irq, z8530_interrupt, 0,
 			"SeaLevel", dev) < 0) {
 		pr_warn("IRQ %d already in use\n", irq);
 		goto err_request_irq;
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index f18df82..c901e07 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -641,7 +641,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
 	gpio_direction_input(p54spi_gpio_irq);
 
 	ret = request_irq(gpio_to_irq(p54spi_gpio_irq),
-			  p54spi_interrupt, IRQF_DISABLED, "p54spi",
+			  p54spi_interrupt, 0, "p54spi",
 			  priv->spi);
 	if (ret < 0) {
 		dev_err(&priv->spi->dev, "request_irq() failed");
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 94c852d..1141747 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -162,7 +162,7 @@ typedef struct {
         int irq, irq2;        /* Interrupts used */
         int dma, dma2;        /* DMA channel(s) used */
         int fifo_size;        /* FIFO size */
-        int irqflags;         /* interrupt flags (ie, IRQF_SHARED|IRQF_DISABLED) */
+        int irqflags;         /* interrupt flags (ie, IRQF_SHARED) */
 	int direction;        /* Link direction, used by some FIR drivers */
 	int enabled;          /* Powered on? */
 	int suspended;        /* Suspended by APM */
-- 
1.7.4.1

^ permalink raw reply related

* [PATCH 34/57] ISDN: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21  9:28 UTC (permalink / raw)
  To: linux-arch, linux-kernel
  Cc: tglx, yong.zhang0, Armin Schindler, Karsten Keil, netdev
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>

Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 drivers/isdn/hardware/eicon/divasmain.c |    2 +-
 drivers/isdn/sc/init.c                  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index f332b60..8a0a831 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -481,7 +481,7 @@ void __inline__ outpp(void __iomem *addr, word p)
 int diva_os_register_irq(void *context, byte irq, const char *name)
 {
 	int result = request_irq(irq, diva_os_irq_wrapper,
-				 IRQF_DISABLED | IRQF_SHARED, name, context);
+				 IRQF_SHARED, name, context);
 	return (result);
 }
 
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index ca710ab..a3127fb 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -336,7 +336,7 @@ static int __init sc_init(void)
 		 */
 		sc_adapter[cinst]->interrupt = irq[b];
 		if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler,
-				IRQF_DISABLED, interface->id,
+				0, interface->id,
 				(void *)(unsigned long) cinst))
 		{
 			kfree(sc_adapter[cinst]->channel);
-- 
1.7.4.1

^ permalink raw reply related

* Re: [PATCH v6 1/8] SUNRPC: introduce helpers for reference counted rpcbind clients
From: Stanislav Kinsbursky @ 2011-09-21  9:07 UTC (permalink / raw)
  To: Trond.Myklebust@netapp.com
  Cc: linux-nfs@vger.kernel.org, Pavel Emelianov, neilb@suse.de,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bfields@fieldses.org, davem@davemloft.net
In-Reply-To: <4E7899E7.9090809@parallels.com>

v6:
1) added write memory barrier to rpcb_set_local to make sure, that rpcbind 
clients become valid before rpcb_users assignment
2) explicitly set rpcb_users to 1 instead of incrementing it (looks clearer from 
my pow).

Notice: write memory barrier after zeroing rpcbind clients in rpcb_put_local() 
is not required, since to users of them left. New user (service) will create new 
clients before dereferencing them.

This helpers will be used for dynamical creation and destruction of rpcbind
clients.
Variable rpcb_users is actually a counter of lauched RPC services. If rpcbind
clients has been created already, then we just increase rpcb_users.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>

---
  net/sunrpc/rpcb_clnt.c |   54 ++++++++++++++++++++++++++++++++++++++++++++++++
  1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index e45d2fb..9fcdb42 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -114,6 +114,9 @@ static struct rpc_program	rpcb_program;
  static struct rpc_clnt *	rpcb_local_clnt;
  static struct rpc_clnt *	rpcb_local_clnt4;

+DEFINE_SPINLOCK(rpcb_clnt_lock);
+unsigned int			rpcb_users;
+
  struct rpcbind_args {
  	struct rpc_xprt *	r_xprt;

@@ -161,6 +164,57 @@ static void rpcb_map_release(void *data)
  	kfree(map);
  }

+static int rpcb_get_local(void)
+{
+	int cnt;
+
+	spin_lock(&rpcb_clnt_lock);
+	if (rpcb_users)
+		rpcb_users++;
+	cnt = rpcb_users;
+	spin_unlock(&rpcb_clnt_lock);
+
+	return cnt;
+}
+
+void rpcb_put_local(void)
+{
+	struct rpc_clnt *clnt = rpcb_local_clnt;
+	struct rpc_clnt *clnt4 = rpcb_local_clnt4;
+	int shutdown;
+
+	spin_lock(&rpcb_clnt_lock);
+	if (--rpcb_users == 0) {
+		rpcb_local_clnt = NULL;
+		rpcb_local_clnt4 = NULL;
+	}
+	shutdown = !rpcb_users;
+	spin_unlock(&rpcb_clnt_lock);
+
+	if (shutdown) {
+		/*
+		 * cleanup_rpcb_clnt - remove xprtsock's sysctls, unregister
+		 */
+		if (clnt4)
+			rpc_shutdown_client(clnt4);
+		if (clnt)
+			rpc_shutdown_client(clnt);
+	}
+	return;
+}
+
+static void rpcb_set_local(struct rpc_clnt *clnt, struct rpc_clnt *clnt4)
+{
+	/* Protected by rpcb_create_local_mutex */
+	rpcb_local_clnt = clnt;
+	rpcb_local_clnt4 = clnt4;
+	smp_wmb();
+	rpcb_users = 1;
+	dprintk("RPC:       created new rpcb local clients (rpcb_local_clnt: "
+			"%p, rpcb_local_clnt4: %p)\n", rpcb_local_clnt,
+			rpcb_local_clnt4);
+}
+
  /*
   * Returns zero on success, otherwise a negative errno value
   * is returned.

^ permalink raw reply related

* [PATCH net-next] net: rps: fix the support for PPPOE
From: Changli Gao @ 2011-09-21  8:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Changli Gao

The upper protocol numbers of PPPOE are different, and should be treated
specially.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/core/dev.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 4b9981c..8395fea 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -135,6 +135,7 @@
 #include <linux/cpu_rmap.h>
 #include <linux/if_tunnel.h>
 #include <linux/if_pppox.h>
+#include <linux/ppp_defs.h>
 
 #include "net-sysfs.h"
 
@@ -2548,6 +2549,7 @@ void __skb_get_rxhash(struct sk_buff *skb)
 again:
 	switch (proto) {
 	case __constant_htons(ETH_P_IP):
+ip:
 		if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
 			goto done;
 
@@ -2561,6 +2563,7 @@ again:
 		nhoff += ip->ihl * 4;
 		break;
 	case __constant_htons(ETH_P_IPV6):
+ipv6:
 		if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
 			goto done;
 
@@ -2583,7 +2586,14 @@ again:
 		proto = *((__be16 *) (skb->data + nhoff +
 				      sizeof(struct pppoe_hdr)));
 		nhoff += PPPOE_SES_HLEN;
-		goto again;
+		switch (proto) {
+		case __constant_htons(PPP_IP):
+			goto ip;
+		case __constant_htons(PPP_IPV6):
+			goto ipv6;
+		default:
+			goto done;
+		}
 	default:
 		goto done;
 	}

^ permalink raw reply related

* EMail ID Awarded Nine Hundred And Fifty Thousand British Pounds In The Benz Cash Splash
From: artkearney @ 2011-09-21  8:37 UTC (permalink / raw)




send details Name, Tel, Address, Country.

^ permalink raw reply

* [patch v2] caif: add error handling for allocation
From: Dan Carpenter @ 2011-09-21  7:21 UTC (permalink / raw)
  To: Sjur Braendeland; +Cc: David S. Miller, netdev, kernel-janitors
In-Reply-To: <CAJK669Yb6V=xr9ZvQGOKGEvmzO1JGhrHD+sR69b04EQxUjOOrQ@mail.gmail.com>

The allocation of "phyinfo" wasn't checked, and also the allocation
wasn't freed on error paths.  Sjur Brændeland pointed out as well
that "phy_driver" should be freed on the error path too.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
V2:  Add a kfree(phy_driver).

diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index f07ab8c..00523ec 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -467,7 +467,7 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type,
 {
 	struct cflayer *frml;
 	struct cflayer *phy_driver = NULL;
-	struct cfcnfg_phyinfo *phyinfo;
+	struct cfcnfg_phyinfo *phyinfo = NULL;
 	int i;
 	u8 phyid;
 
@@ -482,23 +482,25 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type,
 			goto got_phyid;
 	}
 	pr_warn("Too many CAIF Link Layers (max 6)\n");
-	goto out;
+	goto out_err;
 
 got_phyid:
 	phyinfo = kzalloc(sizeof(struct cfcnfg_phyinfo), GFP_ATOMIC);
+	if (!phyinfo)
+		goto out_err;
 
 	switch (phy_type) {
 	case CFPHYTYPE_FRAG:
 		phy_driver =
 		    cfserl_create(CFPHYTYPE_FRAG, phyid, stx);
 		if (!phy_driver)
-			goto out;
+			goto out_err;
 		break;
 	case CFPHYTYPE_CAIF:
 		phy_driver = NULL;
 		break;
 	default:
-		goto out;
+		goto out_err;
 	}
 	phy_layer->id = phyid;
 	phyinfo->pref = pref;
@@ -512,10 +514,8 @@ got_phyid:
 
 	frml = cffrml_create(phyid, fcs);
 
-	if (!frml) {
-		kfree(phyinfo);
-		goto out;
-	}
+	if (!frml)
+		goto out_err;
 	phyinfo->frm_layer = frml;
 	layer_set_up(frml, cnfg->mux);
 
@@ -531,7 +531,12 @@ got_phyid:
 	}
 
 	list_add_rcu(&phyinfo->node, &cnfg->phys);
-out:
+	mutex_unlock(&cnfg->lock);
+	return;
+
+out_err:
+	kfree(phy_driver);
+	kfree(phyinfo);
 	mutex_unlock(&cnfg->lock);
 }
 EXPORT_SYMBOL(cfcnfg_add_phy_layer);

^ permalink raw reply related

* Re: [PATCH net-next-2.6 v2] can/sja1000: driver for PEAK PCAN PCI/PCIe cards
From: David Miller @ 2011-09-21  6:29 UTC (permalink / raw)
  To: wg-5Yr1BZd7O62+XT7JhA+gdA
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	Netdev-u79uwXL29TY76Z2rM5mHXA, Thomas.Wiedemann-8kCRUXUQ4vU,
	mkl-bIcnvbaLZ9MEGnE8C9+IrQ, socketcan-fJ+pQTUTwRTk1uMJSBkQmQ
In-Reply-To: <4E6F0336.1030504-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>

From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
Date: Tue, 13 Sep 2011 09:16:06 +0200

> This patch add the peak_pci driver for the PCAN PCI/PCIe cards (1, 2, 3
> or 4 channels) from PEAK Systems (http://www.peak-system.com).
> 
> Signed-off-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
> Acked-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Tested-by: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>

Applied, thanks.

^ permalink raw reply

* Re: [net] ixgbe: fix possible null buffer error
From: David Miller @ 2011-09-21  6:16 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: jesse.brandeburg, netdev, gospo, alexander.h.duyck, stable
In-Reply-To: <1316567583-28673-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 20 Sep 2011 18:13:03 -0700

> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> It seems that at least one PPC machine would occasionally give a (valid) 0 as
> the return value from dma_map, this caused the ixgbe code to not work
> correctly.  A fix is pending in the PPC tree to not return 0 from dma map, but
> we can also fix the driver to make sure we don't mess up in other arches as
> well.
> 
> This patch is applicable to all current stable kernels.
> 
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=683611
> 
> Reported-by: Neil Horman <nhorman@redhat.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> CC: Alexander Duyck <alexander.h.duyck@intel.com>
> CC: stable@kernel.org
> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2] tg3: fix VLAN tagging regression
From: David Miller @ 2011-09-21  6:15 UTC (permalink / raw)
  To: kernel; +Cc: mcarlson, mchan, netdev, linux-kernel
In-Reply-To: <4E79168D.4080201@kasperkp.dk>

From: Kasper Pedersen <kernel@kasperkp.dk>
Date: Wed, 21 Sep 2011 00:41:17 +0200

> commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
>     tg3: Simplify tx bd assignments
> 
> broke VLAN tagging on outbound packets.
> It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
> is not set anywhere. So vlan never gets set, and
> all packets are sent with vlan=0.
> 
> v2: We can just remove the test. vlan_tx_tag_present
> is valid regardless of whether the 802.1q module
> is built.
> 
> Tested on BCM5721 rev 11.
> 
> Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>

Applied.

^ permalink raw reply

* Re: [PATCH v3 1/7] Basic kernel memory functionality for the Memory Controller
From: Glauber Costa @ 2011-09-21  2:23 UTC (permalink / raw)
  To: Glauber Costa
  Cc: linux-kernel, paul, lizf, kamezawa.hiroyu, ebiederm, davem,
	gthelen, netdev, linux-mm, kirill
In-Reply-To: <1316393805-3005-2-git-send-email-glommer@parallels.com>

Hi people,

Any insights on this series?
Kame, is it inline with your expectations ?

Thank you all

On 09/18/2011 09:56 PM, Glauber Costa wrote:
> This patch lays down the foundation for the kernel memory component
> of the Memory Controller.
>
> As of today, I am only laying down the following files:
>
>   * memory.independent_kmem_limit
>   * memory.kmem.limit_in_bytes (currently ignored)
>   * memory.kmem.usage_in_bytes (always zero)
>
> Signed-off-by: Glauber Costa<glommer@parallels.com>
> CC: Paul Menage<paul@paulmenage.org>
> CC: Greg Thelen<gthelen@google.com>
> ---
>   Documentation/cgroups/memory.txt |   30 +++++++++-
>   init/Kconfig                     |   11 ++++
>   mm/memcontrol.c                  |  115 ++++++++++++++++++++++++++++++++++++--
>   3 files changed, 148 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> index 6f3c598..6f1954a 100644
> --- a/Documentation/cgroups/memory.txt
> +++ b/Documentation/cgroups/memory.txt
> @@ -44,8 +44,9 @@ Features:
>    - oom-killer disable knob and oom-notifier
>    - Root cgroup has no limit controls.
>
> - Kernel memory and Hugepages are not under control yet. We just manage
> - pages on LRU. To add more controls, we have to take care of performance.
> + Hugepages is not under control yet. We just manage pages on LRU. To add more
> + controls, we have to take care of performance. Kernel memory support is work
> + in progress, and the current version provides basically functionality.
>
>   Brief summary of control files.
>
> @@ -56,8 +57,11 @@ Brief summary of control files.
>   				 (See 5.5 for details)
>    memory.memsw.usage_in_bytes	 # show current res_counter usage for memory+Swap
>   				 (See 5.5 for details)
> + memory.kmem.usage_in_bytes	 # show current res_counter usage for kmem only.
> +				 (See 2.7 for details)
>    memory.limit_in_bytes		 # set/show limit of memory usage
>    memory.memsw.limit_in_bytes	 # set/show limit of memory+Swap usage
> + memory.kmem.limit_in_bytes	 # if allowed, set/show limit of kernel memory
>    memory.failcnt			 # show the number of memory usage hits limits
>    memory.memsw.failcnt		 # show the number of memory+Swap hits limits
>    memory.max_usage_in_bytes	 # show max memory usage recorded
> @@ -72,6 +76,9 @@ Brief summary of control files.
>    memory.oom_control		 # set/show oom controls.
>    memory.numa_stat		 # show the number of memory usage per numa node
>
> + memory.independent_kmem_limit	 # select whether or not kernel memory limits are
> +				   independent of user limits
> +
>   1. History
>
>   The memory controller has a long history. A request for comments for the memory
> @@ -255,6 +262,25 @@ When oom event notifier is registered, event will be delivered.
>     per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by
>     zone->lru_lock, it has no lock of its own.
>
> +2.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM)
> +
> + With the Kernel memory extension, the Memory Controller is able to limit
> +the amount of kernel memory used by the system. Kernel memory is fundamentally
> +different than user memory, since it can't be swapped out, which makes it
> +possible to DoS the system by consuming too much of this precious resource.
> +Kernel memory limits are not imposed for the root cgroup.
> +
> +Memory limits as specified by the standard Memory Controller may or may not
> +take kernel memory into consideration. This is achieved through the file
> +memory.independent_kmem_limit. A Value different than 0 will allow for kernel
> +memory to be controlled separately.
> +
> +When kernel memory limits are not independent, the limit values set in
> +memory.kmem files are ignored.
> +
> +Currently no soft limit is implemented for kernel memory. It is future work
> +to trigger slab reclaim when those limits are reached.
> +
>   3. User Interface
>
>   0. Configuration
> diff --git a/init/Kconfig b/init/Kconfig
> index d627783..49e5839 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -689,6 +689,17 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED
>   	  For those who want to have the feature enabled by default should
>   	  select this option (if, for some reason, they need to disable it
>   	  then swapaccount=0 does the trick).
> +config CGROUP_MEM_RES_CTLR_KMEM
> +	bool "Memory Resource Controller Kernel Memory accounting"
> +	depends on CGROUP_MEM_RES_CTLR
> +	default y
> +	help
> +	  The Kernel Memory extension for Memory Resource Controller can limit
> +	  the amount of memory used by kernel objects in the system. Those are
> +	  fundamentally different from the entities handled by the standard
> +	  Memory Controller, which are page-based, and can be swapped. Users of
> +	  the kmem extension can use it to guarantee that no group of processes
> +	  will ever exhaust kernel resources alone.
>
>   config CGROUP_PERF
>   	bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index ebd1e86..d32e931 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -73,7 +73,11 @@ static int really_do_swap_account __initdata = 0;
>   #define do_swap_account		(0)
>   #endif
>
> -
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> +int do_kmem_account __read_mostly = 1;
> +#else
> +#define do_kmem_account		0
> +#endif
>   /*
>    * Statistics for memory cgroup.
>    */
> @@ -270,6 +274,10 @@ struct mem_cgroup {
>   	 */
>   	struct res_counter memsw;
>   	/*
> +	 * the counter to account for kmem usage.
> +	 */
> +	struct res_counter kmem;
> +	/*
>   	 * Per cgroup active and inactive list, similar to the
>   	 * per zone LRU lists.
>   	 */
> @@ -321,6 +329,11 @@ struct mem_cgroup {
>   	 */
>   	unsigned long 	move_charge_at_immigrate;
>   	/*
> +	 * Should kernel memory limits be stabilished independently
> +	 * from user memory ?
> +	 */
> +	int		kmem_independent;
> +	/*
>   	 * percpu counter.
>   	 */
>   	struct mem_cgroup_stat_cpu *stat;
> @@ -388,9 +401,14 @@ enum charge_type {
>   };
>
>   /* for encoding cft->private value on file */
> -#define _MEM			(0)
> -#define _MEMSWAP		(1)
> -#define _OOM_TYPE		(2)
> +
> +enum mem_type {
> +	_MEM = 0,
> +	_MEMSWAP,
> +	_OOM_TYPE,
> +	_KMEM,
> +};
> +
>   #define MEMFILE_PRIVATE(x, val)	(((x)<<  16) | (val))
>   #define MEMFILE_TYPE(val)	(((val)>>  16)&  0xffff)
>   #define MEMFILE_ATTR(val)	((val)&  0xffff)
> @@ -3943,10 +3961,15 @@ static inline u64 mem_cgroup_usage(struct mem_cgroup *mem, bool swap)
>   	u64 val;
>
>   	if (!mem_cgroup_is_root(mem)) {
> +		val = 0;
> +		if (!mem->kmem_independent)
> +			val = res_counter_read_u64(&mem->kmem, RES_USAGE);
>   		if (!swap)
> -			return res_counter_read_u64(&mem->res, RES_USAGE);
> +			val += res_counter_read_u64(&mem->res, RES_USAGE);
>   		else
> -			return res_counter_read_u64(&mem->memsw, RES_USAGE);
> +			val += res_counter_read_u64(&mem->memsw, RES_USAGE);
> +
> +		return val;
>   	}
>
>   	val = mem_cgroup_recursive_stat(mem, MEM_CGROUP_STAT_CACHE);
> @@ -3979,6 +4002,10 @@ static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
>   		else
>   			val = res_counter_read_u64(&mem->memsw, name);
>   		break;
> +	case _KMEM:
> +		val = res_counter_read_u64(&mem->kmem, name);
> +		break;
> +
>   	default:
>   		BUG();
>   		break;
> @@ -4756,6 +4783,21 @@ static int mem_cgroup_reset_vmscan_stat(struct cgroup *cgrp,
>   	return 0;
>   }
>
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> +static u64 kmem_limit_independent_read(struct cgroup *cont, struct cftype *cft)
> +{
> +	return mem_cgroup_from_cont(cont)->kmem_independent;
> +}
> +
> +static int kmem_limit_independent_write(struct cgroup *cont, struct cftype *cft,
> +					u64 val)
> +{
> +	cgroup_lock();
> +	mem_cgroup_from_cont(cont)->kmem_independent = !!val;
> +	cgroup_unlock();
> +	return 0;
> +}
> +#endif
>
>   static struct cftype mem_cgroup_files[] = {
>   	{
> @@ -4877,6 +4919,47 @@ static int register_memsw_files(struct cgroup *cont, struct cgroup_subsys *ss)
>   }
>   #endif
>
> +
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> +static struct cftype kmem_cgroup_files[] = {
> +	{
> +		.name = "independent_kmem_limit",
> +		.read_u64 = kmem_limit_independent_read,
> +		.write_u64 = kmem_limit_independent_write,
> +	},
> +	{
> +		.name = "kmem.usage_in_bytes",
> +		.private = MEMFILE_PRIVATE(_KMEM, RES_USAGE),
> +		.read_u64 = mem_cgroup_read,
> +	},
> +	{
> +		.name = "kmem.limit_in_bytes",
> +		.private = MEMFILE_PRIVATE(_KMEM, RES_LIMIT),
> +		.read_u64 = mem_cgroup_read,
> +	},
> +};
> +
> +static int register_kmem_files(struct cgroup *cont, struct cgroup_subsys *ss)
> +{
> +	struct mem_cgroup *mem = mem_cgroup_from_cont(cont);
> +	int ret = 0;
> +
> +	if (!do_kmem_account)
> +		return 0;
> +
> +	if (!mem_cgroup_is_root(mem))
> +		ret = cgroup_add_files(cont, ss, kmem_cgroup_files,
> +					ARRAY_SIZE(kmem_cgroup_files));
> +	return ret;
> +};
> +
> +#else
> +static int register_kmem_files(struct cgroup *cont, struct cgroup_subsys *ss)
> +{
> +	return 0;
> +}
> +#endif
> +
>   static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
>   {
>   	struct mem_cgroup_per_node *pn;
> @@ -5075,6 +5158,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
>   	if (parent&&  parent->use_hierarchy) {
>   		res_counter_init(&mem->res,&parent->res);
>   		res_counter_init(&mem->memsw,&parent->memsw);
> +		res_counter_init(&mem->kmem,&parent->kmem);
>   		/*
>   		 * We increment refcnt of the parent to ensure that we can
>   		 * safely access it on res_counter_charge/uncharge.
> @@ -5085,6 +5169,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
>   	} else {
>   		res_counter_init(&mem->res, NULL);
>   		res_counter_init(&mem->memsw, NULL);
> +		res_counter_init(&mem->kmem, NULL);
>   	}
>   	mem->last_scanned_child = 0;
>   	mem->last_scanned_node = MAX_NUMNODES;
> @@ -5129,6 +5214,10 @@ static int mem_cgroup_populate(struct cgroup_subsys *ss,
>
>   	if (!ret)
>   		ret = register_memsw_files(cont, ss);
> +
> +	if (!ret)
> +		ret = register_kmem_files(cont, ss);
> +
>   	return ret;
>   }
>
> @@ -5665,3 +5754,17 @@ static int __init enable_swap_account(char *s)
>   __setup("swapaccount=", enable_swap_account);
>
>   #endif
> +
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> +static int __init disable_kmem_account(char *s)
> +{
> +	/* consider enabled if no parameter or 1 is given */
> +	if (!strcmp(s, "1"))
> +		do_kmem_account = 1;
> +	else if (!strcmp(s, "0"))
> +		do_kmem_account = 0;
> +	return 1;
> +}
> +__setup("kmemaccount=", disable_kmem_account);
> +
> +#endif

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* [net] ixgbe: fix possible null buffer error
From: Jeff Kirsher @ 2011-09-21  1:13 UTC (permalink / raw)
  To: davem
  Cc: Jesse Brandeburg, netdev, gospo, Alexander Duyck, stable,
	Jeff Kirsher

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

It seems that at least one PPC machine would occasionally give a (valid) 0 as
the return value from dma_map, this caused the ixgbe code to not work
correctly.  A fix is pending in the PPC tree to not return 0 from dma map, but
we can also fix the driver to make sure we don't mess up in other arches as
well.

This patch is applicable to all current stable kernels.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=683611

Reported-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: stable@kernel.org
Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ixgbe/ixgbe_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 2279039..e1fcc95 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1321,8 +1321,8 @@ static void ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 		if (ring_is_rsc_enabled(rx_ring))
 			pkt_is_rsc = ixgbe_get_rsc_state(rx_desc);
 
-		/* if this is a skb from previous receive DMA will be 0 */
-		if (rx_buffer_info->dma) {
+		/* linear means we are building an skb from multiple pages */
+		if (!skb_is_nonlinear(skb)) {
 			u16 hlen;
 			if (pkt_is_rsc &&
 			    !(staterr & IXGBE_RXD_STAT_EOP) &&
-- 
1.7.6.2

^ permalink raw reply related

* CONTACT UPS ON EMAIL: ups-ng@dgoh.org‏
From: Cantrell_Travis @ 2011-09-20 22:45 UTC (permalink / raw)



After much attempts to reach you on phone, I deemed it necessary and urgent to contact you via your e-mail and to notify you finally about your outstanding compensation payment.

I have sucessfully deposited your Cashier Check of $2,811,041.00 USD with the United Parcel Service (UPS). I am now in Kenya for my new job.

For more info, contact the assigned UPS agent for the delivery of your cashier check.

United Parcel Service (UPS)
Contact Name: Collins Abba
Tel: +234-818-147-7003
E-mail: ups-ng@dgoh.org<mailto:ups-ng@dgoh.org>

Please take note that you will pay a shipping/handling fee of $245.00 USD to UPS.

Thanks for your attention.

Poussin Catherine
Programme Manager
United Nations Human Settlements Programme

^ permalink raw reply

* Re: bridge carrier issue
From: Stephen Hemminger @ 2011-09-20 23:00 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20110920.152953.448244771460257273.davem@redhat.com>

Looked at dnsmasq and it needs some more work to handle IPv6 address
correctly. It sleeps if it gets a tentative address.

radvd probably has similar issues.

^ permalink raw reply

* [PATCH v2] tg3: fix VLAN tagging regression
From: Kasper Pedersen @ 2011-09-20 22:41 UTC (permalink / raw)
  To: Matt Carlson, Michael Chan; +Cc: netdev, linux-kernel
In-Reply-To: <4E78FC38.7040903@kasperkp.dk>

commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
    tg3: Simplify tx bd assignments

broke VLAN tagging on outbound packets.
It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
is not set anywhere. So vlan never gets set, and
all packets are sent with vlan=0.

v2: We can just remove the test. vlan_tx_tag_present
is valid regardless of whether the 802.1q module
is built.

Tested on BCM5721 rev 11.

Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
---
 drivers/net/tg3.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index dc3fbf6..4a1374d 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6234,12 +6234,10 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		}
 	}
 
-#ifdef BCM_KERNEL_SUPPORTS_8021Q
 	if (vlan_tx_tag_present(skb)) {
 		base_flags |= TXD_FLAG_VLAN;
 		vlan = vlan_tx_tag_get(skb);
 	}
-#endif
 
 	if (tg3_flag(tp, USE_JUMBO_BDFLAG) &&
 	    !mss && skb->len > VLAN_ETH_FRAME_LEN)

^ permalink raw reply related

* Re: [PATCH] tg3: fix VLAN tagging regression
From: Eric Dumazet @ 2011-09-20 22:11 UTC (permalink / raw)
  To: Kasper Pedersen
  Cc: Jesse Gross, Matt Carlson, Michael Chan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1316556533.5832.1.camel@edumazet-laptop>

Le mercredi 21 septembre 2011 à 00:08 +0200, Eric Dumazet a écrit :

> Thanks for finding this bug, this hit me last day on a BCM5755M but I
> had no time to investigate.
> 

I meant a BCM5715S, but its probably a generic bug anyway ;)

^ permalink raw reply

* mlx4_en drops packets on multicast join
From: Shawn Bohrer @ 2011-09-20 22:10 UTC (permalink / raw)
  To: netdev; +Cc: Yevgeny Petrilin, jackm

Hello,

I've found that using mlx4_en 1.5.4.1 available in the 3.0 kernel that
my Mellanox Technologies MT26428 will drop packets on a multicast
socket if another process does a bunch of multicast joins.  The same
behavior also occurs in the OFED 1.5.3 driver but not in the OFED 1.5.2
driver or older versions.

I've found that this only happens on sockets receiving multicast data,
and does not happen on a normal UDP socket.  When the packets are
dropped I do not see any indication of the drops in the driver or
kernel counters but only see the drops via the packet sequence
numbers.  I've also found that if the device is put in promiscuous
mode it will not drop packets.  As a secondary issue the device also
drops packets when leaving promiscuous mode though that appears to be
a different issue.

You can reproduce the issue using the iperf multicast benchmark, and
the sample program below.  For example:


server $ iperf -s -u -B 239.0.0.0 -i 1

client $ iperf -u -c 239.0.0.0 -l 16 -b 10M

# While benchmark is running
server $ ./multicast_join



/* sample multicast_join program */

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>


#define INTERFACE "10.8.16.21"
#define PORT 12345

main(int argc, char *argv[])
{
     struct sockaddr_in addr;
     int fd, i;
     struct ip_mreq mreq;
     char group[64];

     u_int yes=1;

     if ((fd=socket(AF_INET,SOCK_DGRAM,0)) < 0) {
	  perror("socket");
	  exit(1);
     }


    if (setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)) < 0) {
       perror("Reusing ADDR failed");
       exit(1);
     }

     memset(&addr,0,sizeof(addr));
     addr.sin_family=AF_INET;
     addr.sin_addr.s_addr=htonl(INADDR_ANY);
     addr.sin_port=htons(PORT);

     /* bind to receive address */
     if (bind(fd,(struct sockaddr *) &addr,sizeof(addr)) < 0) {
	  perror("bind");
	  exit(1);
     }

     for (i = 1; i < 150; ++i) {
	 sprintf(group, "239.0.0.%d", i);
	 printf("%s\n", group);
	 mreq.imr_multiaddr.s_addr=inet_addr(group);
	 mreq.imr_interface.s_addr=inet_addr(INTERFACE);
	 if (setsockopt(fd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)) < 0) {
	      perror("setsockopt");
	      exit(1);
	 }
     }
}


---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply

* Re: [PATCH] tg3: fix VLAN tagging regression
From: Eric Dumazet @ 2011-09-20 22:08 UTC (permalink / raw)
  To: Kasper Pedersen
  Cc: Jesse Gross, Matt Carlson, Michael Chan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <4E790C5E.5000000@kasperkp.dk>

Le mardi 20 septembre 2011 à 23:57 +0200, Kasper Pedersen a écrit :
> On 09/20/2011 11:27 PM, Jesse Gross wrote:
> 
> > On Tue, Sep 20, 2011 at 2:09 PM, Matt Carlson <mcarlson@broadcom.com> wrote:
> >> On Tue, Sep 20, 2011 at 01:48:56PM -0700, Kasper Pedersen wrote:
> >>> commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
> >>>     tg3: Simplify tx bd assignments
> >>>
> >>> broke VLAN tagging on outbound packets.
> >>> It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
> >>> is not set anywhere. So vlan never gets set, and
> >>> all packets are sent with vlan=0.
> >>>
> >>> Change to use the CONFIG_VLAN_xxx defines instead.
> >>> Tested on BCM5721 rev 11.
> >>>
> >>> Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
> >>
> >> Yes.  This is correct.
> >>
> >> Acked-by: Matt Carlson <mcarlson@broadcom.com>
> > 
> > Actually, please don't do this.  Those config #define's refer to the
> > 802.1q module that creates vlan devices only.  The rest of the network
> > stack has code for dealing with vlan packets that is not protected by
> > config guards, so there's no reason that drivers should be.  The
> > correct thing to do here is just drop the test altogether and
> > unconditionally include the code.
> > 
> 
> 
> currently testing, and will post a just-remove-ifdef in a few hours,
> assuming it behaves as expected on a no-802.1q-module config.
> 
> 
> tg3 has one more place where this is done, and it looks as if the code
> in that location doesn't quite mesh with the comment.

Thanks for finding this bug, this hit me last day on a BCM5755M but I
had no time to investigate.

^ permalink raw reply

* Re: [PATCH] tg3: fix VLAN tagging regression
From: Kasper Pedersen @ 2011-09-20 21:57 UTC (permalink / raw)
  To: Jesse Gross
  Cc: Matt Carlson, Michael Chan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <CAEP_g=9V=5zHqwz710TSuRSqTdo1kqkKF2VEEV6K3Tv1zupegg@mail.gmail.com>

On 09/20/2011 11:27 PM, Jesse Gross wrote:

> On Tue, Sep 20, 2011 at 2:09 PM, Matt Carlson <mcarlson@broadcom.com> wrote:
>> On Tue, Sep 20, 2011 at 01:48:56PM -0700, Kasper Pedersen wrote:
>>> commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
>>>     tg3: Simplify tx bd assignments
>>>
>>> broke VLAN tagging on outbound packets.
>>> It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
>>> is not set anywhere. So vlan never gets set, and
>>> all packets are sent with vlan=0.
>>>
>>> Change to use the CONFIG_VLAN_xxx defines instead.
>>> Tested on BCM5721 rev 11.
>>>
>>> Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
>>
>> Yes.  This is correct.
>>
>> Acked-by: Matt Carlson <mcarlson@broadcom.com>
> 
> Actually, please don't do this.  Those config #define's refer to the
> 802.1q module that creates vlan devices only.  The rest of the network
> stack has code for dealing with vlan packets that is not protected by
> config guards, so there's no reason that drivers should be.  The
> correct thing to do here is just drop the test altogether and
> unconditionally include the code.
> 


currently testing, and will post a just-remove-ifdef in a few hours,
assuming it behaves as expected on a no-802.1q-module config.


tg3 has one more place where this is done, and it looks as if the code
in that location doesn't quite mesh with the comment.

/Kasper Pedersen

^ permalink raw reply

* Re: [PATCH] tg3: fix VLAN tagging regression
From: Jesse Gross @ 2011-09-20 21:27 UTC (permalink / raw)
  To: Matt Carlson
  Cc: Kasper Pedersen, Michael Chan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <20110920210929.GA9652@mcarlson.broadcom.com>

On Tue, Sep 20, 2011 at 2:09 PM, Matt Carlson <mcarlson@broadcom.com> wrote:
> On Tue, Sep 20, 2011 at 01:48:56PM -0700, Kasper Pedersen wrote:
>> commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
>>     tg3: Simplify tx bd assignments
>>
>> broke VLAN tagging on outbound packets.
>> It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
>> is not set anywhere. So vlan never gets set, and
>> all packets are sent with vlan=0.
>>
>> Change to use the CONFIG_VLAN_xxx defines instead.
>> Tested on BCM5721 rev 11.
>>
>> Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
>
> Yes.  This is correct.
>
> Acked-by: Matt Carlson <mcarlson@broadcom.com>

Actually, please don't do this.  Those config #define's refer to the
802.1q module that creates vlan devices only.  The rest of the network
stack has code for dealing with vlan packets that is not protected by
config guards, so there's no reason that drivers should be.  The
correct thing to do here is just drop the test altogether and
unconditionally include the code.

^ permalink raw reply

* [PATCH] tg3: fix VLAN tagging regression
From: Kasper Pedersen @ 2011-09-20 20:48 UTC (permalink / raw)
  To: Matt Carlson, Michael Chan; +Cc: netdev, linux-kernel

commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
    tg3: Simplify tx bd assignments

broke VLAN tagging on outbound packets.
It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
is not set anywhere. So vlan never gets set, and
all packets are sent with vlan=0.

Change to use the CONFIG_VLAN_xxx defines instead.
Tested on BCM5721 rev 11.

Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
---
 drivers/net/tg3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index dc3fbf6..a00d21b 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6234,7 +6234,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		}
 	}
 
-#ifdef BCM_KERNEL_SUPPORTS_8021Q
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 	if (vlan_tx_tag_present(skb)) {
 		base_flags |= TXD_FLAG_VLAN;
 		vlan = vlan_tx_tag_get(skb);

^ permalink raw reply related

* Re: bridge carrier issue
From: Dan Williams @ 2011-09-20 21:12 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, shemminger
In-Reply-To: <20110920.152953.448244771460257273.davem@redhat.com>

On Tue, 2011-09-20 at 15:29 -0400, David Miller wrote:
> I'm marking the patches in patchwork on this as "deferred".
> 
> It is my opinion that we need to push back on the virtualization stuff
> because otherwise it is impossible for network manager and friends to
> operate properly.
> 
> Without the carrier going on only when a device is actually attached
> and operating, NM has no "signal" to know when it actually should do
> DHCP and whatnot.

There's stuff we're planning for NM that'll make it much more friendly
to these use-cases, but that's mostly *after* the interface is
configured and running.  What the semantics of the bring-up behavior
should be need more discussion.  ie, in the case we're talking about
here, NM wouldn't even apply a static IP configuration to the bridge
until the bridge said it was up.  That's something we can change with a
flag in the bridge's config.

Dan

> On the other hand, the virtualization tools and libraries can operate
> properly within the constraints added by the carrier behavior we have
> now.
> 
> And I also believe they can do so in a way that allows them to work
> on kernels before the carrier change.
> 
> Therefore, the only way to move forward and get everything working is
> to change the virtualization tools.
> --
> 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

* Re: [PATCH] tg3: fix VLAN tagging regression
From: Matt Carlson @ 2011-09-20 21:09 UTC (permalink / raw)
  To: Kasper Pedersen
  Cc: Matthew Carlson, Michael Chan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <4E78FC38.7040903@kasperkp.dk>

On Tue, Sep 20, 2011 at 01:48:56PM -0700, Kasper Pedersen wrote:
> commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
>     tg3: Simplify tx bd assignments
> 
> broke VLAN tagging on outbound packets.
> It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
> is not set anywhere. So vlan never gets set, and
> all packets are sent with vlan=0.
> 
> Change to use the CONFIG_VLAN_xxx defines instead.
> Tested on BCM5721 rev 11.
> 
> Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>

Yes.  This is correct.

Acked-by: Matt Carlson <mcarlson@broadcom.com>

> ---
>  drivers/net/tg3.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index dc3fbf6..a00d21b 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -6234,7 +6234,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  		}
>  	}
>  
> -#ifdef BCM_KERNEL_SUPPORTS_8021Q
> +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
>  	if (vlan_tx_tag_present(skb)) {
>  		base_flags |= TXD_FLAG_VLAN;
>  		vlan = vlan_tx_tag_get(skb);
> 
> 

^ 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