Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 0/5] bonding: Patchset for rcu use in bonding
From: Nikolay Aleksandrov @ 2013-08-29 14:28 UTC (permalink / raw)
  To: Ding Tianhong
  Cc: Jay Vosburgh, Andy Gospodarek, David S. Miller, Veaceslav Falico,
	Netdev
In-Reply-To: <521D7AA3.6030205@huawei.com>

On 08/28/2013 06:20 AM, Ding Tianhong wrote:
> Hi:
> 
> The Patch Set convert the xmit of 3ad and alb mode to use rcu lock.
> replace and add more rcu list function.
> fix a bug to protect bonding_store_xmit_hash().
> 
> I test well and no problems found till now.
> 
> Ding Tianhong (3):
> Wang Yufen (1):
> Yang Yingliang (1):
>   bonding: simplify and use RCU protection for 3ad xmit path
>   bonding: replace read_lock to rcu_read_lock for
>   bond_3ad_get_active_agg_info()
>   bonding: add rtnl lock for bonding_store_xmit_hash
>   bonding: restructure and simplify bond_for_each_slave_next()
>   bonding: use RCU protection for alb xmit path
> 
>  drivers/net/bonding/bond_3ad.c   | 35 +++++++++++++++-------------------
>  drivers/net/bonding/bond_alb.c   | 23 ++++++++++------------
>  drivers/net/bonding/bond_main.c  |  6 ++----
>  drivers/net/bonding/bond_sysfs.c |  4 ++++
>  drivers/net/bonding/bonding.h    | 41 ++++++++++++++++++++++++++++++++++++----
>  5 files changed, 68 insertions(+), 41 deletions(-)
> 
Thanks for the work, I was on vacation and travelling after my initial RCU
conversion so I got a little behind with these conversions, my idea was quite
different :-)
Anyway, I'd also appreciate some benchmarks, also some more information on what
type of testing did you run ?
I've given some preliminary comments to the patches, I'll have to think more
about them in this form.

Cheers,
 Nik

^ permalink raw reply

* Re: [PATCH 5/5] bonding: use RCU protection for alb xmit path
From: Nikolay Aleksandrov @ 2013-08-29 14:35 UTC (permalink / raw)
  To: Ding Tianhong
  Cc: Jay Vosburgh, Andy Gospodarek, David S. Miller, Veaceslav Falico,
	Netdev, Hideaki YOSHIFUJI
In-Reply-To: <521D7ACC.5010000@huawei.com>

On 08/28/2013 06:21 AM, Ding Tianhong wrote:
> The commit 278b20837511776dc9d5f6ee1c7fabd5479838bb
> (bonding: initial RCU conversion) has convert the roundrobin, active-backup,
> broadcast and xor xmit path to rcu protection, the performance will be better
> for these mode, so this time, convert xmit path for alb mode.
> 
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Cc: Nikolay Aleksandrov <nikolay@redhat.com>
> Cc: Veaceslav Falico <vfalico@redhat.com>
> ---
>  drivers/net/bonding/bond_alb.c | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
> index d266c56..e94a5d0 100644
> --- a/drivers/net/bonding/bond_alb.c
> +++ b/drivers/net/bonding/bond_alb.c
> @@ -229,7 +229,7 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
>  	max_gap = LLONG_MIN;
>  
>  	/* Find the slave with the largest gap */
> -	bond_for_each_slave(bond, slave) {
> +	bond_for_each_slave_rcu(bond, slave) {
>  		if (SLAVE_IS_OK(slave)) {
>  			long long gap = compute_gap(slave);
>  
> @@ -625,10 +625,12 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
>  {
>  	struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
>  	struct arp_pkt *arp = arp_pkt(skb);
> -	struct slave *assigned_slave;
> +	struct slave *assigned_slave, *curr_active_slave;
>  	struct rlb_client_info *client_info;
>  	u32 hash_index = 0;
>  
> +	curr_active_slave = rcu_dereference(bond->curr_active_slave);
> +
>  	_lock_rx_hashtbl(bond);
>  
>  	hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_dst));
> @@ -654,9 +656,9 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
>  			 * move the old client to primary (curr_active_slave) so
>  			 * that the new client can be assigned to this entry.
>  			 */
> -			if (bond->curr_active_slave &&
> -			    client_info->slave != bond->curr_active_slave) {
> -				client_info->slave = bond->curr_active_slave;
> +			if (curr_active_slave &&
> +			    client_info->slave != curr_active_slave) {
> +				client_info->slave = curr_active_slave;
>  				rlb_update_client(client_info);
>  			}
>  		}
> @@ -1336,8 +1338,6 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
>  
In bond_alb_xmit we may call rlb_arp_xmit which calls bond_slave_has_mac() which
is not using RCU primitives to traverse the list.

>  	/* make sure that the curr_active_slave do not change during tx
>  	 */
> -	read_lock(&bond->lock);
> -	read_lock(&bond->curr_slave_lock);
>  
>  	switch (ntohs(skb->protocol)) {
>  	case ETH_P_IP: {
> @@ -1420,12 +1420,12 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
>  
>  	if (!tx_slave) {
>  		/* unbalanced or unassigned, send through primary */
> -		tx_slave = bond->curr_active_slave;
> +		tx_slave = rcu_dereference(bond->curr_active_slave);
>  		bond_info->unbalanced_load += skb->len;
>  	}
>  
>  	if (tx_slave && SLAVE_IS_OK(tx_slave)) {
> -		if (tx_slave != bond->curr_active_slave) {
> +		if (tx_slave != rcu_dereference(bond->curr_active_slave)) {
>  			memcpy(eth_data->h_source,
>  			       tx_slave->dev->dev_addr,
>  			       ETH_ALEN);
> @@ -1440,8 +1440,6 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
>  		}
>  	}
>  
> -	read_unlock(&bond->curr_slave_lock);
> -	read_unlock(&bond->lock);
>  	if (res) {
>  		/* no suitable interface, frame not sent */
>  		kfree_skb(skb);
> 

^ permalink raw reply

* [PATCH] r8169: add ethtool eeprom change/dump feature
From: Peter Wu @ 2013-08-29 14:44 UTC (permalink / raw)
  To: netdev, Francois Romieu, hayeswang; +Cc: lekensteyn, Ben Hutchings

This adds the ability to read and change EEPROM for 93C46/93C56 serial
EEPROM. Two-Wire serial interface and SPI are not supported. (Do not
even try this for SPI or other chips, it may break your hardware.)

Works with RTL8169SCL (driver detects RTL8169sb), with some quirks. Not
sure if it is a hardware bug, but to be able to read EEPROM, one has
to write something, e.g.:

    printf '\0\0' | ethtool -E eth0 magic 0x8169 offset 0x40 length 2

Otherwise, only zeroes are read. Another note for this NIC, one has to
"enable" the eeprom by writing to it (as shown above) and then make the
NIC to reload the contents from firmware such that the PCI ID gets
detected correctly (10ec:8169 instead of 10ec:8129). Reload by writing
0x40 (Auto-load) to register 0x50 (9346CR):

    printf '\x40' | dd seek=80 bs=1 \
        of=/sys/bus/pci/devices/0000:03:00.0/resource0

Then detach and rescan the PCI device (use `lspci -tv` to find parent):

    echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
    echo 1 > /sys/bus/pci/devices/0000\:02\:00.0/rescan

After this, this RTL8169sb PCI GbE NIC appears to work.

On a second RTL8188E onboard GbE chip, EEPROM cannot be dumped, writing
also does nothing. Here, reads all return FFs.

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
---
Hi,

An RFC of this patch was created a month ago[1]. Ben Hutchings suggested
to drop the CONFIG knob and always include the ethtool operations for
getting and setting the EEPROM, so I did that for later versions. This
new patch also checks the EEPROM size (depends on whether 93C46 or 93C56
is used) and has a minor style fix (brace on new line).

I do not know why exactly I have to do funky things with the EEPROM to
fix the PCI IDs. Hayes, perhaps you have an idea?

[ lspci of broken device ]
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8129 [10ec:8129] (rev 10)
        Subsystem: Coreco Inc RT8129 Fast Ethernet Adapter [11ec:8129]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 19
        Region 0: I/O ports at e000 [size=256]
        Region 1: Memory at f7b41000 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at f7b00000 [disabled] [size=256K]
        Capabilities: [dc] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot-,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pci-stub
        Kernel modules: r8169, 8139too

[ lspci after EEPROM activation, working device ]
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8129 [10ec:8129] (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. Device [10ec:8169]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32 (8000ns min, 16000ns max), Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: I/O ports at e000 [size=256]
        Region 1: [virtual] Memory at f7b41000 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at f7b00000 [disabled] [size=256K]
        Capabilities: [dc] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: r8169
        Kernel modules: r8169, 8139too

Note: while writing the EEPROM while the card is "broken", I see the
following in my dmesg:

    eeprom_93cx6_write: timeout

FWIW, two photos of this card can be found on
https://lekensteyn.nl/files/realtek/ (this Lefen BL-L8169-2 card was
bought via eBay).

Regards,
Peter

 [1]: http://lkml.kernel.org/r/1906856.2MoFjQXLhS@al
---
 drivers/net/ethernet/realtek/Kconfig |   1 +
 drivers/net/ethernet/realtek/r8169.c | 158 ++++++++++++++++++++++++++++++++++-
 2 files changed, 156 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/realtek/Kconfig b/drivers/net/ethernet/realtek/Kconfig
index ae5d027..d0d5b94 100644
--- a/drivers/net/ethernet/realtek/Kconfig
+++ b/drivers/net/ethernet/realtek/Kconfig
@@ -106,6 +106,7 @@ config R8169
 	select FW_LOADER
 	select CRC32
 	select MII
+	select EEPROM_93CX6
 	---help---
 	  Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter.
 
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f87f2c..35922b0 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -28,6 +28,7 @@
 #include <linux/firmware.h>
 #include <linux/pci-aspm.h>
 #include <linux/prefetch.h>
+#include <linux/eeprom_93cx6.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -348,6 +349,7 @@ enum rtl_registers {
 #define	RXCFG_DMA_SHIFT			8
 					/* Unlimited maximum PCI burst. */
 #define	RX_DMA_BURST			(7 << RXCFG_DMA_SHIFT)
+#define	RX_9356SEL			(1 << 6) /* EEPROM type */
 
 	RxMissed	= 0x4c,
 	Cfg9346		= 0x50,
@@ -412,7 +414,8 @@ enum rtl8168_8101_registers {
 	DBG_REG			= 0xd1,
 #define	FIX_NAK_1			(1 << 4)
 #define	FIX_NAK_2			(1 << 3)
-	TWSI			= 0xd2,
+	TWSI			= 0xd2, /* Two Wire Serial Interface */
+#define	TWSI_TYPE_EEPROM		(1 << 2)
 	MCU			= 0xd3,
 #define	NOW_IS_OOB			(1 << 7)
 #define	TX_EMPTY			(1 << 5)
@@ -504,8 +507,14 @@ enum rtl_register_content {
 	FSWInt		= 0x01,		/* Forced software interrupt */
 
 	/* Cfg9346Bits */
-	Cfg9346_Lock	= 0x00,
-	Cfg9346_Unlock	= 0xc0,
+	Cfg9346_Lock	= (0 << 6),	/* Normal communication mode */
+	Cfg9346_Program	= (2 << 6),	/* Programming mode */
+	Cfg9346_Unlock	= (3 << 6),	/* config register write enable */
+
+	Cfg9346_EECS	= (1 << 3),	/* Chip select */
+	Cfg9346_EESK	= (1 << 2),	/* Serial data clock */
+	Cfg9346_EEDI	= (1 << 1),	/* Data input */
+	Cfg9346_EEDO	= (1 << 0),	/* Data output */
 
 	/* rx_mode_bits */
 	AcceptErr	= 0x20,
@@ -1643,6 +1652,146 @@ static int rtl8169_get_regs_len(struct net_device *dev)
 	return R8169_REGS_SIZE;
 }
 
+static int rtl8169_get_eeprom_len(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+
+	if (RTL_R8(TWSI) & TWSI_TYPE_EEPROM)
+		return 0; /* 2-Wire Interface is unsupported for now */
+
+	/* 3-Wire Interface */
+	if (RTL_R8(RxConfig) & RX_9356SEL)
+		return 256; /* 93C56/93C66 */
+	else
+		return 128; /* 93C46 */
+}
+
+static void rtl_eeprom_read(struct eeprom_93cx6 *eeprom)
+{
+	void __iomem *ioaddr = eeprom->data;
+	u8 reg = RTL_R8(Cfg9346);
+
+	eeprom->reg_data_in = reg & Cfg9346_EEDI;
+	eeprom->reg_data_out = reg & Cfg9346_EEDO;
+	eeprom->reg_data_clock = reg & Cfg9346_EESK;
+	eeprom->reg_chip_select = reg & Cfg9346_EECS;
+}
+
+static void rtl_eeprom_write(struct eeprom_93cx6 *eeprom)
+{
+	void __iomem *ioaddr = eeprom->data;
+	u8 reg = Cfg9346_Program;
+
+	if (eeprom->reg_data_in)
+		reg |= Cfg9346_EEDI;
+	if (eeprom->reg_data_clock)
+		reg |= Cfg9346_EESK;
+	if (eeprom->reg_chip_select)
+		reg |= Cfg9346_EECS;
+
+	RTL_W8(Cfg9346, reg);
+	udelay(3); /* matches RTL_CLOCK_RATE in r8168 */
+}
+
+static void rtl_init_93cx6(void __iomem *ioaddr, struct eeprom_93cx6 *eeprom)
+{
+	eeprom->data = ioaddr;
+	eeprom->register_read = rtl_eeprom_read;
+	eeprom->register_write = rtl_eeprom_write;
+
+	/* assume 3-Wire Interface, not TWI */
+	if (RTL_R8(RxConfig) & RX_9356SEL)
+		eeprom->width = PCI_EEPROM_WIDTH_93C56;
+	else
+		eeprom->width = PCI_EEPROM_WIDTH_93C46;
+}
+
+/* semi-randomly chosen magic for ethtool --change-eeprom option */
+#define R8169_EEPROM_MAGIC (0x00008169)
+
+static int rtl8169_get_eeprom(struct net_device *dev,
+		struct ethtool_eeprom *ee_eeprom, u8 *data)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+	struct eeprom_93cx6 eeprom;
+	int i = 0;
+	u8 offset = ee_eeprom->offset >> 1;
+	u16 val;
+
+	ee_eeprom->magic = R8169_EEPROM_MAGIC;
+
+	rtl_lock_work(tp);
+	rtl_init_93cx6(ioaddr, &eeprom);
+
+	/* Do not use eeprom_93cx6_multiread, that returns data in an array of
+	 * little endian words which is not compatible with BE arches. */
+
+	if (ee_eeprom->offset & 1) {
+		eeprom_93cx6_read(&eeprom, offset++, &val);
+		data[i++] = val >> 8;
+	}
+
+	while (i < ee_eeprom->len - 1) {
+		eeprom_93cx6_read(&eeprom, offset++, &val);
+		data[i++] = val & 0xFF;
+		data[i++] = val >> 8;
+	}
+
+	if (i < ee_eeprom->len) {
+		eeprom_93cx6_read(&eeprom, offset, &val);
+		data[i] = val & 0xFF;
+	}
+
+	RTL_W8(Cfg9346, Cfg9346_Lock);
+	rtl_unlock_work(tp);
+	return 0;
+}
+
+static int rtl8169_set_eeprom(struct net_device *dev,
+		struct ethtool_eeprom *ee_eeprom, u8 *data)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+	struct eeprom_93cx6 eeprom;
+	int i = 0;
+	u8 offset = ee_eeprom->offset >> 1;
+	u16 val;
+
+	if (ee_eeprom->magic != R8169_EEPROM_MAGIC)
+		return -EINVAL;
+
+	rtl_lock_work(tp);
+	rtl_init_93cx6(ioaddr, &eeprom);
+	eeprom_93cx6_wren(&eeprom, true);
+
+	if (ee_eeprom->offset & 1) {
+		eeprom_93cx6_read(&eeprom, offset, &val);
+		val &= 0xFF;
+		val |= ((u16)data[i++]) << 8;
+		eeprom_93cx6_write(&eeprom, offset++, val);
+	}
+
+	while (i < ee_eeprom->len - 1) {
+		val = data[i++];
+		val |= ((u16)data[i++]) << 8;
+		eeprom_93cx6_write(&eeprom, offset++, val);
+	}
+
+	if (i < ee_eeprom->len) {
+		eeprom_93cx6_read(&eeprom, offset, &val);
+		val &= 0xFF00;
+		val |= data[i++];
+		eeprom_93cx6_write(&eeprom, offset, val);
+	}
+
+	eeprom_93cx6_wren(&eeprom, false);
+	RTL_W8(Cfg9346, Cfg9346_Lock);
+	rtl_unlock_work(tp);
+	return 0;
+}
+
 static int rtl8169_set_speed_tbi(struct net_device *dev,
 				 u8 autoneg, u16 speed, u8 duplex, u32 ignored)
 {
@@ -2025,6 +2174,9 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
 	.get_drvinfo		= rtl8169_get_drvinfo,
 	.get_regs_len		= rtl8169_get_regs_len,
 	.get_link		= ethtool_op_get_link,
+	.get_eeprom_len		= rtl8169_get_eeprom_len,
+	.get_eeprom		= rtl8169_get_eeprom,
+	.set_eeprom		= rtl8169_set_eeprom,
 	.get_settings		= rtl8169_get_settings,
 	.set_settings		= rtl8169_set_settings,
 	.get_msglevel		= rtl8169_get_msglevel,
-- 
1.8.4

^ permalink raw reply related

* Re: [PATCH v2] tipc: set sk_err correctly when connection fails
From: Paul Gortmaker @ 2013-08-29 15:03 UTC (permalink / raw)
  To: erik.hugne; +Cc: netdev, ying.xue, jon.maloy, tipc-discussion, nhan.tt.vo
In-Reply-To: <1377674998-18872-1-git-send-email-erik.hugne@ericsson.com>

On 13-08-28 03:29 AM, erik.hugne@ericsson.com wrote:
> From: Erik Hugne <erik.hugne@ericsson.com>
> 
> Should a connect fail, if the publication/server is unavailable or
> due to some other error, a positive value will be returned and errno
> is never set. If the application code checks for an explicit zero
> return from connect (success) or a negative return (failure), it
> will not catch the error and subsequent send() calls will fail as
> shown from the strace snippet below.
> 
> socket(0x1e /* PF_??? */, SOCK_SEQPACKET, 0) = 3
> connect(3, {sa_family=0x1e /* AF_??? */, sa_data="\2\1\322\4\0\0\322\4\0\0\0\0\0\0"}, 16) = 111
> sendto(3, "test", 4, 0, NULL, 0)        = -1 EPIPE (Broken pipe)
> 
> The reason for this behaviour is that TIPC wrongly inverts error
> codes set in sk_err.
> 
> Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
> ---
> 
> [v2: add more details to commit message]

Thanks -- this now conveys the required triplet: 1) user visible symptom,
2) underlying technical cause, and 3) the why and how of the fix.

Paul.
--

^ permalink raw reply

* Re: Is fallback vhost_net to qemu for live migrate available?
From: Anthony Liguori @ 2013-08-29 16:08 UTC (permalink / raw)
  To: Qin Chuanyu
  Cc: Michael S. Tsirkin, jasowang, KVM list, netdev, qianhuibin,
	xen-devel@lists.xen.org
In-Reply-To: <521C1DCF.5090202@huawei.com>

Hi Qin,

On Mon, Aug 26, 2013 at 10:32 PM, Qin Chuanyu <qinchuanyu@huawei.com> wrote:
> Hi all
>
> I am participating in a project which try to port vhost_net on Xen。

Neat!

> By change the memory copy and notify mechanism ,currently virtio-net with
> vhost_net could run on Xen with good performance。

I think the key in doing this would be to implement a property
ioeventfd and irqfd interface in the driver domain kernel.  Just
hacking vhost_net with Xen specific knowledge would be pretty nasty
IMHO.

Did you modify the front end driver to do grant table mapping or is
this all being done by mapping the domain's memory?

> TCP receive throughput of
> single vnic from 2.77Gbps up to 6Gps。In VM receive side,I instead grant_copy
> with grant_map + memcopy,it efficiently reduce the cost of grant_table
> spin_lock of dom0,So the hole server TCP performance from 5.33Gps up to
> 9.5Gps。
>
> Now I am consider the live migrate of vhost_net on Xen,vhost_net use
> vhost_log for live migrate on Kvm,but qemu on Xen havn't manage the hole
> memory of VM,So I am trying to fallback datapath from vhost_net to qemu when
> doing live migrate ,and fallback datapath from qemu to
> vhost_net again after vm migrate to new server。

KVM and Xen represent memory in a very different way.  KVM can only
track when guest mode code dirties memory.  It relies on QEMU to track
when guest memory is dirtied by QEMU.  Since vhost is running outside
of QEMU, vhost also needs to tell QEMU when it has dirtied memory.

I don't think this is a problem with Xen though.  I believe (although
could be wrong) that Xen is able to track when either the domain or
dom0 dirties memory.

So I think you can simply ignore the dirty logging with vhost and it
should Just Work.

>
> My question is:
>         why didn't vhost_net do the same fallback operation for live migrate
> on KVM,but use vhost_log to mark the dirty page?
>         Is there any mechanism fault for the idea of fallback datapath from
> vhost_net to qemu for live migrate?

No, we don't have a mechanism to fallback  to QEMU for the datapath.
It would be possible but I think it's a bad idea to mix and match the
two.

Regards,

Anthony Liguori

> any question about the detail of vhost_net on Xen is welcome。
>
> Thanks
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" 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

* [PATCH net-next] net: ipv6: mldv1/v2: fix switchback timeout to rfc3810, 9.12.
From: Daniel Borkmann @ 2013-08-29 16:09 UTC (permalink / raw)
  To: davem; +Cc: netdev, David Stevens, Hannes Frederic Sowa

i) RFC3810, 9.2. Query Interval [QI] says:

   The Query Interval variable denotes the interval between General
   Queries sent by the Querier. Default value: 125 seconds. [...]

ii) RFC3810, 9.3. Query Response Interval [QRI] says:

  The Maximum Response Delay used to calculate the Maximum Response
  Code inserted into the periodic General Queries. Default value:
  10000 (10 seconds) [...] The number of seconds represented by the
  [Query Response Interval] must be less than the [Query Interval].

iii) RFC3810, 9.12. Older Version Querier Present Timeout [OVQPT] says:

  The Older Version Querier Present Timeout is the time-out for
  transitioning a host back to MLDv2 Host Compatibility Mode. When an
  MLDv1 query is received, MLDv2 hosts set their Older Version Querier
  Present Timer to [Older Version Querier Present Timeout].

  This value MUST be ([Robustness Variable] times (the [Query Interval]
  in the last Query received)) plus ([Query Response Interval]).

Hence, on default the timeout results in:

  [RV] = 2, [QI] = 125sec, [QRI] = 10sec
  [OVQPT] = [RV] * [QI] + [QRI] = 260sec

Having that said, we currently calculate [OVQPT] (here given as 'switchback'
variable) as ...

  switchback = (idev->mc_qrv + 1) * max_delay

Looking at bridging multicast code for MLDv1, we can see that [QRI] resp.
Maximum Response Delay is encoded into mld->mld_maxdelay, so getting [QRI]
in MLDv1 the way we do is correct, but [QI] does not appear in our current
switch back variant. Side note: briding code will set its timers as follows:

  ...
  br->multicast_query_response_interval = 10 * HZ;
  br->multicast_startup_query_interval = 125 * HZ / 4;
  br->multicast_query_interval = 125 * HZ;
  ...

Concluding, the current behaviour in IPv6's multicast code is not conform
to the RFC as switch back is calculated wrongly. That is, it has a too small
value, so MLDv2 hosts switch back again to MLDv2 way too early.

On the other hand, RFC3810, 9.12. says "the [Query Interval] in the last Query
received". In section "9.14. Configuring timers", it is said:

  This section is meant to provide advice to network administrators on
  how to tune these settings to their network. Ambitious router
  implementations might tune these settings dynamically based upon
  changing characteristics of the network. [...]

iv) RFC38010, 9.14.2. Query Interval:

  The overall level of periodic MLD traffic is inversely proportional
  to the Query Interval. A longer Query Interval results in a lower
  overall level of MLD traffic. The value of the Query Interval MUST
  be equal to or greater than the Maximum Response Delay used to
  calculate the Maximum Response Code inserted in General Query
  messages.

I assume that is why switchback is calculated as is (3 * max_delay), although
this setting seems to be meant for routers only to configure their [QI]
interval for non-default intervals.

Also again, looking at the 'opposite site' in bridging code, the following
is happening: If a bridge sends out a query itself via br_multicast_send_query(),
multicast_query_timer is reset with br->multicast_query_interval (if we're not
in startup), that is on default 125 * HZ.

Therefore, when an MLDv1 query is received fix it up to use the default
timeout of 125 * HZ (as we also have in bridging code for intervals
queries are sent).

Next to that, a follow-up patch after the fix could make MLD_QI_DEFAULT tunable
per idev.

Introduced in 06da92283 ("[IPV6]: Add MLDv2 support.").

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: David Stevens <dlstevens@us.ibm.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 - I chose net-next as this is not something critical such as fixing a panic.
 - Note, commit 06da92283 is in linux-history tree.
 - David Stevens, it would be great if you could comment on this. :)

 net/ipv6/mcast.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 98ead2b..4b0aa5a 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -108,6 +108,8 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
 			    struct inet6_dev *idev);
 
 #define MLD_QRV_DEFAULT		2
+/* RFC3810, 9.2. Query Interval */
+#define MLD_QI_DEFAULT		(125 * HZ)
 
 /* RFC3810, 8.1 Query Version Distinctions */
 #define MLD_V1_QUERY_LEN	24
@@ -1150,11 +1152,24 @@ int igmp6_event_query(struct sk_buff *skb)
 		return -EINVAL;
 
 	if (len == MLD_V1_QUERY_LEN) {
+		int mc_qi = MLD_QI_DEFAULT;
 		int switchback;
 		/* MLDv1 router present */
 
+		/* RFC3810, 9.12. Older Version Querier Present Timeout:
+		 *
+		 * The Older Version Querier Present Timeout is the time-out
+		 * for transitioning a host back to MLDv2 Host Compatibility
+		 * Mode. When an MLDv1 query is received, MLDv2 hosts set
+		 * their Older Version Querier Present Timer to [Older Version
+		 * Querier Present Timeout].
+		 *
+		 * This value MUST be ([Robustness Variable] times (the
+		 * [Query Interval] in the last Query received)) plus
+		 * ([Query Response Interval]).
+		 */
 		max_delay = msecs_to_jiffies(ntohs(mld->mld_maxdelay));
-		switchback = (idev->mc_qrv + 1) * max_delay;
+		switchback = idev->mc_qrv * mc_qi + max_delay;
 		idev->mc_v1_seen = jiffies + switchback;
 
 		/* cancel the interface change timer */
-- 
1.7.11.7

^ permalink raw reply related

* Re: [net-next v2 1/2] vxlan: Notify drivers for listening UDP port changes
From: Joseph Gasparakis @ 2013-08-29 16:49 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: Jeff Kirsher, davem, Joseph Gasparakis, netdev, gospo, sassmann,
	John Fastabend, Stephen Hemminger
In-Reply-To: <20130829141904.GB1450@minipsycho.brq.redhat.com>



On Thu, 29 Aug 2013, Jiri Pirko wrote:

> Thu, Aug 29, 2013 at 02:54:37PM CEST, jeffrey.t.kirsher@intel.com wrote:
> >From: Joseph Gasparakis <joseph.gasparakis@intel.com>
> >
> >This patch adds two more ndo ops: ndo_add_rx_vxlan_port() and
> >ndo_del_rx_vxlan_port().
> >
> >Drivers can get notifications through the above functions about changes
> >of the UDP listening port of VXLAN. Also, when physical ports come up,
> >now they can call vxlan_get_rx_port() in order to obtain the port number(s)
> >of the existing VXLAN interface in case they already up before them.
> >
> >This information about the listening UDP port would be used for VXLAN
> >related offloads.
> >
> >A big thank you to John Fastabend (john.r.fastabend@intel.com) for his input
> >and his suggestions on this patch set.
> >
> >CC: John Fastabend <john.r.fastabend@intel.com>
> >CC: Stephen Hemminger <stephen@networkplumber.org>
> >Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
> >Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> >---
> >v2: Now locking on sock_lock around vxlan_get_rx_port() in order to avoid
> >    races with vxlan removing ports and drivers still keeping resources for
> >    them.
> >---
> > drivers/net/vxlan.c       | 56 ++++++++++++++++++++++++++++++++++++++++++++++-
> > include/linux/netdevice.h | 16 ++++++++++++++
> > include/net/vxlan.h       |  1 +
> > 3 files changed, 72 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> >index 3b21aca..65d1df5 100644
> >--- a/drivers/net/vxlan.c
> >+++ b/drivers/net/vxlan.c
> >@@ -456,6 +456,32 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
> > 	return 1;
> > }
> > 
> >+/* Notify netdevs that UDP port started listening */
> >+static void vxlan_notify_add_rx_port(struct net *net, __be16 port)
> >+{
> >+	struct net_device *dev;
> >+
> >+	rcu_read_lock();
> >+	for_each_netdev_rcu(net, dev) {
> >+		if (dev->netdev_ops->ndo_add_vxlan_port)
> >+			dev->netdev_ops->ndo_add_vxlan_port(dev, htons(port));
> >+	}
> 
> 
> Is it really desirable to notify *all* devices? Even those who are not
> involved in vxlan traffic? I think that only affected devices should be
> notified. Lower device list being currently introduced by:
> "[PATCH net-next v3 02/13] net: add lower_dev_list to net_device and make a full mesh"
> Could be used for this.
>

Just to be clear this notifies the devices that implement 
ndo_add_vxlan_port, not all (which I think is what you meant anyway). 
About lower_dev_list, VXLAN implementation is not like VLAN where you know 
which dev you will be transmitting on in advance, hence we need to notify 
all the devices that implement the ndo's.
 
> 
> >+	rcu_read_unlock();
> >+}
> >+
> >+/* Notify netdevs that UDP port is no more listening */
> >+static void vxlan_notify_del_rx_port(struct net *net, __be16 port)
> >+{
> >+	struct net_device *dev;
> >+
> >+	rcu_read_lock();
> >+	for_each_netdev_rcu(net, dev) {
> >+		if (dev->netdev_ops->ndo_del_vxlan_port)
> >+			dev->netdev_ops->ndo_del_vxlan_port(dev, htons(port));
> >+	}
> >+	rcu_read_unlock();
> >+}
> >+
> > /* Add new entry to forwarding table -- assumes lock held */
> > static int vxlan_fdb_create(struct vxlan_dev *vxlan,
> > 			    const u8 *mac, __be32 ip,
> >@@ -797,13 +823,15 @@ static void vxlan_sock_hold(struct vxlan_sock *vs)
> > 
> > void vxlan_sock_release(struct vxlan_sock *vs)
> > {
> >-	struct vxlan_net *vn = net_generic(sock_net(vs->sock->sk), vxlan_net_id);
> >+	struct net *net = sock_net(vs->sock->sk);
> >+	struct vxlan_net *vn = net_generic(net, vxlan_net_id);
> > 
> > 	if (!atomic_dec_and_test(&vs->refcnt))
> > 		return;
> > 
> > 	spin_lock(&vn->sock_lock);
> > 	hlist_del_rcu(&vs->hlist);
> >+	vxlan_notify_del_rx_port(net, inet_sk(vs->sock->sk)->inet_sport);
> > 	spin_unlock(&vn->sock_lock);
> > 
> > 	queue_work(vxlan_wq, &vs->del_work);
> >@@ -1543,6 +1571,31 @@ static struct device_type vxlan_type = {
> > 	.name = "vxlan",
> > };
> > 
> >+/* Calls the ndo_add_vxlan_port of the caller in order to
> >+ * supply the listening VXLAN udp ports.
> >+ */
> >+void vxlan_get_rx_port(struct net_device *dev)
> >+{
> >+	struct vxlan_sock *vs;
> >+	struct net *net = dev_net(dev);
> >+	struct vxlan_net *vn = net_generic(net, vxlan_net_id);
> >+	u16 port;
> >+	int i;
> >+
> >+	if (!dev || !dev->netdev_ops || !dev->netdev_ops->ndo_add_vxlan_port)
> >+		return;
> >+
> >+	spin_lock(&vn->sock_lock);
> >+	for (i = 0; i < PORT_HASH_SIZE; ++i) {
> >+		hlist_for_each_entry_rcu(vs, vs_head(net, i), hlist) {
> >+			port = htons(inet_sk(vs->sock->sk)->inet_sport);
> >+			dev->netdev_ops->ndo_add_vxlan_port(dev, port);
> >+		}
> >+	}
> >+	spin_unlock(&vn->sock_lock);
> >+}
> >+EXPORT_SYMBOL_GPL(vxlan_get_rx_port);
> >+
> > /* Initialize the device structure. */
> > static void vxlan_setup(struct net_device *dev)
> > {
> >@@ -1723,6 +1776,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port,
> > 	inet_sk(sk)->mc_loop = 0;
> > 	spin_lock(&vn->sock_lock);
> > 	hlist_add_head_rcu(&vs->hlist, vs_head(net, port));
> >+	vxlan_notify_add_rx_port(net, port);
> > 	spin_unlock(&vn->sock_lock);
> > 
> > 	/* Mark socket as an encapsulation socket. */
> >diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> >index 077363d..f56b141 100644
> >--- a/include/linux/netdevice.h
> >+++ b/include/linux/netdevice.h
> >@@ -948,6 +948,18 @@ struct netdev_phys_port_id {
> >  *	Called to get ID of physical port of this device. If driver does
> >  *	not implement this, it is assumed that the hw is not able to have
> >  *	multiple net devices on single physical port.
> >+ *
> >+ * int (*ndo_add_vxlan_port)(struct  net_device *dev,
> >+ *			      __u16 port);
> >+ *	Called by vxlan to notiy a driver about the UDP port that vxlan
> >+ *	is listnening to. It is called only when a new port starts listening.
> >+ *	The operation is protected by the vxlan_net->sock_lock.
> >+ *
> >+ * int (*ndo_del_vxlan_port)(struct  net_device *dev,
> >+ *			    __u16 port);
> >+ *	Called by vxlan to notify the driver about a UDP port of vxlan
> >+ *	that is not listening anymore. The operation is protected by
> >+ *	the vxlan_net->sock_lock.
> >  */
> > struct net_device_ops {
> > 	int			(*ndo_init)(struct net_device *dev);
> >@@ -1078,6 +1090,10 @@ struct net_device_ops {
> > 						      bool new_carrier);
> > 	int			(*ndo_get_phys_port_id)(struct net_device *dev,
> > 							struct netdev_phys_port_id *ppid);
> >+	int			(*ndo_add_vxlan_port)(struct  net_device *dev,
> >+						      __u16 port);
> >+	int			(*ndo_del_vxlan_port)(struct  net_device *dev,
> >+						      __u16 port);
> 
> 
> It doesn't look correct to add more specific device ndos like this. I
> think they should be more general. How about to rather use netdev notifier
> to propagate the change and then driver can use come vxlan exported
> function to get ports in use.
> 

Please see comment from Ben Hutchings on previously similar question.

> 
> 
> 
> > };
> > 
> > /*
> >diff --git a/include/net/vxlan.h b/include/net/vxlan.h
> >index ad342e3..a0dc497 100644
> >--- a/include/net/vxlan.h
> >+++ b/include/net/vxlan.h
> >@@ -36,4 +36,5 @@ int vxlan_xmit_skb(struct net *net, struct vxlan_sock *vs,
> > 
> > __be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);
> > 
> >+void vxlan_get_rx_port(struct net_device *netdev);
> > #endif
> >-- 
> >1.8.3.1
> >
> >--
> >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 net-next 0/3] pf_packet updates
From: David Miller @ 2013-08-29 16:53 UTC (permalink / raw)
  To: eric.dumazet; +Cc: dborkman, netdev
In-Reply-To: <1377771945.8277.26.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 29 Aug 2013 03:25:45 -0700

> On Thu, 2013-08-29 at 01:39 -0400, David Miller wrote:
>> From: Daniel Borkmann <dborkman@redhat.com>
>> Date: Wed, 28 Aug 2013 22:13:08 +0200
>> 
>> > Daniel Borkmann (3):
>> >   net: packet: add random fanout scheduler
>> >   net: packet: use reciprocal_divide in fanout_demux_hash
>> >   net: packet: document available fanout policies
>> 
>> Please add the missing reciprocal_divide.h include to the second
>> patch, as per Eric Dumazet's feedback, and resubmit this series.
> 
> (It was Cong Wang feedback ;) )

Sorry Eric, I am just too anxious to give you credit everywhere that I
can. :-)

Anyways, thanks for explaining Daniel, I've put these patches back into
the to-apply queue.

Thanks!

^ permalink raw reply

* [PATCH net-next] net: sctp: probe: allow more advanced ingress filtering by mark
From: Daniel Borkmann @ 2013-08-29 16:54 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-sctp

This is a follow-up commit for commit b1dcdc68b1f4 ("net: tcp_probe:
allow more advanced ingress filtering by mark") that allows for
advanced SCTP probe module filtering based on skb mark (for a more
detailed description and advantages using mark, refer to b1dcdc68b1f4).
The current option to filter by a given port is still being preserved.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 Tested with various marked flows.

 net/sctp/probe.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index cd72ae5..0118178 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -46,6 +46,10 @@ static int port __read_mostly = 0;
 MODULE_PARM_DESC(port, "Port to match (0=all)");
 module_param(port, int, 0);
 
+static unsigned int fwmark __read_mostly = 0;
+MODULE_PARM_DESC(fwmark, "skb mark to match (0=no mark)");
+module_param(fwmark, uint, 0);
+
 static int bufsize __read_mostly = 64 * 1024;
 MODULE_PARM_DESC(bufsize, "Log buffer size (default 64k)");
 module_param(bufsize, int, 0);
@@ -129,15 +133,19 @@ static sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
 					    void *arg,
 					    sctp_cmd_seq_t *commands)
 {
+	struct sctp_chunk *chunk = arg;
+	struct sk_buff *skb = chunk->skb;
 	struct sctp_transport *sp;
 	static __u32 lcwnd = 0;
 	struct timespec now;
 
 	sp = asoc->peer.primary_path;
 
-	if ((full || sp->cwnd != lcwnd) &&
-	    (!port || asoc->peer.port == port ||
-	     ep->base.bind_addr.port == port)) {
+	if (((port == 0 && fwmark == 0) ||
+	     asoc->peer.port == port ||
+	     ep->base.bind_addr.port == port ||
+	     (fwmark > 0 && skb->mark == fwmark)) &&
+	    (full || sp->cwnd != lcwnd)) {
 		lcwnd = sp->cwnd;
 
 		getnstimeofday(&now);
@@ -198,8 +206,8 @@ static __init int sctpprobe_init(void)
 	if (ret)
 		goto remove_proc;
 
-	pr_info("probe registered (port=%d)\n", port);
-
+	pr_info("probe registered (port=%d/fwmark=%u) bufsize=%u\n",
+		port, fwmark, bufsize);
 	return 0;
 
 remove_proc:
-- 
1.7.11.7

^ permalink raw reply related

* Re: [net-next v2 1/2] vxlan: Notify drivers for listening UDP port changes
From: Ben Hutchings @ 2013-08-29 18:42 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: davem, Joseph Gasparakis, netdev, gospo, sassmann, John Fastabend,
	Stephen Hemminger
In-Reply-To: <1377780878-32384-1-git-send-email-jeffrey.t.kirsher@intel.com>

On Thu, 2013-08-29 at 05:54 -0700, Jeff Kirsher wrote:
> From: Joseph Gasparakis <joseph.gasparakis@intel.com>
> 
> This patch adds two more ndo ops: ndo_add_rx_vxlan_port() and
> ndo_del_rx_vxlan_port().
[...]
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -948,6 +948,18 @@ struct netdev_phys_port_id {
>   *	Called to get ID of physical port of this device. If driver does
>   *	not implement this, it is assumed that the hw is not able to have
>   *	multiple net devices on single physical port.
> + *
> + * int (*ndo_add_vxlan_port)(struct  net_device *dev,
> + *			      __u16 port);
> + *	Called by vxlan to notiy a driver about the UDP port that vxlan
> + *	is listnening to. It is called only when a new port starts listening.
> + *	The operation is protected by the vxlan_net->sock_lock.
> + *
> + * int (*ndo_del_vxlan_port)(struct  net_device *dev,
> + *			    __u16 port);
> + *	Called by vxlan to notify the driver about a UDP port of vxlan
> + *	that is not listening anymore. The operation is protected by
> + *	the vxlan_net->sock_lock.
>   */
>  struct net_device_ops {
>  	int			(*ndo_init)(struct net_device *dev);
> @@ -1078,6 +1090,10 @@ struct net_device_ops {
>  						      bool new_carrier);
>  	int			(*ndo_get_phys_port_id)(struct net_device *dev,
>  							struct netdev_phys_port_id *ppid);
> +	int			(*ndo_add_vxlan_port)(struct  net_device *dev,
> +						      __u16 port);
> +	int			(*ndo_del_vxlan_port)(struct  net_device *dev,
> +						      __u16 port);
>  };
[...]

I notice these are defined to return int, but the callers don't check
the return value.  Should they return void or do the callers need some
error handling?

Ben.

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

^ permalink raw reply

* Re: [patch v2] net/fec: cleanup types in fec_get_mac()
From: Ben Hutchings @ 2013-08-29 18:48 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Grant Likely, Rob Herring, David S. Miller, Fabio Estevam,
	Frank Li, Jim Baxter, Fugang Duan, netdev, devicetree,
	kernel-janitors
In-Reply-To: <20130829082514.GB14334@elgon.mountain>

On Thu, 2013-08-29 at 11:25 +0300, Dan Carpenter wrote:
> My static checker complains that on some arches unsigned longs can be 8
> characters which is larger than the buffer is only 6 chars.
> Additionally, Ben Hutchings points out that the buffer actually holds
> big endian data and the buffer we are reading from is CPU endian.

It's not really as clear-cut as that. :-)  But I think it's slightly
more logical this way.

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>

> ---
> v2: fix endian annotations and reverse the beXX_to_cpu() calls so that
>     they say cpu_to_beXX().
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index fdf9307..0b12866 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1100,10 +1100,10 @@ static void fec_get_mac(struct net_device *ndev)
>  	 * 4) FEC mac registers set by bootloader
>  	 */
>  	if (!is_valid_ether_addr(iap)) {
> -		*((unsigned long *) &tmpaddr[0]) =
> -			be32_to_cpu(readl(fep->hwp + FEC_ADDR_LOW));
> -		*((unsigned short *) &tmpaddr[4]) =
> -			be16_to_cpu(readl(fep->hwp + FEC_ADDR_HIGH) >> 16);
> +		*((__be32 *) &tmpaddr[0]) =
> +			cpu_to_be32(readl(fep->hwp + FEC_ADDR_LOW));
> +		*((__be16 *) &tmpaddr[4]) =
> +			cpu_to_be16(readl(fep->hwp + FEC_ADDR_HIGH) >> 16);
>  		iap = &tmpaddr[0];
>  	}
>  

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


^ permalink raw reply

* Re: [PATCH] net: mdio-sun4i: Convert to devm_* api
From: David Miller @ 2013-08-29 18:55 UTC (permalink / raw)
  To: maxime.ripard; +Cc: jszhang, emilio, netdev, linux-kernel
In-Reply-To: <20130828093508.GQ2695@lukather>

From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Wed, 28 Aug 2013 11:35:08 +0200

> Hi Jisheng,
> 
> On Mon, Aug 26, 2013 at 09:11:57PM +0800, Jisheng Zhang wrote:
>> Use devm_ioremap_resource instead of of_iomap() and devm_kzalloc()
>> instead of kmalloc() to make cleanup paths simpler. This patch also
>> fixes the resource leak caused by missing corresponding iounamp()
>> of the of_iomap().
>> 
>> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> 
> It looks fine for me.
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: sctp: reorder sctp_globals to reduce cacheline usage
From: David Miller @ 2013-08-29 18:56 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, linux-sctp
In-Reply-To: <1377527640-22447-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 26 Aug 2013 16:34:00 +0200

> Reduce cacheline usage from 2 to 1 cacheline for sctp_globals structure. By
> reordering elements, we can close gaps and simply achieve the following:
> 
> Current situation:
>   /* size: 80, cachelines: 2, members: 10 */
>   /* sum members: 57, holes: 4, sum holes: 16 */
>   /* padding: 7 */
>   /* last cacheline: 16 bytes */
> 
> Afterwards:
>   /* size: 64, cachelines: 1, members: 10 */
>   /* padding: 7 */
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.

^ permalink raw reply

* pull request: wireless-next 2013-08-29
From: John W. Linville @ 2013-08-29 18:53 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev

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

Dave,

Please accept this batch of updates intended for the 3.12 stream.

For the mac80211 bits, Johannes says this:

"This time I have various improvements all over the place: IBSS, mesh,
testmode, AP client powersave handling, one of the rare rfkill patches
and some code cleanup."

Also for mac80211:

"And I also have some more changes for -next, just a few small fixes and
improvements, nothing really stands out."

And for iwlwifi:

"This time I have some powersave work (notably uAPSD support), CQM
offloads, support for a new firmware API and various code cleanups."

Regarding the Bluetooth bits, Gustavo says:

"Patches to 3.12, here we have:

* implementation of a proper tty_port for RFCOMM devices, this fixes some
issues people were seeing lately in the kernel.
* Add voice_setting option for SCO, it is used for SCO Codec selection
* bugfixes, small improvements and clean ups"

For the NFC bits, Samuel says:

"With this one we have:

- A few pn533 improvements and minor fixes. Testing our pn533 driver
  against Google's NCI stack triggered a few issues that we fixed now.
  We also added Tx fragmentation support to this driver.

- More NFC secure element handling. We added a GET_SE netlink command
  for getting all the discovered secure elements, and we defined 2
  additional secure element netlink event (transaction and connectivity).
  We also fixed a couple of typos and copy-paste bugs from the secure
  element handling code.

- Firmware download support for the pn544 driver. This chipset can enter a
  special mode where it's waiting for firmware blobs to replace the
  already flashed one. We now support that mode."

With repect to the ath tree, Kalle says:

"New features in ath10k are rx/tx checsumming in hw and survey scan
implemented by Michal. Also he made fixes to different areas of the
driver, most notable being fixing the case when using two streams and
reducing the number of interface combinations to avoid firmware crashes.
Bartosz did a clean related to how we handle SoC power save in PCI
layer.

For ath6kl Mohammed and Vasanth sent each a patch to fix two infrequent
crashes."

I also pulled the wireless tree into wireless-next to support a
request from Johannes.  On top of all that, there are the usual
sort of driver updates.  The mwifiex, brcmfmac, brcmsmac, ath9k,
and rt2x00 drivers all get some attention, as does the bcma bus and
a few other random bits here and there.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit 4c9d546f6c522f541dfb01e192ab7101eca0053b:

  Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next (2013-08-29 01:56:01 -0400)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem

for you to fetch changes up to 0d8165e9fca119b804de2cf35674e07c36c9704f:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2013-08-29 14:08:24 -0400)

----------------------------------------------------------------

Alexander Bondar (3):
      iwlwifi: mvm: Fix beacon filtering enablement via debugfs
      iwlwifi: mvm: Add basic uAPSD client support
      iwlwifi: mvm: Add PBW snoozing enablement

Amitkumar Karwar (1):
      mwifiex: fix driver unload problem for usb chipsets

Andrea Merello (1):
      Update e-mail address for Andrea Merello (resubmit)

Andrei Otcheretianski (1):
      iwlwifi: mvm: Implement CQM offloading

Andy Shevchenko (1):
      Bluetooth: use DIV_ROUND_UP in suitable places in btmrvl_sdio

Antonio Quartulli (1):
      mac80211: ibss - do not scan if not needed when creating an IBSS

Arend van Spriel (17):
      brcmfmac: use irq safe spinlock in brcmf_sdbrcm_txdata()
      brcmfmac: .txdata() bus callback should not call brcmf_txcomplete()
      brcmfmac: add AMPDU reordering functionality
      brcmfmac: ignore IF event if firmware indicates it
      brcmfmac: add support for manual TDLS operations
      brcmsmac: cosmetic change in phy_lcn.c
      brcmsmac: change pa_gain for bcm4313 iPA
      brcmsmac: use ARRAY_SIZE in phytbl_lcn.c
      brcmsmac: add debug info message providing phy and radio info
      brcmsmac: update transmit gain table for lcn phy
      brcmsmac: change lcnphy receive i/q calibration routine
      brcmsmac: fix TSSI idle estimation
      brcmsmac: avoid calling set_txpwr_by_index() twice
      brcmsmac: rework switch control table init including iPA BT-combo
      brcmsmac: correct phy registers for TSSI-based power control
      brcmsmac: reinitialize TSSI power control upon channel switch
      brcmsmac: add support for BCM4313 iPA variant

Arron Wang (2):
      NFC: Fix secure element state check
      NFC: Update secure element state

Avinash Patil (2):
      mwifiex: fix ext_capab IE structure definition
      mwifiex: drop gratuitous ARP frames

Bartosz Markowski (1):
      ath10k: add SoC power save option to PCI features map

Benjamin Tissoires (2):
      Bluetooth: hidp: implement hidinput_input_event callback
      Bluetooth: hidp: remove wrong send_report at init

Bing Zhao (2):
      mwifiex: do not create AP and P2P interfaces upon driver loading
      mwifiex: break a long line into two lines

Bob Copeland (1):
      mac80211: assign seqnums for group QoS frames

Chun-Yeow Yeoh (2):
      mac80211: allow lowest basic rate for unicast management for mesh
      mac80211: only respond to probe request with mesh ID

Dan Carpenter (2):
      iwlwifi: pcie: returning positive instead of negative
      NFC: hci: Fix enable/disable confusion

David Spinadel (2):
      cfg80211: add wdev to testmode cmd
      mac80211: add vif to testmode cmd

Djalal Harouni (1):
      ath5k: debugfs: NULL-terminate strings

Eliad Peller (1):
      iwlwifi: mvm: don't clear tbl->win mistakenly

Eric Lapuyade (5):
      NFC: Move nfc_fw_download_done() definition from private to public
      NFC: pn544: i2c: Add firmware download mode power-on support
      NFC: netlink: Add result of firmware operation to completion event
      NFC: pn544: Add firmware operations hci ops
      NFC: pn544: i2c: Add firmware download implementation for pn544

Eyal Shapira (4):
      iwlwifi: mvm: remove rate_scale_data debugfs entry
      iwlwifi: mvm: remove unused fields of iwl_rs_rate_info
      iwlwifi: mvm: remove MIMO3 from rate scale code
      iwlwifi: mvm: remove unused param of rs_dbgfs_set_mcs

Eytan Lifshitz (1):
      iwlwifi: mvm: add support to the new FW time event API

Felix Fietkau (8):
      ath9k: fix rx descriptor related race condition
      ath9k: shrink a few data structures by reordering fields
      ath9k: remove ath9k_sta_remove_debugfs
      ath9k: simplify debugfs chainmask handling
      ath9k: avoid accessing MRC registers on single-chain devices
      ath9k: simplify ath_tid_drain
      ath9k: reset buffer stale flag in ath_tx_get_tid_subframe
      mac80211: add a flag to indicate CCK support for HT clients

Franky Lin (4):
      brcmfmac: abstract tx packet processing functions
      brcmfmac: remove align from brcmf_bus structure
      brcmfmac: streamline sdio bus header code
      brcmfmac: use configurable sdio bus header length for tx packet

Frédéric Dalleau (10):
      Bluetooth: Use hci_connect_sco directly
      Bluetooth: Remove unused mask parameter in sco_conn_defer_accept
      Bluetooth: Add Bluetooth socket voice option
      Bluetooth: Add constants for SCO airmode
      Bluetooth: Use voice setting in deferred SCO connection request
      Bluetooth: Parameters for outgoing SCO connections
      Bluetooth: Add constants and macro declaration for transparent data
      Bluetooth: Prevent transparent SCO on older devices
      Bluetooth: Handle specific error for SCO connection fallback
      Bluetooth: Add SCO connection fallback

Gabor Juhos (12):
      rt2x00: rt2800lib: introduce rt2800_get_txwi_rxwi_size helper
      rt2x00: rt2800pci: fix AUX_CTRL register setup for RT3090/3390/3593/5592
      rt2x00: rt2800: rename HW_BEACON_OFFSET macro
      rt2x00: rt2800lib: pass beacon index to rt2800_clear_beacon_register
      rt2x00: rt2800lib: fix frequency offset boundary calculation
      rt2x00: rt2800lib: optimize frequency offset adjustment
      rt2x00: rt2800lib: use a MCU command for frequency adjustment on USB devices
      rt2x00: rt2800lib: use step-by-step frequency offset adjustment on MMIO devices
      rt2x00: rt2800lib: move rt2800_adjust_freq_offset function
      rt2x00: rt2800lib: adjust frequency offset for RF3053
      rt2x00: rt2800lib: add rt2800_hw_beacon_base helper
      rt2x00: rt2800lib: don't hardcode beacon offsets

Gianluca Anzolin (6):
      Bluetooth: Take proper tty_struct references
      Bluetooth: Remove the device from the list in the destructor
      Bluetooth: Move the tty initialization and cleanup out of open/close
      Bluetooth: Implement .activate, .shutdown and .carrier_raised methods
      Bluetooth: Fix the reference counting of tty_port
      Bluetooth: Purge the dlc->tx_queue to avoid circular dependency

Gustavo Padovan (1):
      Bluetooth: Add missing braces to an "else if"

Hante Meuleman (2):
      brcmfmac: always use worker thread for tx data.
      brcmfmac: no fws locking outside fws module.

Hauke Mehrtens (6):
      bcma: change max PCI read request size to 128
      bcma: add method to power up and down the PCIe core by wifi driver
      brcmsmac: use bcma PCIe up and down functions
      bcma: do not export bcma_core_pci_extend_L1timer()
      bcma: add bcma_core_pci_power_save()
      b43: call PCIe up and down functions

Helmut Schaa (1):
      ath9k_htc: Restore skb headroom when returning skb to mac80211

Ido Yariv (3):
      iwlwifi: pcie: Refactor iwl_queue_space
      iwlwifi: pcie: Refactor iwl_rxq_space
      iwlwifi: pcie: Remove duplicate code from pcie irq handlers

Jingoo Han (1):
      Bluetooth: replace strict_strtol() with kstrtol()

Johan Almbladh (1):
      mac80211: perform power save processing before decryption

Johan Hedberg (1):
      Bluetooth: Fix getting SCO socket options in deferred state

Johannes Berg (10):
      wireless: make TU conversion macros available
      nl80211: clean up CQM settings code
      mac80211: add control port protocol TX control flag
      iwlwifi: mvm: refactor resume from WoWLAN code
      mac80211: add APIs to allow keeping connections after WoWLAN
      mac80211: add missing channel context release
      mac80211: minstrel_ht: don't use control.flags in TX status path
      mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into drivers
      mac80211: ignore (E)CSA in probe response frames
      mac80211: fix change_interface queue assignments

John W. Linville (12):
      Merge branch 'for-linville' of git://github.com/kvalo/ath
      Merge tag 'nfc-next-3.12-1' of git://git.kernel.org/.../sameo/nfc-next
      brcmsmac: Fix WARNING caused by lack of calls to dma_mapping_error()
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth-next
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless
      ath9k: ar9003_eeprom.c:3618 fix variable name typo
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem

Luciano Coelho (4):
      iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()
      iwlwifi: use a macro for default probe length
      iwlwifi: Kconfig: fix help texts wrt 7260 and 3160 devices
      iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()

Luis Henriques (1):
      net: rfkill: Do not ignore errors from regulator_enable()

Marcel Holtmann (2):
      Bluetooth: Fix simple whitespace vs tab style issue
      Bluetooth: Set different event mask for LE-only controllers

Mark Schulte (1):
      rtlwifi: sparse warnings: cast to restricted type

Masami Ichikawa (1):
      rt2800usb: Add WLI-UC-G300HP's Product ID.

Matti Gottlieb (1):
      iwlwifi: introduce external debug level

Michal Kazior (11):
      ath10k: improve tx throughput on slow machines
      ath10k: detect the number of spatial streams supported by hw
      ath10k: implement rx checksum offloading
      ath10k: implement tx checksum offloading
      ath10k: implement get_survey()
      ath10k: prevent using invalid ringbuffer indexes
      ath10k: make sure to use passive scan when n_ssids is 0
      ath10k: advertise more conservative intf combinations
      ath10k: zero arvif memory on add_interface()
      ath10k: fix failpath in MSI-X setup
      ath10k: fix device teardown

Mikel Astiz (3):
      Bluetooth: Add HCI authentication capabilities macros
      Bluetooth: Use defines in in hci_get_auth_req()
      Bluetooth: Use defines instead of integer literals

Mohammed Shafi Shajakhan (1):
      ath6kl: Fix invalid pointer access on fuzz testing with AP mode

Oleksij Rempel (1):
      ath9k_htc: do not use bulk on EP3 and EP4

Olivier Guiter (3):
      NFC: pn533: Add extended information frame decoding support
      NFC: pn533: Split large Tx frames in chunks
      NFC: pn533: Store the correct frame size (normal vs ext)

Samuel Ortiz (12):
      MAINTAINERS: Change the NFC subsystem status to Supported
      NFC: Document secure element addition/removal netlink events
      NFC: Define secure element connectivity and transaction events
      NFC: pn533: Fix hardware busy loop when establishing the LLCP link
      NFC: pn533: Fix the pn533 polling loop
      NFC: pn533: Request System code from SENSF_REQ
      NFC: pn533: Unconditionaly select the highest p2p bit rate
      NFC: pn533: Enable AUTO RFCA
      NFC: Fix SE discovery failure warning condition
      NFC: Add a GET_SE netlink API
      NFC: pn533: Add delay between each poll frame
      NFC: pn533: Add some polling entropy

Simon Wunderlich (12):
      mac80211: fix ieee80211_sta_process_chanswitch for 5/10 MHz channels
      mac80211: move ibss presp generation in own function
      ath9k: always use SIFS times from OFDM for 5/10 MHz
      ath9k: use chandef instead of channel_type
      ath9k: report 5/10 MHz channels
      ath9k: set 5/10 MHz supported channels and fix bitrate
      ath9k: announce that ath9k supports 5/10 MHz
      ath5k: report 5/10 MHz channels
      ath5k: set 5/10 MHz supported channels and fix duration
      ath5k: enable support for 5 MHz and 10 MHz channels
      ath9k: enable CSA functionality in ath9k
      mac80211: ibss: fix ignored channel parameter

Solomon Peachy (2):
      cw1200: Display the correct default reference clock.
      cw1200: When debug is enabled, display all wakeup conditions for the wait_event_interruptible_timeout() call.

Stanislaw Gruszka (2):
      iwl4965: fix rfkill set state regression
      rt2800: fix wrong TX power compensation

Sujith Manoharan (28):
      ath9k: Use a subroutine to check for "mybeacon"
      ath9k: Fix phy error handling for DFS
      ath9k: Discard invalid frames early
      ath9k: Fix RX crypto processing
      ath9k: Fix TSF processing
      ath9k: Reorder some functions
      ath9k: Fix PHY error processing
      ath9k: Fix RX debug statistics
      ath9k: Fix RX packet counter
      ath9k: Fix RX beacon processing
      ath9k: Move the RX poll check to preprocess()
      ath9k: Handle corrupt descriptors properly
      ath9k: Fix error condition for corrupt descriptors
      ath9k: Remove unused function argument
      ath9k: Handle invalid RSSI
      ath9k: Identify first subframe in an A-MPDU
      ath9k: Optimize LNA check
      ath9k: Use lockless variant to initialize RX fifo
      ath9k: Enable PLL fix only for AR9340/AR9330
      ath9k: Add support for AR9485 1.2
      ath9k: Add antenna diversity tweak for CUS198
      ath9k: Add one more PCI ID for CUS198
      ath9k: Fix ASPM for AR9462
      ath9k: Fix ASPM workaround usage
      ath9k: Fix TX poll work locking
      ath9k: Fix DEBUG_FS dependency for ath9k
      ath9k: Remove unused ANI commands
      ath9k: Enable D3/L1 ASPM fix for AR9462

Thierry Escande (1):
      NFC: Fix missing static declarations

Tobias Waldekranz (1):
      mwifiex: add missing endian conversions

Vasanthakumar Thiagarajan (1):
      ath6kl: Fix race in heart beat polling

Vladimir Kondratiev (2):
      wil6210: let IP stack re-check HW TCP/UDP csum errors
      cfg80211: add flags to cfg80211_rx_mgmt()

Wei Yongjun (2):
      mac80211_hwsim: fix error return code in init_mac80211_hwsim()
      zd1201: fix error return code

 Documentation/DocBook/80211.tmpl                   |   1 +
 MAINTAINERS                                        |   2 +-
 drivers/bcma/driver_pci.c                          |  65 ++-
 drivers/bcma/driver_pci_host.c                     |   6 +
 drivers/bluetooth/btmrvl_debugfs.c                 |   6 +-
 drivers/bluetooth/btmrvl_sdio.c                    |   4 +-
 drivers/net/wireless/ath/ath10k/ce.c               |   5 +
 drivers/net/wireless/ath/ath10k/core.h             |   8 +
 drivers/net/wireless/ath/ath10k/htt_rx.c           |  40 ++
 drivers/net/wireless/ath/ath10k/htt_tx.c           |   2 +
 drivers/net/wireless/ath/ath10k/mac.c              |  79 +++-
 drivers/net/wireless/ath/ath10k/pci.c              |  70 ++-
 drivers/net/wireless/ath/ath10k/pci.h              |  11 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |  87 +++-
 drivers/net/wireless/ath/ath10k/wmi.h              |   5 +
 drivers/net/wireless/ath/ath5k/ath5k.h             |   1 +
 drivers/net/wireless/ath/ath5k/base.c              |  59 ++-
 drivers/net/wireless/ath/ath5k/base.h              |   2 +-
 drivers/net/wireless/ath/ath5k/debug.c             |  24 +-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |   2 +-
 drivers/net/wireless/ath/ath5k/pcu.c               |   2 +
 drivers/net/wireless/ath/ath5k/qcu.c               |  25 +-
 drivers/net/wireless/ath/ath6kl/init.c             |   3 +
 drivers/net/wireless/ath/ath6kl/main.c             |   3 +
 drivers/net/wireless/ath/ath6kl/testmode.c         |   3 +-
 drivers/net/wireless/ath/ath6kl/testmode.h         |   7 +-
 drivers/net/wireless/ath/ath6kl/wmi.c              |   7 +-
 drivers/net/wireless/ath/ath9k/Kconfig             |   2 +-
 drivers/net/wireless/ath/ath9k/ani.c               |   3 -
 drivers/net/wireless/ath/ath9k/ani.h               |  13 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c        |   2 -
 drivers/net/wireless/ath/ath9k/ar9002_hw.c         |  29 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     |   9 +-
 drivers/net/wireless/ath/ath9k/ar9003_hw.c         |  39 +-
 drivers/net/wireless/ath/ath9k/ar9003_mac.c        |   1 +
 drivers/net/wireless/ath/ath9k/ar9003_phy.c        |   8 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h        |   2 +
 drivers/net/wireless/ath/ath9k/ath9k.h             |  24 +-
 drivers/net/wireless/ath/ath9k/beacon.c            |  21 +
 drivers/net/wireless/ath/ath9k/common.c            |  67 +--
 drivers/net/wireless/ath/ath9k/common.h            |   3 +-
 drivers/net/wireless/ath/ath9k/debug.c             | 104 +----
 drivers/net/wireless/ath/ath9k/debug.h             |   4 -
 drivers/net/wireless/ath/ath9k/hif_usb.c           |  38 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |   5 +-
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  10 +
 drivers/net/wireless/ath/ath9k/hw.c                |  19 +-
 drivers/net/wireless/ath/ath9k/hw.h                |   2 +
 drivers/net/wireless/ath/ath9k/init.c              |  39 +-
 drivers/net/wireless/ath/ath9k/link.c              |   2 +-
 drivers/net/wireless/ath/ath9k/mac.c               |   4 +-
 drivers/net/wireless/ath/ath9k/mac.h               |   2 +
 drivers/net/wireless/ath/ath9k/main.c              |  29 +-
 drivers/net/wireless/ath/ath9k/pci.c               |  67 +++
 drivers/net/wireless/ath/ath9k/rc.c                |   9 +-
 drivers/net/wireless/ath/ath9k/recv.c              | 506 ++++++++++++---------
 drivers/net/wireless/ath/ath9k/reg.h               |   6 +-
 drivers/net/wireless/ath/ath9k/xmit.c              |  32 +-
 drivers/net/wireless/ath/carl9170/main.c           |   3 +-
 drivers/net/wireless/ath/wil6210/txrx.c            |  12 +-
 drivers/net/wireless/ath/wil6210/wmi.c             |   2 +-
 drivers/net/wireless/b43/main.c                    |  14 +
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c   |  16 +-
 .../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |   1 -
 drivers/net/wireless/brcm80211/brcmfmac/dhd.h      |  31 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h  |   8 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    | 279 ++++++++++--
 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 481 ++++++++++++--------
 drivers/net/wireless/brcm80211/brcmfmac/fweh.c     |   4 +
 .../net/wireless/brcm80211/brcmfmac/fwil_types.h   |  21 +
 drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 228 +++++-----
 drivers/net/wireless/brcm80211/brcmfmac/p2p.c      |   4 +-
 .../net/wireless/brcm80211/brcmfmac/sdio_host.h    |   2 +-
 drivers/net/wireless/brcm80211/brcmfmac/usb.c      |   1 -
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |  61 ++-
 drivers/net/wireless/brcm80211/brcmsmac/aiutils.c  |  21 -
 drivers/net/wireless/brcm80211/brcmsmac/aiutils.h  |   3 -
 drivers/net/wireless/brcm80211/brcmsmac/dma.c      |  15 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c     |  12 +-
 .../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c  | 399 ++++++++++------
 .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.c   | 405 +++++++++--------
 .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.h   |   1 +
 drivers/net/wireless/cw1200/bh.c                   |   4 +-
 drivers/net/wireless/cw1200/main.c                 |   2 +-
 drivers/net/wireless/iwlegacy/4965-mac.c           |   2 +-
 drivers/net/wireless/iwlwifi/Kconfig               |  13 +-
 drivers/net/wireless/iwlwifi/dvm/tx.c              |   2 +-
 drivers/net/wireless/iwlwifi/iwl-debug.h           |   2 +
 drivers/net/wireless/iwlwifi/iwl-devtrace.h        |   7 +-
 drivers/net/wireless/iwlwifi/iwl-drv.c             |  10 +-
 drivers/net/wireless/iwlwifi/iwl-fw.h              |   5 +
 drivers/net/wireless/iwlwifi/mvm/constants.h       |   9 +
 drivers/net/wireless/iwlwifi/mvm/d3.c              | 151 +++---
 drivers/net/wireless/iwlwifi/mvm/debugfs.c         |  17 +-
 drivers/net/wireless/iwlwifi/mvm/fw-api-power.h    |  24 +-
 drivers/net/wireless/iwlwifi/mvm/fw-api.h          | 228 +++++++---
 drivers/net/wireless/iwlwifi/mvm/mac80211.c        |  29 +-
 drivers/net/wireless/iwlwifi/mvm/mvm.h             |  27 +-
 drivers/net/wireless/iwlwifi/mvm/power.c           | 199 +++++++-
 drivers/net/wireless/iwlwifi/mvm/rs.c              | 474 +++----------------
 drivers/net/wireless/iwlwifi/mvm/rs.h              |  64 +--
 drivers/net/wireless/iwlwifi/mvm/rx.c              |  61 ++-
 drivers/net/wireless/iwlwifi/mvm/time-event.c      | 103 +++--
 drivers/net/wireless/iwlwifi/mvm/tx.c              |   9 +-
 drivers/net/wireless/iwlwifi/pcie/drv.c            |   6 +-
 drivers/net/wireless/iwlwifi/pcie/rx.c             |  43 +-
 drivers/net/wireless/iwlwifi/pcie/trans.c          |  31 +-
 drivers/net/wireless/iwlwifi/pcie/tx.c             |  38 +-
 drivers/net/wireless/mac80211_hwsim.c              |   5 +-
 drivers/net/wireless/mwifiex/11n.c                 |  16 +-
 drivers/net/wireless/mwifiex/11n_aggr.c            |   3 +-
 drivers/net/wireless/mwifiex/cfg80211.c            |   1 +
 drivers/net/wireless/mwifiex/decl.h                |   9 +
 drivers/net/wireless/mwifiex/fw.h                  |   2 +-
 drivers/net/wireless/mwifiex/init.c                |   1 +
 drivers/net/wireless/mwifiex/main.c                |  14 -
 drivers/net/wireless/mwifiex/main.h                |   3 +-
 drivers/net/wireless/mwifiex/sdio.c                |   6 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c         |   2 +-
 drivers/net/wireless/mwifiex/sta_rx.c              |  49 ++
 drivers/net/wireless/mwifiex/usb.c                 |  50 +-
 drivers/net/wireless/mwifiex/util.c                |   4 +-
 drivers/net/wireless/rt2x00/rt2800.h               |   5 +-
 drivers/net/wireless/rt2x00/rt2800lib.c            | 142 ++++--
 drivers/net/wireless/rt2x00/rt2800lib.h            |   4 +
 drivers/net/wireless/rt2x00/rt2800pci.c            |  19 +-
 drivers/net/wireless/rt2x00/rt2800usb.c            |  12 +-
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |   6 +-
 drivers/net/wireless/rtl818x/rtl8180/grf5101.c     |   2 +-
 drivers/net/wireless/rtl818x/rtl8180/grf5101.h     |   2 +-
 drivers/net/wireless/rtl818x/rtl8180/max2820.c     |   2 +-
 drivers/net/wireless/rtl818x/rtl8180/max2820.h     |   2 +-
 drivers/net/wireless/rtl818x/rtl8180/rtl8225.c     |   4 +-
 drivers/net/wireless/rtl818x/rtl8180/sa2400.c      |   2 +-
 drivers/net/wireless/rtl818x/rtl8180/sa2400.h      |   2 +-
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |   6 +-
 drivers/net/wireless/rtl818x/rtl8187/rtl8187.h     |   4 +-
 drivers/net/wireless/rtl818x/rtl8187/rtl8225.c     |   4 +-
 drivers/net/wireless/rtl818x/rtl8187/rtl8225.h     |   4 +-
 drivers/net/wireless/rtl818x/rtl818x.h             |   4 +-
 drivers/net/wireless/rtlwifi/ps.c                  |  16 +-
 drivers/net/wireless/ti/wlcore/main.c              |   3 +-
 drivers/net/wireless/ti/wlcore/testmode.c          |   3 +-
 drivers/net/wireless/ti/wlcore/testmode.h          |   3 +-
 drivers/net/wireless/zd1201.c                      |   8 +-
 drivers/nfc/nfcsim.c                               |   6 +-
 drivers/nfc/pn533.c                                | 389 ++++++++++++----
 drivers/nfc/pn544/i2c.c                            | 360 ++++++++++++++-
 drivers/nfc/pn544/mei.c                            |   2 +-
 drivers/nfc/pn544/pn544.c                          |  20 +-
 drivers/nfc/pn544/pn544.h                          |   7 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |   2 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   2 +-
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |   2 +-
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |   2 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   2 +-
 drivers/staging/rtl8187se/r8180.h                  |   2 +-
 drivers/staging/rtl8187se/r8180_93cx6.h            |   2 +-
 drivers/staging/rtl8187se/r8180_core.c             |   4 +-
 drivers/staging/rtl8187se/r8180_hw.h               |   2 +-
 drivers/staging/rtl8187se/r8180_rtl8225.h          |   2 +-
 drivers/staging/rtl8187se/r8180_rtl8225z2.c        |   2 +-
 drivers/staging/rtl8187se/r8180_wx.c               |   2 +-
 drivers/staging/rtl8187se/r8180_wx.h               |   2 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c     |   2 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h     |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_cam.c        |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_cam.h        |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c       |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h       |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c     |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.h     |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c    |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c        |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.h        |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c         |   2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.h         |   2 +-
 drivers/staging/rtl8192e/rtllib.h                  |   2 +-
 drivers/staging/rtl8192e/rtllib_debug.h            |   2 +-
 drivers/staging/rtl8192e/rtllib_rx.c               |   2 +-
 drivers/staging/rtl8192e/rtllib_softmac.c          |   2 +-
 drivers/staging/rtl8192e/rtllib_softmac_wx.c       |   2 +-
 drivers/staging/rtl8192e/rtllib_tx.c               |   2 +-
 drivers/staging/rtl8192u/authors                   |   2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211.h     |   2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c  |   2 +-
 .../staging/rtl8192u/ieee80211/ieee80211_softmac.c |   2 +-
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c      |   2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |   2 +-
 drivers/staging/rtl8192u/r8180_93cx6.c             |   2 +-
 drivers/staging/rtl8192u/r8180_93cx6.h             |   2 +-
 drivers/staging/rtl8192u/r8180_pm.c                |   2 +-
 drivers/staging/rtl8192u/r8180_pm.h                |   2 +-
 drivers/staging/rtl8192u/r8190_rtl8256.h           |   2 +-
 drivers/staging/rtl8192u/r8192U.h                  |   2 +-
 drivers/staging/rtl8192u/r8192U_core.c             |   2 +-
 drivers/staging/rtl8192u/r8192U_hw.h               |   2 +-
 drivers/staging/rtl8192u/r8192U_wx.c               |   2 +-
 drivers/staging/rtl8192u/r8192U_wx.h               |   2 +-
 include/linux/bcma/bcma_driver_pci.h               |  24 +-
 include/linux/ieee80211.h                          |   4 +
 include/linux/platform_data/brcmfmac-sdio.h        |   6 +
 include/net/bluetooth/bluetooth.h                  |   8 +
 include/net/bluetooth/hci.h                        |   7 +
 include/net/bluetooth/hci_core.h                   |  10 +-
 include/net/bluetooth/sco.h                        |   1 +
 include/net/cfg80211.h                             |   8 +-
 include/net/mac80211.h                             | 110 ++++-
 include/net/nfc/nfc.h                              |   3 +
 include/uapi/linux/nfc.h                           |  20 +
 include/uapi/linux/nl80211.h                       |  16 +
 net/bluetooth/hci_conn.c                           |  62 ++-
 net/bluetooth/hci_core.c                           |  14 +-
 net/bluetooth/hci_event.c                          |  29 +-
 net/bluetooth/hidp/core.c                          |  40 +-
 net/bluetooth/l2cap_core.c                         |   3 +-
 net/bluetooth/rfcomm/tty.c                         | 271 +++++------
 net/bluetooth/sco.c                                |  85 +++-
 net/mac80211/cfg.c                                 |  15 +-
 net/mac80211/ibss.c                                | 226 +++++----
 net/mac80211/ieee80211_i.h                         |   3 -
 net/mac80211/iface.c                               |  19 +-
 net/mac80211/key.c                                 | 154 ++++++-
 net/mac80211/main.c                                |   3 -
 net/mac80211/mesh.c                                |   3 +
 net/mac80211/mlme.c                                |  20 +-
 net/mac80211/rate.c                                |  23 +-
 net/mac80211/rc80211_minstrel_ht.c                 |   5 +-
 net/mac80211/rx.c                                  | 407 +++++++++--------
 net/mac80211/tx.c                                  |  14 +-
 net/mac80211/util.c                                |   2 +-
 net/nfc/core.c                                     |  22 +-
 net/nfc/hci/core.c                                 |   2 +-
 net/nfc/netlink.c                                  |  95 +++-
 net/nfc/nfc.h                                      |   5 +-
 net/rfkill/rfkill-regulator.c                      |   8 +-
 net/wireless/mlme.c                                |   4 +-
 net/wireless/nl80211.c                             |  80 ++--
 net/wireless/nl80211.h                             |   2 +-
 net/wireless/rdev-ops.h                            |   5 +-
 net/wireless/trace.h                               |   8 +-
 241 files changed, 5440 insertions(+), 2926 deletions(-)
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] tcp: initialize rcv_tstamp for restored sockets
From: David Miller @ 2013-08-29 19:12 UTC (permalink / raw)
  To: avagin
  Cc: netdev, gorcunov, linux-kernel, xemul, eric.dumazet, kuznet,
	jmorris, yoshfuji, kaber
In-Reply-To: <1377591640-1660-1-git-send-email-avagin@openvz.org>

From: Andrey Vagin <avagin@openvz.org>
Date: Tue, 27 Aug 2013 12:20:40 +0400

> From: Andrew Vagin <avagin@openvz.org>
> 
> u32 rcv_tstamp;     /* timestamp of last received ACK */
> 
> Its value used in tcp_retransmit_timer, which closes socket
> if the last ack was received more then TCP_RTO_MAX ago.
> 
> Currently rcv_tstamp is initialized to zero and if tcp_retransmit_timer
> is called before receiving a first ack, the connection is closed.
> 
> This patch initializes rcv_tstamp to a timestamp, when a socket was
> restored.
> 
> Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
> Signed-off-by: Andrey Vagin <avagin@openvz.org>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH] tcp: don't apply tsoffset if rcv_tsecr is zero
From: David Miller @ 2013-08-29 19:12 UTC (permalink / raw)
  To: avagin
  Cc: netdev, gorcunov, linux-kernel, xemul, eric.dumazet, kuznet,
	jmorris, yoshfuji, kaber
In-Reply-To: <1377591715-1742-1-git-send-email-avagin@openvz.org>

From: Andrey Vagin <avagin@openvz.org>
Date: Tue, 27 Aug 2013 12:21:55 +0400

> From: Andrew Vagin <avagin@openvz.org>
> 
> The zero value means that tsecr is not valid, so it's a special case.
> 
> tsoffset is used to customize tcp_time_stamp for one socket.
> tsoffset is usually zero, it's used when a socket was moved from one
> host to another host.
> 
> Currently this issue affects logic of tcp_rcv_rtt_measure_ts. Due to
> incorrect value of rcv_tsecr, tcp_rcv_rtt_measure_ts sets rto to
> TCP_RTO_MAX.
> 
> Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
> Signed-off-by: Andrey Vagin <avagin@openvz.org>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH] bridge: inherit slave devices needed_headroom
From: David Miller @ 2013-08-29 19:17 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, stephen, vyasevic, eric.dumazet
In-Reply-To: <1377601433-22353-1-git-send-email-f.fainelli@gmail.com>

From: "Florian Fainelli" <f.fainelli@gmail.com>
Date: Tue, 27 Aug 2013 12:03:53 +0100

> Some slave devices may have set a dev->needed_headroom value which is
> different than the default one, most likely in order to prepend a
> hardware descriptor in front of the Ethernet frame to send. Whenever a
> new slave is added to a bridge, ensure that we update the
> needed_headroom value accordingly to account for the slave
> needed_headroom value.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Since this is a performance optimization I've applied this to net-next.

Thanks!

^ permalink raw reply

* Re: [PATCH net-next] pkt_sched: fq: Fair Queue packet scheduler
From: Matt Wilson @ 2013-08-29 19:19 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev
In-Reply-To: <1377400082.8828.100.camel@edumazet-glaptop>

On Sat, Aug 24, 2013 at 08:08:02PM -0700, Eric Dumazet wrote:
[...] 
> Attempts have been made to add TCP pacing in TCP stack, but this
> seems to add complex code to an already complex stack.
> 
> TCP pacing is welcomed for flows having idle times, as the cwnd
> permits TCP stack to queue a possibly large number of packets.
> 
> This removes the 'slow start after idle' choice, hitting badly
> large BDP flows.
> 
> Nicely spaced packets : here interface is 10Gbit, but flow bottleneck is
> ~100Mbit

This is great. I just gave this a try in a real-world scenario where
TCP pacing (implemented in the TCP stack) has provided a significant
performance improvement.

# netperf -v 2 -H 10.162.184.110 
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.162.184.110 (10.162.184.110) port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.20      85.25   

Alignment      Offset         Bytes    Bytes       Sends   Bytes    Recvs
Local  Remote  Local  Remote  Xfered   Per                 Per
Send   Recv    Send   Recv             Send (avg)          Recv (avg)
    8       8      0       0 1.087e+08  16385.34      6635   14583.07   7455

Maximum
Segment
Size (bytes)
  1424

# tc qdisc add dev eth0 root fq
# netperf -v 2 -H 10.162.184.110
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.162.184.110 (10.162.184.110) port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.12     354.79   

Alignment      Offset         Bytes    Bytes       Sends   Bytes    Recvs
Local  Remote  Local  Remote  Xfered   Per                 Per
Send   Recv    Send   Recv             Send (avg)          Recv (avg)
    8       8      0       0 4.488e+08  16384.08     27394   15526.00  28908

Maximum
Segment
Size (bytes)
  1424

Is there an iproute2 patch? I don't think I've seen one yet.

As far as this patch is concerned, I like what I see so far from
performance. Are there concerns about boundary crossing through
teaching the scheduler about things like the rate limit, special
handling of TCP retransmits, etc?

--msw

^ permalink raw reply

* iproute2: add ability to filter neighbour discovery by protocol
From: Stephen Hemminger @ 2013-08-29 19:21 UTC (permalink / raw)
  To: netdev

Useful to be able to monitor arp and IPv6 nd seperately.
Default is both.
---
 ip/ipmonitor.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index 4895390..70f2a7a 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -36,7 +36,6 @@ static void usage(void)
 	exit(-1);
 }
 
-
 static int accept_msg(const struct sockaddr_nl *who,
 		      struct nlmsghdr *n, void *arg)
 {
@@ -88,6 +87,13 @@ static int accept_msg(const struct sockaddr_nl *who,
 	}
 	if (n->nlmsg_type == RTM_NEWNEIGH || n->nlmsg_type == RTM_DELNEIGH ||
 	    n->nlmsg_type == RTM_GETNEIGH) {
+		if (preferred_family) {
+			struct ndmsg *r = NLMSG_DATA(n);
+
+			if (r->ndm_family != preferred_family)
+				return 0;
+		}
+
 		if (prefix_banner)
 			fprintf(fp, "[NEIGH]");
 		print_neigh(who, n, arg);
-- 
1.7.10.4

^ permalink raw reply related

* Re: [net-next v2 1/2] vxlan: Notify drivers for listening UDP port changes
From: Joseph Gasparakis @ 2013-08-29 19:55 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Jeff Kirsher, davem, Joseph Gasparakis, netdev, gospo, sassmann,
	John Fastabend, Stephen Hemminger
In-Reply-To: <1377801778.5372.8.camel@bwh-desktop.uk.level5networks.com>



On Thu, 29 Aug 2013, Ben Hutchings wrote:

> On Thu, 2013-08-29 at 05:54 -0700, Jeff Kirsher wrote:
> > From: Joseph Gasparakis <joseph.gasparakis@intel.com>
> > 
> > This patch adds two more ndo ops: ndo_add_rx_vxlan_port() and
> > ndo_del_rx_vxlan_port().
> [...]
> > --- a/include/linux/netdevice.h
> > +++ b/include/linux/netdevice.h
> > @@ -948,6 +948,18 @@ struct netdev_phys_port_id {
> >   *	Called to get ID of physical port of this device. If driver does
> >   *	not implement this, it is assumed that the hw is not able to have
> >   *	multiple net devices on single physical port.
> > + *
> > + * int (*ndo_add_vxlan_port)(struct  net_device *dev,
> > + *			      __u16 port);
> > + *	Called by vxlan to notiy a driver about the UDP port that vxlan
> > + *	is listnening to. It is called only when a new port starts listening.
> > + *	The operation is protected by the vxlan_net->sock_lock.
> > + *
> > + * int (*ndo_del_vxlan_port)(struct  net_device *dev,
> > + *			    __u16 port);
> > + *	Called by vxlan to notify the driver about a UDP port of vxlan
> > + *	that is not listening anymore. The operation is protected by
> > + *	the vxlan_net->sock_lock.
> >   */
> >  struct net_device_ops {
> >  	int			(*ndo_init)(struct net_device *dev);
> > @@ -1078,6 +1090,10 @@ struct net_device_ops {
> >  						      bool new_carrier);
> >  	int			(*ndo_get_phys_port_id)(struct net_device *dev,
> >  							struct netdev_phys_port_id *ppid);
> > +	int			(*ndo_add_vxlan_port)(struct  net_device *dev,
> > +						      __u16 port);
> > +	int			(*ndo_del_vxlan_port)(struct  net_device *dev,
> > +						      __u16 port);
> >  };
> [...]
> 
> I notice these are defined to return int, but the callers don't check
> the return value.  Should they return void or do the callers need some
> error handling?
> 
> Ben.
> 
> 
You are right Ben, these should be defined to return void. Will fix that 
asap.

Joseph

^ permalink raw reply

* Re: [PATCH v3 net-next] tcp: TSO packets automatic sizing
From: David Miller @ 2013-08-29 19:51 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, ncardwell, ycheng, vanj, therbert
In-Reply-To: <1377607592.8828.149.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 27 Aug 2013 05:46:32 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> After hearing many people over past years complaining against TSO being
> bursty or even buggy, we are proud to present automatic sizing of TSO
> packets.
> 
> One part of the problem is that tcp_tso_should_defer() uses an heuristic
> relying on upcoming ACKS instead of a timer, but more generally, having
> big TSO packets makes little sense for low rates, as it tends to create
> micro bursts on the network, and general consensus is to reduce the
> buffering amount.
> 
> This patch introduces a per socket sk_pacing_rate, that approximates
> the current sending rate, and allows us to size the TSO packets so
> that we try to send one packet every ms.
> 
> This field could be set by other transports.
> 
> Patch has no impact for high speed flows, where having large TSO packets
> makes sense to reach line rate.
> 
> For other flows, this helps better packet scheduling and ACK clocking.
> 
> This patch increases performance of TCP flows in lossy environments.
> 
> A new sysctl (tcp_min_tso_segs) is added, to specify the
> minimal size of a TSO packet (default being 2).
> 
> A follow-up patch will provide a new packet scheduler (FQ), using
> sk_pacing_rate as an input to perform optional per flow pacing.
> 
> This explains why we chose to set sk_pacing_rate to twice the current
> rate, allowing 'slow start' ramp up.
> 
> sk_pacing_rate = 2 * cwnd * mss / srtt
>  
> v2: Neal Cardwell reported a suspect deferring of last two segments on
> initial write of 10 MSS, I had to change tcp_tso_should_defer() to take
> into account tp->xmit_size_goal_segs 
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, please post a new copy of your accompanying packet scheduler.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next v3] net: sctp: sctp_verify_init: clean up mandatory checks and add comment
From: David Miller @ 2013-08-29 19:55 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, linux-sctp
In-Reply-To: <1377615232-11412-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 27 Aug 2013 16:53:52 +0200

> Add a comment related to RFC4960 explaning why we do not check for initial
> TSN, and while at it, remove yoda notation checks and clean up code from
> checks of mandatory conditions. That's probably just really minor, but makes
> reviewing easier.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] virtio-net: Set RXCSUM feature if GUEST_CSUM is available
From: David Miller @ 2013-08-29 19:57 UTC (permalink / raw)
  To: thuth; +Cc: netdev, mst, virtualization
In-Reply-To: <1377616142-29590-1-git-send-email-thuth@linux.vnet.ibm.com>

From: Thomas Huth <thuth@linux.vnet.ibm.com>
Date: Tue, 27 Aug 2013 17:09:02 +0200

> If the VIRTIO_NET_F_GUEST_CSUM virtio feature is available, the guest
> does not have to calculate the checksums on all received packets. This
> is pretty much the same feature as RX checksum offloading on real
> network cards, so the virtio-net driver should report this by setting
> the NETIF_F_RXCSUM flag. When the user now runs "ethtool -k", he or she
> can see whether the virtio-net interface has to calculate RX checksums
> or not.
> 
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>

Can one of the virtio_net folks please review this?

Thanks.

^ permalink raw reply

* Re: [PATCH] ipv4: sendto/hdrincl: don't use destination address found in header
From: David Miller @ 2013-08-29 19:59 UTC (permalink / raw)
  To: chris.clark; +Cc: netdev
In-Reply-To: <alpine.DEB.2.02.1308271153040.2079@optio.utah.ind.alcatel.com>

From: Chris Clark <chris.clark@alcatel-lucent.com>
Date: Tue, 27 Aug 2013 12:02:15 -0600 (MDT)

> 
> ipv4: raw_sendmsg: don't use header's destination address
> 
> A sendto() regression was bisected and found to start with commit
> f8126f1d5136be1 (ipv4: Adjust semantics of rt->rt_gateway.)
> 
> The problem is that it tries to ARP-lookup the constructed packet's
> destination address rather than the explicitly provided address.
> 
> Fix this using FLOWI_FLAG_KNOWN_NH so that given nexthop is used.
> 
> cf. commit 2ad5b9e4bd314fc685086b99e90e5de3bc59e26b
> 
> Reported-by: Chris Clark <chris.clark@alcatel-lucent.com>
> Bisected-by: Chris Clark <chris.clark@alcatel-lucent.com>
> Tested-by: Chris Clark <chris.clark@alcatel-lucent.com>
> Suggested-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: Chris Clark <chris.clark@alcatel-lucent.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH v2] fec: Use NAPI_POLL_WEIGHT
From: David Miller @ 2013-08-29 20:00 UTC (permalink / raw)
  To: festevam; +Cc: netdev, fabio.estevam
In-Reply-To: <1377635708-10159-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <festevam@gmail.com>
Date: Tue, 27 Aug 2013 17:35:08 -0300

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Instead of using a custom 'FEC_NAPI_WEIGHT', just use the generic
> 'NAPI_POLL_WEIGHT' definition instead.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied to net-next, thanks.

^ 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