* Re: [PATCH net-next 0/7] be2net fixes
From: David Miller @ 2012-04-26 9:05 UTC (permalink / raw)
To: padmanabh.ratnakar; +Cc: netdev
In-Reply-To: <54ea1f39-fd40-40c9-97a4-271ba9e4df49@exht1.ad.emulex.com>
From: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Date: Wed, 25 Apr 2012 17:15:52 +0530
> Please apply.
> Thanks,
> Padmanabh
>
> Padmanabh Ratnakar (7):
> be2net: Fix VLAN/multicast packet reception
> be2net: Fix FW download in Lancer
> be2net: Fix ethtool self test for Lancer
> be2net: Fix traffic stall INTx mode
> be2net: Fix Lancer statistics
> be2net: Fix wrong status getting returned for MCC commands
> be2net: Fix FW download for BE
All applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH 1/2] ehea: fix allmulticast support
From: David Miller @ 2012-04-26 9:08 UTC (permalink / raw)
To: cascardo; +Cc: netdev
In-Reply-To: <1335375132-4591-1-git-send-email-cascardo@linux.vnet.ibm.com>
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Wed, 25 Apr 2012 14:32:11 -0300
> There was a bug in the mask of regtype parameter for registering a
> multicast filter. It was ignoring the scope bit, which was wrongly being
> used for all filters. The SCOPE_ALL value adds a filter that allows all
> multicast packets and ignores the MAC parameter, just what allmulticast
> needs. The normals filters, however, should not use SCOPE_ALL.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] ehea: fix promiscuous mode
From: David Miller @ 2012-04-26 9:08 UTC (permalink / raw)
To: cascardo; +Cc: netdev, leitao
In-Reply-To: <1335375132-4591-2-git-send-email-cascardo@linux.vnet.ibm.com>
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Wed, 25 Apr 2012 14:32:12 -0300
> commit a4910b744486254cfa61995954c118fb2283c4fd has broken promiscuous
> mode, which is never set. port->promisc just reflects the last setting
> of PROMISCUOUS mode to avoid doing an extra hypercall when it's already
> set.
>
> However, since it may fail because of hypervisor permissions, we should
> still respect the multicast settings and not simply exit after setting
> promiscuous mode.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Applied.
^ permalink raw reply
* [PATCH] net: usb: smsc95xx: fix mtu
From: Steve Glendinning @ 2012-04-26 9:02 UTC (permalink / raw)
To: netdev; +Cc: Stephane Fillod, David S. Miller, Steve Glendinning
Make smsc95xx recalculate the hard_mtu after adjusting the hard_header_len.
Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is
unable to receive standard 1500-byte frames from the device.
Inspired by same fixes on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9
and smsc75xx a99ff7d0123b19ecad3b589480b6542716ab6b52.
Tested on i386 with EVB-LAN9500-LC.
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
---
drivers/net/usb/smsc95xx.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 5f19f84..53a1ba5 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1017,6 +1017,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
dev->net->flags |= IFF_MULTICAST;
dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD_CSUM;
+ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
return 0;
}
--
1.7.5.4
^ permalink raw reply related
* Re: [RFC] allow skb->head to point/alias to first skb frag
From: Eric Dumazet @ 2012-04-26 9:10 UTC (permalink / raw)
To: David Miller
Cc: ilpo.jarvinen, rick.jones2, netdev, therbert, ncardwell, maze,
ycheng
In-Reply-To: <20120426.043623.1317043382565428400.davem@davemloft.net>
On Thu, 2012-04-26 at 04:36 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 26 Apr 2012 10:10:54 +0200
>
> > Idea would have :
> >
> > 1) struct sk_buff
> > 2) skb->head points to frag (aliasing, no memory allocation)
> > 3) frag of 2048 (or PAGE_SIZE/2 or PAGE_SIZE)
>
> What would you set skb->data_len and skb->len to?
>
> How would you handle tailroom? We have the rule that you can't append
> to the tail of a fragmented SKB (I mean append, the way that IPSEC
> wants to write data to the end of an SKB when encrypting, for
> example). This is only allowed on fully linear SKBs.
>
> So, for this reason and others, you can't pretend that this new
> construction is linear in any way. It would break a bunch of things.
The 'frag' would have a known size : 2048 bytes
But the end of it would be used by struct skb_shared_info
so data_len would be 0 in fact.
This would look like a regular linear skb.
Just a bit set in skb to say : Warning, skb->head was not kmalloced :
replace kfree(head) by put_page(...)
And this bit would be tested in GRO or tcp merge to 'upgrade' this
skb->head to proper page/frag
^ permalink raw reply
* Re: [net 0/2][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-04-26 9:11 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1335333314-6814-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 24 Apr 2012 22:55:12 -0700
> This series of patches contains fixes for e1000e only.
>
> The following are changes since commit 2a5809499e35b53a6044fd34e72b242688b7a862:
> asix: Fix tx transfer padding for full-speed USB
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master
>
> Jeff Kirsher (1):
> e1000e: Fix default interrupt throttle rate not set in NIC HW
>
> Prasanna S Panchamukhi (1):
> e1000e: MSI interrupt test failed, using legacy interrupt
Pulled, but longer term you guys might want to take Ben's suggestion
and just take the interrupt self-test out altogether.
Thanks.
^ permalink raw reply
* RE: [PATCH 00/10] atl1c: update hardware settings - v3
From: Huang, Xiong @ 2012-04-26 9:13 UTC (permalink / raw)
To: David Miller
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
qca-linux-team, nic-devel
In-Reply-To: <20120426.050542.243663587525305831.davem@davemloft.net>
Ok, I will update quirks.c for the next patch set. Thanks !
-Xiong
> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Thursday, April 26, 2012 17:06
> To: Huang, Xiong
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; qca-linux-team; nic-
> devel
> Subject: Re: [PATCH 00/10] atl1c: update hardware settings - v3
>
> From: xiong <xiong@qca.qualcomm.com>
> Date: Thu, 26 Apr 2012 14:27:08 +0800
>
> > This update contains a serial of patches, most of them are hardware
> > settings related. register definitions are refined (or removed if
> > meaningless) for each patch.
> >
> > This is the third serial patches, after reviewed/applied the fourth
> > serial will be out.
> >
> > The patches have addressed all sparse and checkpatch warnings.
> >
> > Following NICs are tested:
> > AR8131/AR8132/AR8151A/AR8152A/AR8152B
> > Test item includes:
> > build/install/uninstall/dhcp/ping/iperf/wol/reboot/etc.
>
> I've applied patches #1 until #9, patch #10 needs to be done differently.
>
> The PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG bit should be set via a PCI quirk
> entry in drivers/pci/quirks.c just as it is done for other devices which have this
> problem.
>
> Thank you.
^ permalink raw reply
* [GIT PULL] net/at91: at91_ether fixes for 3.4-rc
From: Nicolas Ferre @ 2012-04-26 9:14 UTC (permalink / raw)
To: David Miller, netdev, linux-arm-kernel
Cc: Andrew Victor, Jean-Christophe PLAGNIOL-VILLARD,
Linux Kernel list
Hi David,
Can you please pull those fixes for 3.4-rc? The ARM/AT91 part
of modifications is pretty small and bounded to a single SoC so
it will not mess with arm-soc git tree.
Tell me if you need other information on this signed tag...
The following changes since commit 66f75a5d028beaf67c931435fdc3e7823125730c:
Linux 3.4-rc4 (2012-04-21 14:47:52 -0700)
are available in the git repository at:
git://github.com/at91linux/linux-at91.git tags/at91-3.4-net-fixes
for you to fetch changes up to cfc991548b5b73c8038f41877da1cd0104945cf5:
net/at91_ether: use gpio_to_irq for phy IRQ line (2012-04-26 10:22:40 +0200)
----------------------------------------------------------------
Both fixes are about at91_ether.c driver: It is only used in a single
Atmel AT91 SoC: AT91RM9200.
The removal of fixed mapping is a long standing refinement which will
convert this driver to a more typical resources management.
The gpio fix is needed now that we have moved AT91 to irqdomains.
----------------------------------------------------------------
Andrew Victor (1):
AT91: Remove fixed mapping for AT91RM9200 ethernet
Nicolas Ferre (1):
net/at91_ether: use gpio_to_irq for phy IRQ line
arch/arm/mach-at91/at91rm9200.c | 10 --
arch/arm/mach-at91/at91rm9200_devices.c | 4 +-
arch/arm/mach-at91/include/mach/hardware.h | 1 -
drivers/net/ethernet/cadence/at91_ether.c | 535 ++++++++++++++++++++++++++++++++++++++++++++-------------------------------------
drivers/net/ethernet/cadence/at91_ether.h | 1 +
5 files changed, 291 insertions(+), 260 deletions(-)
Best regards,
--
Nicolas Ferre
^ permalink raw reply
* Re: [RFC] allow skb->head to point/alias to first skb frag
From: David Miller @ 2012-04-26 9:18 UTC (permalink / raw)
To: eric.dumazet
Cc: ilpo.jarvinen, rick.jones2, netdev, therbert, ncardwell, maze,
ycheng
In-Reply-To: <1335431402.2775.24.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 26 Apr 2012 11:10:02 +0200
> The 'frag' would have a known size : 2048 bytes
>
> But the end of it would be used by struct skb_shared_info
>
> so data_len would be 0 in fact.
>
> This would look like a regular linear skb.
>
> Just a bit set in skb to say : Warning, skb->head was not kmalloced :
> replace kfree(head) by put_page(...)
>
> And this bit would be tested in GRO or tcp merge to 'upgrade' this
> skb->head to proper page/frag
And what happens if this ends up in a piece of code which wants to
append a page frag?
Or a piece of code which copies an SKB, including page frag parts?
All I'm saying is that the number of tests necessary to make this work
properly might become prohibitive.
^ permalink raw reply
* Re: [GIT PULL] net/at91: at91_ether fixes for 3.4-rc
From: David Miller @ 2012-04-26 9:20 UTC (permalink / raw)
To: nicolas.ferre
Cc: netdev, linux-arm-kernel, linux-kernel, avictor.za, plagnioj
In-Reply-To: <4F991210.8060409@atmel.com>
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Thu, 26 Apr 2012 11:14:56 +0200
> Can you please pull those fixes for 3.4-rc? The ARM/AT91 part
> of modifications is pretty small and bounded to a single SoC so
> it will not mess with arm-soc git tree.
Please post the patches themselves to netdev.
You can give me pull requests, but those go into the "[PATCH 0/N] ..."
email, it doesn't preclude you're still having to post the actual
patches.
Otherwise nobody can review your work.
^ permalink raw reply
* Re: [RFC] allow skb->head to point/alias to first skb frag
From: Eric Dumazet @ 2012-04-26 9:22 UTC (permalink / raw)
To: David Miller
Cc: ilpo.jarvinen, rick.jones2, netdev, therbert, ncardwell, maze,
ycheng
In-Reply-To: <20120426.051800.637617874638567499.davem@davemloft.net>
On Thu, 2012-04-26 at 05:18 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 26 Apr 2012 11:10:02 +0200
>
> > The 'frag' would have a known size : 2048 bytes
> >
> > But the end of it would be used by struct skb_shared_info
> >
> > so data_len would be 0 in fact.
> >
> > This would look like a regular linear skb.
> >
> > Just a bit set in skb to say : Warning, skb->head was not kmalloced :
> > replace kfree(head) by put_page(...)
> >
> > And this bit would be tested in GRO or tcp merge to 'upgrade' this
> > skb->head to proper page/frag
>
> And what happens if this ends up in a piece of code which wants to
> append a page frag?
>
> Or a piece of code which copies an SKB, including page frag parts?
>
> All I'm saying is that the number of tests necessary to make this work
> properly might become prohibitive.
I'll cook a patch, I believe not so many parts assume skb->head can be
kmalloc()/kfree(). This should be contained in net/core/skbuff.c only.
Elsewhere we use skb->head as a pointer to memory. It will stay the
same.
^ permalink raw reply
* Re: [PATCH] tcp repair: Fix unaligned access when repairing options (v2)
From: David Miller @ 2012-04-26 9:23 UTC (permalink / raw)
To: xemul; +Cc: netdev, David.Laight
In-Reply-To: <4F990C71.3020500@parallels.com>
From: Pavel Emelyanov <xemul@parallels.com>
Date: Thu, 26 Apr 2012 12:50:57 +0400
> Don't pick __u8/__u16 values directly from raw pointers, but instead use
> an array of structures of code:value pairs. This is OK, since the buffer
> we take options from is not an skb memory, but a user-to-kernel one.
>
> For those options which don't require any value now, require this to be
> zero (for potential future extension of this API).
>
> v2: Changed tcp_repair_opt to use two __u32-s as spotted by David Laight.
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Hmmm, this didn't show up on netdev, I wonder why?
^ permalink raw reply
* [PATCH net 0/3][6lowpan] fixes for 6lowpan
From: Alexander Smirnov @ 2012-04-26 9:24 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
The following patch set contains several fixes for the 6lowpan holes which lead
to unpredictable module state.
With best regards,
Alex
8<--
The following changes since commit 872f24dbc604ef585ea7eec73020dcdfaffd1956:
tipc: remove inline instances from C source files. (2012-04-24 00:41:03 -0400)
are available in the git repository at:
6lowpan_dev ..BRANCH.NOT.VERIFIED..
Alexander Smirnov (3):
6lowpan: fix segmentation fault caused by mlme request
6lowpan: clean up fragments list if module unloaded
6lowpan: add missing spin_lock_init()
net/ieee802154/6lowpan.c | 40 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 38 insertions(+), 2 deletions(-)
From: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH net 0/3][6lowpan] fixes for 6lowpan
In-Reply-To:
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply
* [PATCH net 1/3] 6lowpan: fix segmentation fault caused by mlme request
From: Alexander Smirnov @ 2012-04-26 9:24 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-zigbee-devel, Alexander Smirnov
In-Reply-To: <1335432298-17161-1-git-send-email-alex.bluesman.smirnov@gmail.com>
Add nescesary mlme callbacks to satisfy "iz list" request from user space.
Due to 6lowpan device doesn't have its own phy, mlme implemented as a pipe
to a real phy to which 6lowpan is attached.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
---
net/ieee802154/6lowpan.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 58c8895..7ce508f 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1044,6 +1044,24 @@ static void lowpan_dev_free(struct net_device *dev)
free_netdev(dev);
}
+static struct wpan_phy *lowpan_get_phy(const struct net_device *dev)
+{
+ struct net_device *real_dev = lowpan_dev_info(dev)->real_dev;
+ return ieee802154_mlme_ops(real_dev)->get_phy(real_dev);
+}
+
+static u16 lowpan_get_pan_id(const struct net_device *dev)
+{
+ struct net_device *real_dev = lowpan_dev_info(dev)->real_dev;
+ return ieee802154_mlme_ops(real_dev)->get_pan_id(real_dev);
+}
+
+static u16 lowpan_get_short_addr(const struct net_device *dev)
+{
+ struct net_device *real_dev = lowpan_dev_info(dev)->real_dev;
+ return ieee802154_mlme_ops(real_dev)->get_short_addr(real_dev);
+}
+
static struct header_ops lowpan_header_ops = {
.create = lowpan_header_create,
};
@@ -1053,6 +1071,12 @@ static const struct net_device_ops lowpan_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};
+static struct ieee802154_mlme_ops lowpan_mlme = {
+ .get_pan_id = lowpan_get_pan_id,
+ .get_phy = lowpan_get_phy,
+ .get_short_addr = lowpan_get_short_addr,
+};
+
static void lowpan_setup(struct net_device *dev)
{
pr_debug("(%s)\n", __func__);
@@ -1070,6 +1094,7 @@ static void lowpan_setup(struct net_device *dev)
dev->netdev_ops = &lowpan_netdev_ops;
dev->header_ops = &lowpan_header_ops;
+ dev->ml_priv = &lowpan_mlme;
dev->destructor = lowpan_dev_free;
}
--
1.7.2.3
^ permalink raw reply related
* [PATCH net 2/3] 6lowpan: clean up fragments list if module unloaded
From: Alexander Smirnov @ 2012-04-26 9:24 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-zigbee-devel, Alexander Smirnov
In-Reply-To: <1335432298-17161-1-git-send-email-alex.bluesman.smirnov@gmail.com>
Clean all the pending fragments and relative timers if 6lowpan link
is going to be deleted.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
---
net/ieee802154/6lowpan.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 7ce508f..a21ca6e 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1177,11 +1177,20 @@ static void lowpan_dellink(struct net_device *dev, struct list_head *head)
{
struct lowpan_dev_info *lowpan_dev = lowpan_dev_info(dev);
struct net_device *real_dev = lowpan_dev->real_dev;
- struct lowpan_dev_record *entry;
- struct lowpan_dev_record *tmp;
+ struct lowpan_dev_record *entry, *tmp;
+ struct lowpan_fragment *frame, *tframe;
ASSERT_RTNL();
+ spin_lock(&flist_lock);
+ list_for_each_entry_safe(frame, tframe, &lowpan_fragments, list) {
+ del_timer(&frame->timer);
+ list_del(&frame->list);
+ dev_kfree_skb(frame->skb);
+ kfree(frame);
+ }
+ spin_unlock(&flist_lock);
+
mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
if (entry->ldev == dev) {
--
1.7.2.3
^ permalink raw reply related
* [PATCH net 3/3] 6lowpan: add missing spin_lock_init()
From: Alexander Smirnov @ 2012-04-26 9:24 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-zigbee-devel, Alexander Smirnov
In-Reply-To: <1335432298-17161-1-git-send-email-alex.bluesman.smirnov@gmail.com>
Add missing spin_lock_init() for frames list lock.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
---
net/ieee802154/6lowpan.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index a21ca6e..b570dbf 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1168,6 +1168,8 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
list_add_tail(&entry->list, &lowpan_devices);
mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx);
+ spin_lock_init(&flist_lock);
+
register_netdevice(dev);
return 0;
--
1.7.2.3
^ permalink raw reply related
* Re: [PATCH 0/4] mISDN Fix and enhancements for the HFC 4S/8S/E1 driver
From: David Miller @ 2012-04-26 9:32 UTC (permalink / raw)
To: kkeil; +Cc: netdev
In-Reply-To: <1335336734-25181-1-git-send-email-kkeil@linux-pingi.de>
From: Karsten Keil <kkeil@linux-pingi.de>
Date: Wed, 25 Apr 2012 08:52:10 +0200
> For net-next.
>
> Patchset contains fixes for issues fond in long time testing.
> The LED support now works as proposed by the card documentation.
> For special cases you can now split a E1 line into independ logical
> instances.
All applied, thanks Karsten.
^ permalink raw reply
* Re: [PATCH net 0/3][6lowpan] fixes for 6lowpan
From: David Miller @ 2012-04-26 9:33 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1335432298-17161-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 26 Apr 2012 13:24:55 +0400
> The following patch set contains several fixes for the 6lowpan holes which lead
> to unpredictable module state.
All applied, thanks.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply
* [PATCH net-next 0/2][6lowpan] code improvements and refactorings
From: Alexander Smirnov @ 2012-04-26 9:35 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
The following patches contains 6lowpan code improvements.
With best regards,
Alex
8<--
The following changes since commit b89f01c8dab2b2d07729e1e6525272568bca54e0:
6lowpan: add missing spin_lock_init() (2012-04-26 11:35:28 +0400)
are available in the git repository at:
6lowpan_dev ..BRANCH.NOT.VERIFIED..
Alexander Smirnov (2):
6lowpan: move frame allocation code to a separate function
6lowpan: duplicate definition of IEEE802154_ALEN
net/ieee802154/6lowpan.c | 85 +++++++++++++++++++++++++++-------------------
net/ieee802154/6lowpan.h | 3 --
2 files changed, 50 insertions(+), 38 deletions(-)
From: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH net-next 0/2][6lowpan] code improvements and refactorings
In-Reply-To:
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply
* [PATCH net-next 1/2] 6lowpan: move frame allocation code to a separate function
From: Alexander Smirnov @ 2012-04-26 9:35 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1335432951-17340-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Separate frame allocation routine from data processing function.
This makes code more human readable and easier for understanding.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/ieee802154/6lowpan.c | 81 +++++++++++++++++++++++++++-------------------
1 files changed, 48 insertions(+), 33 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index b570dbf..f406ac8 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -650,6 +650,53 @@ static void lowpan_fragment_timer_expired(unsigned long entry_addr)
kfree(entry);
}
+static struct lowpan_fragment *
+lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag)
+{
+ struct lowpan_fragment *frame;
+
+ frame = kzalloc(sizeof(struct lowpan_fragment),
+ GFP_ATOMIC);
+ if (!frame)
+ goto frame_err;
+
+ INIT_LIST_HEAD(&frame->list);
+
+ frame->length = (iphc0 & 7) | (len << 3);
+ frame->tag = tag;
+
+ /* allocate buffer for frame assembling */
+ frame->skb = alloc_skb(frame->length +
+ sizeof(struct ipv6hdr), GFP_ATOMIC);
+
+ if (!frame->skb)
+ goto skb_err;
+
+ frame->skb->priority = skb->priority;
+ frame->skb->dev = skb->dev;
+
+ /* reserve headroom for uncompressed ipv6 header */
+ skb_reserve(frame->skb, sizeof(struct ipv6hdr));
+ skb_put(frame->skb, frame->length);
+
+ init_timer(&frame->timer);
+ /* time out is the same as for ipv6 - 60 sec */
+ frame->timer.expires = jiffies + LOWPAN_FRAG_TIMEOUT;
+ frame->timer.data = (unsigned long)frame;
+ frame->timer.function = lowpan_fragment_timer_expired;
+
+ add_timer(&frame->timer);
+
+ list_add_tail(&frame->list, &lowpan_fragments);
+
+ return frame;
+
+skb_err:
+ kfree(frame);
+frame_err:
+ return NULL;
+}
+
static int
lowpan_process_data(struct sk_buff *skb)
{
@@ -692,41 +739,9 @@ lowpan_process_data(struct sk_buff *skb)
/* alloc new frame structure */
if (!found) {
- frame = kzalloc(sizeof(struct lowpan_fragment),
- GFP_ATOMIC);
+ frame = lowpan_alloc_new_frame(skb, iphc0, len, tag);
if (!frame)
goto unlock_and_drop;
-
- INIT_LIST_HEAD(&frame->list);
-
- frame->length = (iphc0 & 7) | (len << 3);
- frame->tag = tag;
-
- /* allocate buffer for frame assembling */
- frame->skb = alloc_skb(frame->length +
- sizeof(struct ipv6hdr), GFP_ATOMIC);
-
- if (!frame->skb) {
- kfree(frame);
- goto unlock_and_drop;
- }
-
- frame->skb->priority = skb->priority;
- frame->skb->dev = skb->dev;
-
- /* reserve headroom for uncompressed ipv6 header */
- skb_reserve(frame->skb, sizeof(struct ipv6hdr));
- skb_put(frame->skb, frame->length);
-
- init_timer(&frame->timer);
- /* time out is the same as for ipv6 - 60 sec */
- frame->timer.expires = jiffies + LOWPAN_FRAG_TIMEOUT;
- frame->timer.data = (unsigned long)frame;
- frame->timer.function = lowpan_fragment_timer_expired;
-
- add_timer(&frame->timer);
-
- list_add_tail(&frame->list, &lowpan_fragments);
}
if ((iphc0 & LOWPAN_DISPATCH_MASK) == LOWPAN_DISPATCH_FRAG1)
--
1.7.2.3
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply related
* [PATCH net-next 2/2] 6lowpan: duplicate definition of IEEE802154_ALEN
From: Alexander Smirnov @ 2012-04-26 9:35 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1335432951-17340-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
The same macros is defined in 'include/net/af_ieee802154.h' and is called
IEEE802154_ADDR_LEN. No need another one, so remove it.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/ieee802154/6lowpan.c | 4 ++--
net/ieee802154/6lowpan.h | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index f406ac8..32eb417 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -196,7 +196,7 @@ lowpan_compress_addr_64(u8 **hc06_ptr, u8 shift, const struct in6_addr *ipaddr,
static void
lowpan_uip_ds6_set_addr_iid(struct in6_addr *ipaddr, unsigned char *lladdr)
{
- memcpy(&ipaddr->s6_addr[8], lladdr, IEEE802154_ALEN);
+ memcpy(&ipaddr->s6_addr[8], lladdr, IEEE802154_ADDR_LEN);
/* second bit-flip (Universe/Local) is done according RFC2464 */
ipaddr->s6_addr[8] ^= 0x02;
}
@@ -221,7 +221,7 @@ lowpan_uncompress_addr(struct sk_buff *skb, struct in6_addr *ipaddr,
if (lladdr)
lowpan_raw_dump_inline(__func__, "linklocal address",
- lladdr, IEEE802154_ALEN);
+ lladdr, IEEE802154_ADDR_LEN);
if (prefcount > 0)
memcpy(ipaddr, prefix, prefcount);
diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h
index aeff3f3..8c2251f 100644
--- a/net/ieee802154/6lowpan.h
+++ b/net/ieee802154/6lowpan.h
@@ -53,9 +53,6 @@
#ifndef __6LOWPAN_H__
#define __6LOWPAN_H__
-/* need to know address length to manipulate with it */
-#define IEEE802154_ALEN 8
-
#define UIP_802154_SHORTADDR_LEN 2 /* compressed ipv6 address length */
#define UIP_IPH_LEN 40 /* ipv6 fixed header size */
#define UIP_PROTO_UDP 17 /* ipv6 next header value for UDP */
--
1.7.2.3
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply related
* Re: [PATCH] net: usb: smsc95xx: fix mtu
From: David Miller @ 2012-04-26 9:38 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev, fillods
In-Reply-To: <1335430964-1018-1-git-send-email-steve.glendinning@shawell.net>
This is already in the 'net' tree for nearly a week:
commit 9bbf56609d304e8aae2076610d938206453035de
Author: Stephane Fillod <fillods@users.sf.net>
Date: Fri Apr 20 09:39:23 2012 +0000
net: usb: smsc95xx: fix mtu
Make smsc95xx recalculate the hard_mtu after adjusting the
hard_header_len.
Without this, usbnet adjusts the MTU down to 1488 bytes, and the host is
unable to receive standard 1500-byte frames from the device.
Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9.
Tested on ARM/Beagle.
Signed-off-by: Stephane Fillod <fillods@users.sf.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH] dl2k: Clean up rio_ioctl
From: David Miller @ 2012-04-26 9:38 UTC (permalink / raw)
To: jeffm; +Cc: netdev
In-Reply-To: <4F989789.9040405@suse.com>
From: Jeff Mahoney <jeffm@suse.com>
Date: Wed, 25 Apr 2012 20:32:09 -0400
> The dl2k driver's rio_ioctl call has a few issues:
> - No permissions checking
> - Implements SIOCGMIIREG and SIOCGMIIREG using the SIOCDEVPRIVATE numbers
> - Has a few ioctls that may have been used for debugging at one point
> but have no place in the kernel proper.
>
> This patch removes all but the MII ioctls, renumbers them to use the
> standard ones, and adds the proper permission check for SIOCSMIIREG.
>
> We can also get rid of the dl2k-specific struct mii_data in favor of
> the generic struct mii_ioctl_data.
>
> Since we have the phyid on hand, we can add the SIOCGMIIPHY ioctl too.
>
> Most of the MII code for the driver could probably be converted to use
> the generic MII library but I don't have a device to test the results.
>
> Reported-by: Stephan Mueller <stephan.mueller@atsec.com>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] tcp repair: Fix unaligned access when repairing options (v2)
From: Pavel Emelyanov @ 2012-04-26 9:41 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, David.Laight@ACULAB.COM
In-Reply-To: <20120426.052336.664675835426476301.davem@davemloft.net>
On 04/26/2012 01:23 PM, David Miller wrote:
> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Thu, 26 Apr 2012 12:50:57 +0400
>
>> Don't pick __u8/__u16 values directly from raw pointers, but instead use
>> an array of structures of code:value pairs. This is OK, since the buffer
>> we take options from is not an skb memory, but a user-to-kernel one.
>>
>> For those options which don't require any value now, require this to be
>> zero (for potential future extension of this API).
>>
>> v2: Changed tcp_repair_opt to use two __u32-s as spotted by David Laight.
>>
>> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
>
> Hmmm, this didn't show up on netdev, I wonder why?
So do I :( I haven't received any mail with errors from netdev, neither
Parallels mail server reported any problems.
I will resubmit this one again.
Thanks,
Pavel
^ permalink raw reply
* Re: [PATCH v2] smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
From: Steve Glendinning @ 2012-04-26 9:41 UTC (permalink / raw)
To: David Miller; +Cc: fillods, paolo.pisati, netdev
In-Reply-To: <CAKh2mn4JLm8f036d7vNimLdA2wCP+Db7xhgUgfsg760yhs3Yjw@mail.gmail.com>
Hi all,
On 24 April 2012 16:45, Steve Glendinning <steve@shawell.net> wrote:
> Hi all,
>
> On 24 April 2012 05:42, David Miller <davem@davemloft.net> wrote:
>>
>> Steve, please send a maintainers etc. update and please provide
>> feedback on this link status fix.
Good catch Paolo, this patch fixes reporting of link status when the
device is first connected with no ethernet cable plugged in.
I'll prepare the same patch for smsc75xx as it also suffers from the same issue.
Acked-by: Steve Glendinning <steve.glendinning@shawell.net>
--
Steve Glendinning
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox