* Re: [PATCH net 0/2] qlcnic: Bug fixes
From: David Miller @ 2013-10-26 4:05 UTC (permalink / raw)
To: shahed.shaikh; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1382711917-28501-1-git-send-email-shahed.shaikh@qlogic.com>
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Date: Fri, 25 Oct 2013 10:38:35 -0400
> From: Shahed Shaikh <shahed.shaikh@qlogic.com>
>
> This patch series contains following fixes-
> * Performace drop because driver was forcing adapter not to check
> destination IP for LRO.
> * driver was not issuing qlcnic_fw_cmd_set_drv_version() to 83xx adapter
> becasue of improper handling of QLCNIC_FW_CAPABILITY_MORE_CAPS bit.
>
> Please apply to net.
Applied, what exactly does that destination IP check do?
^ permalink raw reply
* Re: [PATCH net-next] veth: extend features to support tunneling
From: Eric Dumazet @ 2013-10-26 4:13 UTC (permalink / raw)
To: Alexei Starovoitov; +Cc: David Miller, Eric Dumazet, stephen, netdev
In-Reply-To: <CAMEtUuwgDpLFMj0DNx+c4QZz573rgmLiNcZOmHgou2A3684Shw@mail.gmail.com>
On Fri, 2013-10-25 at 19:22 -0700, Alexei Starovoitov wrote:
> On Fri, Oct 25, 2013 at 6:25 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > From: Eric Dumazet <edumazet@google.com>
> >
> > While investigating on a recent vxlan regression, I found veth
> > was using a zero features set for vxlan tunnels.
>
> oneliner can be better :)
Yes, I'll post the gso fix as well, of course ;)
>
> > We have to segment GSO frames, copy the payload, and do the checksum.
> >
> > This patch brings a ~200% performance increase
> >
> > We probably have to add hw_enc_features support
> > on other virtual devices.
> >
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Alexei Starovoitov <ast@plumgrid.com>
> > ---
>
> iperf over veth with gre/vxlan tunneling is now ~4Gbps. 20x gain as advertised.
> Thanks!
Wow, such a difference might show another bug somewhere else...
Thanks !
^ permalink raw reply
* Hi,
From: John Reynolds @ 2013-10-26 4:15 UTC (permalink / raw)
To: netdev
Hi,
Is there a userspace API that can be used to determine if a network interface is a 802.1Q interface, and what its vlan id and parent interface is. it appears that SOICGIFPFLAGS is not supported and netdev_priv() is only available to drivers, or do I have to resort to parsing the /proc/net/* files ?
regards
^ permalink raw reply
* Re: [PATCH net 1/2] qlcnic: Do not force adapter to perform LRO without destination IP check
From: Eric Dumazet @ 2013-10-26 4:17 UTC (permalink / raw)
To: Shahed Shaikh; +Cc: davem, netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1382711917-28501-2-git-send-email-shahed.shaikh@qlogic.com>
On Fri, 2013-10-25 at 10:38 -0400, Shahed Shaikh wrote:
> From: Shahed Shaikh <shahed.shaikh@qlogic.com>
>
> Forcing adapter to perform LRO without destination IP check
> degrades the performance.
Hmm... the performance, or does it allow two packets belonging to
different flows being wrongly aggregated ?
It looks a critical bug fix, not only a performance issue.
^ permalink raw reply
* Re: [PATCH net-next] macsonic: Updated printk() statement to netdev_info function
From: Joe Perches @ 2013-10-26 4:26 UTC (permalink / raw)
To: Matt Zanchelli; +Cc: netdev
In-Reply-To: <1382738000-24202-1-git-send-email-zanchm@rpi.edu>
On Fri, 2013-10-25 at 21:53 +0000, Matt Zanchelli wrote:
> Updated the printk() statement in mac_sonic_probe() to recommended netdev_info.
Hi again Matt.
> Reviewed-by: Mukkai Krishnamoorthy <mskmoorthy@gmail.com>
> Reviewed-by: Maxwell Ensley-Field <mensleyfield@gmail.com>
> Reviewed-by: Nicole Negedly <nnegedly@gmail.com>
> Reviewed-by: Daniel Felizardo <danfelizardo@gmail.com>
> Signed-off-by: Matt Zanchelli <zanchm@rpi.edu>
Does it really take 4 reviewers for a single line change?
I'd rather have each of these reviewers submit patches to
different files rather than have them review this pretty
trivial change to a pretty old driver that really doesn't
need much in the way of changes.
And please, if you modify this file all, please be more
comprehensive in the printk conversions.
There are many printks in this file, not just this one.
> diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
[]
> @@ -601,7 +601,7 @@ found:
> if (err)
> goto out;
>
> - printk("%s: MAC %pM IRQ %d\n", dev->name, dev->dev_addr, dev->irq);
> + netdev_info(dev, "MAC %pM IRQ %d\n", dev->dev_addr, dev->irq);
>
> return 0;
Something like:
drivers/net/ethernet/natsemi/macsonic.c | 66 +++++++++++++++------------------
drivers/net/ethernet/natsemi/sonic.h | 3 +-
2 files changed, 30 insertions(+), 39 deletions(-)
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
index 346a4e0..bc33181 100644
--- a/drivers/net/ethernet/natsemi/macsonic.c
+++ b/drivers/net/ethernet/natsemi/macsonic.c
@@ -31,6 +31,8 @@
* on centris.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
@@ -80,8 +82,6 @@ static unsigned int sonic_debug = SONIC_DEBUG;
static unsigned int sonic_debug = 1;
#endif
-static int sonic_version_printed;
-
/* For onboard SONIC */
#define ONBOARD_SONIC_REGISTERS 0x50F0A000
#define ONBOARD_SONIC_PROM_BASE 0x50f08000
@@ -143,8 +143,7 @@ static int macsonic_open(struct net_device* dev)
retval = request_irq(dev->irq, sonic_interrupt, 0, "sonic", dev);
if (retval) {
- printk(KERN_ERR "%s: unable to get IRQ %d.\n",
- dev->name, dev->irq);
+ netdev_err(dev, "unable to get IRQ %d\n", dev->irq);
goto err;
}
/* Under the A/UX interrupt scheme, the onboard SONIC interrupt comes
@@ -155,8 +154,7 @@ static int macsonic_open(struct net_device* dev)
retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt, 0,
"sonic", dev);
if (retval) {
- printk(KERN_ERR "%s: unable to get IRQ %d.\n",
- dev->name, IRQ_NUBUS_9);
+ netdev_err(dev, "unable to get IRQ %d\n", IRQ_NUBUS_9);
goto err_irq;
}
}
@@ -277,11 +275,9 @@ static void mac_onboard_sonic_ethernet_addr(struct net_device *dev)
* If we still have what seems to be a bogus address, we'll
* look in the CAM. The top entry should be ours.
*/
- printk(KERN_WARNING "macsonic: MAC address in PROM seems "
- "to be invalid, trying CAM\n");
+ netdev_warn(dev, "MAC address in PROM seems to be invalid, trying CAM\n");
} else {
- printk(KERN_WARNING "macsonic: cannot read MAC address from "
- "PROM, trying CAM\n");
+ netdev_warn(dev, "cannot read MAC address from PROM, trying CAM\n");
}
/* This only works if MacOS has already initialized the card. */
@@ -304,8 +300,7 @@ static void mac_onboard_sonic_ethernet_addr(struct net_device *dev)
/* Still nonsense ... messed up someplace! */
- printk(KERN_WARNING "macsonic: MAC address in CAM entry 15 "
- "seems invalid, will use a random MAC\n");
+ netdev_warn(dev, "MAC address in CAM entry 15 seems invalid, will use a random MAC\n");
eth_hw_addr_random(dev);
}
@@ -318,7 +313,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
if (!MACH_IS_MAC)
return -ENODEV;
- printk(KERN_INFO "Checking for internal Macintosh ethernet (SONIC).. ");
+ netdev_info(dev, "Checking for internal Macintosh ethernet (SONIC).. ");
/* Bogus probing, on the models which may or may not have
Ethernet (BTW, the Ethernet *is* always at the same
@@ -336,7 +331,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
local_irq_restore(flags);
if (!card_present) {
- printk("none.\n");
+ printk("none\n");
return -ENODEV;
}
commslot = 1;
@@ -352,12 +347,10 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
else
dev->irq = IRQ_NUBUS_9;
- if (!sonic_version_printed) {
- printk(KERN_INFO "%s", version);
- sonic_version_printed = 1;
- }
- printk(KERN_INFO "%s: onboard / comm-slot SONIC at 0x%08lx\n",
- dev_name(lp->device), dev->base_addr);
+ pr_info_once("%s\n", version);
+
+ netdev_info(dev, "onboard / comm-slot SONIC at 0x%08lx\n",
+ dev->base_addr);
/* The PowerBook's SONIC is 16 bit always. */
if (macintosh_config->ident == MAC_MODEL_PB520) {
@@ -388,13 +381,13 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
lp->dma_bitmode = SONIC_BITMODE32;
sr = SONIC_READ(SONIC_SR);
}
- printk(KERN_INFO
- "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",
- dev_name(lp->device), sr, lp->dma_bitmode?32:16, lp->reg_offset);
+ netdev_info(dev, "revision 0x%04x, using %d bit DMA and register offset %d\n",
+ sr, lp->dma_bitmode ? 32 : 16, lp->reg_offset);
#if 0 /* This is sometimes useful to find out how MacOS configured the card. */
- printk(KERN_INFO "%s: DCR: 0x%04x, DCR2: 0x%04x\n", dev_name(lp->device),
- SONIC_READ(SONIC_DCR) & 0xffff, SONIC_READ(SONIC_DCR2) & 0xffff);
+ netdev_info(dev, "DCR: 0x%04x, DCR2: 0x%04x\n",
+ SONIC_READ(SONIC_DCR) & 0xffff,
+ SONIC_READ(SONIC_DCR2) & 0xffff);
#endif
/* Software reset, then initialize control registers. */
@@ -527,7 +520,7 @@ static int mac_nubus_sonic_probe(struct net_device *dev)
dma_bitmode = SONIC_BITMODE16;
break;
default:
- printk(KERN_ERR "macsonic: WTF, id is %d\n", id);
+ netdev_err(dev, "WTF, id is %d\n", id);
return -ENODEV;
}
@@ -538,18 +531,17 @@ static int mac_nubus_sonic_probe(struct net_device *dev)
lp->dma_bitmode = dma_bitmode;
dev->irq = SLOT2IRQ(ndev->board->slot);
- if (!sonic_version_printed) {
- printk(KERN_INFO "%s", version);
- sonic_version_printed = 1;
- }
- printk(KERN_INFO "%s: %s in slot %X\n",
- dev_name(lp->device), ndev->board->name, ndev->board->slot);
- printk(KERN_INFO "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",
- dev_name(lp->device), SONIC_READ(SONIC_SR), dma_bitmode?32:16, reg_offset);
+ pr_info_once("%s\n", version);
+
+ netdev_info(dev, "%s in slot %X\n",
+ ndev->board->name, ndev->board->slot);
+ netdev_info(dev, "revision 0x%04x, using %d bit DMA and register offset %d\n",
+ SONIC_READ(SONIC_SR), dma_bitmode ? 32 : 16, reg_offset);
#if 0 /* This is sometimes useful to find out how MacOS configured the card. */
- printk(KERN_INFO "%s: DCR: 0x%04x, DCR2: 0x%04x\n", dev_name(lp->device),
- SONIC_READ(SONIC_DCR) & 0xffff, SONIC_READ(SONIC_DCR2) & 0xffff);
+ netdev_info(dev, "DCR: 0x%04x, DCR2: 0x%04x\n",
+ SONIC_READ(SONIC_DCR) & 0xffff,
+ SONIC_READ(SONIC_DCR2) & 0xffff);
#endif
/* Software reset, then initialize control registers. */
@@ -601,7 +593,7 @@ found:
if (err)
goto out;
- printk("%s: MAC %pM IRQ %d\n", dev->name, dev->dev_addr, dev->irq);
+ netdev_info(dev, "MAC %pM IRQ %d\n", dev->dev_addr, dev->irq);
return 0;
diff --git a/drivers/net/ethernet/natsemi/sonic.h b/drivers/net/ethernet/natsemi/sonic.h
index 07091dd..6d31916 100644
--- a/drivers/net/ethernet/natsemi/sonic.h
+++ b/drivers/net/ethernet/natsemi/sonic.h
@@ -444,7 +444,6 @@ static inline __u16 sonic_rra_get(struct net_device* dev, int entry,
(entry * SIZEOF_SONIC_RR) + offset);
}
-static const char *version =
- "sonic.c:v0.92 20.9.98 tsbogend@alpha.franken.de\n";
+static const char *version = "v0.92 20.9.98 tsbogend@alpha.franken.de";
#endif /* SONIC_H */
^ permalink raw reply related
* Re: [net-next 00/11][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2013-10-26 4:30 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1382628458-26601-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 24 Oct 2013 08:27:27 -0700
> This series contains updates to igb, igbvf, i40e, ixgbe and ixgbevf.
Pulled, thanks a lot Jeff.
^ permalink raw reply
* Re: Hi,
From: Ben Greear @ 2013-10-26 5:04 UTC (permalink / raw)
To: John Reynolds; +Cc: netdev
In-Reply-To: <526B4FEC020000B100033DCD@mailhost1.datacore.uk.com>
On 10/25/2013 09:15 PM, John Reynolds wrote:
> Hi,
> Is there a userspace API that can be used to determine if a network interface is a 802.1Q interface, and what its vlan id and parent interface is. it appears that SOICGIFPFLAGS is not supported and netdev_priv() is only available to drivers, or do I have to resort to parsing the /proc/net/* files ?
>
> regards
The netlink API has it. You can use the 'ip' tool and parse it's text output,
though of course that is not an overly stable API.
I think the old VLAN ioctls are still in the kernel as well, so you can
use those like the 'vconfig' tool does.
http://www.candelatech.com/~greear/vlan.html
Please note that 'ip' is the way of the future and I have little interest
in actually supporting vconfig.
Thanks,
Ben
>
> --
> 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
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH net-next 3/5] 6lowpan: use netdev_alloc_skb instead dev_alloc_skb
From: David Miller @ 2013-10-26 5:42 UTC (permalink / raw)
To: alex.aring
Cc: alex.bluesman.smirnov, linux-zigbee-devel, werner, dbaryshkov,
netdev
In-Reply-To: <1382647904-11311-4-git-send-email-alex.aring@gmail.com>
From: Alexander Aring <alex.aring@gmail.com>
Date: Thu, 24 Oct 2013 22:51:42 +0200
> @@ -1127,12 +1127,12 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
>
> lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
>
> - frag = dev_alloc_skb(hlen + mlen + plen + IEEE802154_MFR_SIZE);
> + frag = netdev_alloc_skb(skb->dev, hlen + mlen +
> + plen + IEEE802154_MFR_SIZE);
Please indent this properly.
It should be something like:
frag = netdev_alloc_skb(skb->dev, hlen + mlen +
plen + IEEE802154_MFR_SIZE);
^ permalink raw reply
* Re: [PATCH RFC v2 1/4] net: mvmdio: make orion_mdio_wait_ready consistent
From: David Miller @ 2013-10-26 5:44 UTC (permalink / raw)
To: leigh; +Cc: linux-arm-kernel, thomas.petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <4955b6b331459b7b9c54350b8f0b254065d013c3.1382637156.git.leigh@solinno.co.uk>
From: Leigh Brown <leigh@solinno.co.uk>
Date: Thu, 24 Oct 2013 19:09:31 +0100
> + else
> + if (timedout)
> break;
>
Please make this:
else if (timedout)
break;
^ permalink raw reply
* Re: [PATCH RFC v2 3/4] net: mvmdio: slight optimisation of orion_mdio_write
From: David Miller @ 2013-10-26 5:45 UTC (permalink / raw)
To: leigh; +Cc: linux-arm-kernel, thomas.petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <6d044f3760cd506a325d5aab1199131ade96d632.1382637156.git.leigh@solinno.co.uk>
From: Leigh Brown <leigh@solinno.co.uk>
Date: Thu, 24 Oct 2013 19:09:33 +0100
> Make only a single call to mutex_unlock in orion_mdio_write.
>
> Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
You patch does more than what you're talking about here in your
commit message. In particular you're also changing the interpretation
of the orion_mdio_wait_ready() return value by changing the test
from < 0 to != 0.
Even if that is a legitimate change:
1) You're not describing it in the commit message at all.
2) It's a logically separate change, so should go into a completely
separate patch.
^ permalink raw reply
* Re: [PATCH net-next 3/5] 6lowpan: use netdev_alloc_skb instead dev_alloc_skb
From: Joe Perches @ 2013-10-26 6:01 UTC (permalink / raw)
To: David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20131026.014214.1636999222808937267.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Sat, 2013-10-26 at 01:42 -0400, David Miller wrote:
> From: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Thu, 24 Oct 2013 22:51:42 +0200
>
> > @@ -1127,12 +1127,12 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
> >
> > lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
> >
> > - frag = dev_alloc_skb(hlen + mlen + plen + IEEE802154_MFR_SIZE);
> > + frag = netdev_alloc_skb(skb->dev, hlen + mlen +
> > + plen + IEEE802154_MFR_SIZE);
>
> Please indent this properly.
>
> It should be something like:
>
> frag = netdev_alloc_skb(skb->dev, hlen + mlen +
> plen + IEEE802154_MFR_SIZE);
Maybe better as:
frag = netdev_alloc_skb(skb->dev,
hlen + mlen + plen + IEEE802154_MFR_SIZE);
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply
* Re: [PATCH 1/3] vxlan: silence one build warning
From: Zhi Yong Wu @ 2013-10-26 7:06 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, linux-kernel mlist, Zhi Yong Wu
In-Reply-To: <20131025084134.6cfa153a@samsung-9>
On Fri, Oct 25, 2013 at 11:41 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Fri, 25 Oct 2013 15:49:18 +0800
> Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
>
>> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>>
>> drivers/net/vxlan.c: In function ‘vxlan_sock_add’:
>> drivers/net/vxlan.c:2298:11: warning: ‘sock’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> drivers/net/vxlan.c:2275:17: note: ‘sock’ was declared here
>> LD drivers/net/built-in.o
>>
>> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>> ---
>> drivers/net/vxlan.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
>> index 2ef5b62..e15f1af 100644
>> --- a/drivers/net/vxlan.c
>> +++ b/drivers/net/vxlan.c
>> @@ -2272,7 +2272,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port,
>> {
>> struct vxlan_net *vn = net_generic(net, vxlan_net_id);
>> struct vxlan_sock *vs;
>> - struct socket *sock;
>> + struct socket *sock = NULL;
>> struct sock *sk;
>> int rc = 0;
>> unsigned int h;
>
> This only happens with certain versions of Gcc which have buggy dependency
> analysis. It doesn't happen with Gcc 4.7, think it only shows up in 4.4.
> I would rather not fix the warning this way since it risks masking later bugs if this code ever changes.
Gcc version is 4.7.2 on my box, this warning took palce.
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
...
gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC)
--
Regards,
Zhi Yong Wu
^ permalink raw reply
* [PATCH v2 2/3] sctp: remove the repeat initialize with 0
From: Wang Weidong @ 2013-10-26 8:06 UTC (permalink / raw)
To: nhorman, vyasevich; +Cc: davem, dingtianhong, linux-sctp, netdev
In-Reply-To: <1382774792-13440-1-git-send-email-wangweidong1@huawei.com>
kmem_cache_zalloc had set the allocated memory to zero. I think no need
to initialize with 0. And move the comments to the function begin.
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/sctp/sm_make_chunk.c | 29 ++++++++---------------------
1 file changed, 8 insertions(+), 21 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index d244a23..fe69032 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1297,6 +1297,13 @@ struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc)
/* Turn an skb into a chunk.
* FIXME: Eventually move the structure directly inside the skb->cb[].
+ *
+ * sctpimpguide-05.txt Section 2.8.2
+ * M1) Each time a new DATA chunk is transmitted
+ * set the 'TSN.Missing.Report' count for that TSN to 0. The
+ * 'TSN.Missing.Report' count will be used to determine missing chunks
+ * and when to fast retransmit.
+ *
*/
struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
const struct sctp_association *asoc,
@@ -1314,29 +1321,9 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
INIT_LIST_HEAD(&retval->list);
retval->skb = skb;
retval->asoc = (struct sctp_association *)asoc;
- retval->has_tsn = 0;
- retval->has_ssn = 0;
- retval->rtt_in_progress = 0;
- retval->sent_at = 0;
retval->singleton = 1;
- retval->end_of_packet = 0;
- retval->ecn_ce_done = 0;
- retval->pdiscard = 0;
-
- /* sctpimpguide-05.txt Section 2.8.2
- * M1) Each time a new DATA chunk is transmitted
- * set the 'TSN.Missing.Report' count for that TSN to 0. The
- * 'TSN.Missing.Report' count will be used to determine missing chunks
- * and when to fast retransmit.
- */
- retval->tsn_missing_report = 0;
- retval->tsn_gap_acked = 0;
- retval->fast_retransmit = SCTP_CAN_FRTX;
- /* If this is a fragmented message, track all fragments
- * of the message (for SEND_FAILED).
- */
- retval->msg = NULL;
+ retval->fast_retransmit = SCTP_CAN_FRTX;
/* Polish the bead hole. */
INIT_LIST_HEAD(&retval->transmitted_list);
--
1.7.12
^ permalink raw reply related
* [PATCH v2 3/3] sctp: merge two if statements to one
From: Wang Weidong @ 2013-10-26 8:06 UTC (permalink / raw)
To: nhorman, vyasevich; +Cc: davem, dingtianhong, linux-sctp, netdev
In-Reply-To: <1382774792-13440-1-git-send-email-wangweidong1@huawei.com>
Two if statements do the same work, we can merge them to
one. And fix some typos. There is just code simplification,
no functional changes.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/sctp/auth.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index 8c4fa5d..46b5977 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -539,18 +539,14 @@ struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc)
for (i = 0; i < n_elt; i++) {
id = ntohs(hmacs->hmac_ids[i]);
- /* Check the id is in the supported range */
- if (id > SCTP_AUTH_HMAC_ID_MAX) {
- id = 0;
- continue;
- }
-
- /* See is we support the id. Supported IDs have name and
- * length fields set, so that we can allocated and use
+ /* Check the id is in the supported range. And
+ * see if we support the id. Supported IDs have name and
+ * length fields set, so that we can allocate and use
* them. We can safely just check for name, for without the
* name, we can't allocate the TFM.
*/
- if (!sctp_hmac_list[id].hmac_name) {
+ if (id > SCTP_AUTH_HMAC_ID_MAX ||
+ !sctp_hmac_list[id].hmac_name) {
id = 0;
continue;
}
--
1.7.12
^ permalink raw reply related
* [PATCH v2 0/3] sctp: do some clean up and fix comments
From: Wang Weidong @ 2013-10-26 8:06 UTC (permalink / raw)
To: nhorman, vyasevich; +Cc: davem, dingtianhong, linux-sctp, netdev
This patch series includes some comments fix, merge tow if-statements,
remove the repeat initialize with 0.
v1 -> v2:
- patch1: combine two comment typos fix patches into one,
as suggested by Vlad, and add his ACK.
- patch2: add Vlad's ACK.
- patch3: line up 2 parts of 'if' statements, as suggested by Vlad.
fix some comment typos, as suggested by Sergei.
Wang Weidong (3):
sctp: fix some comments in chunk.c and associola.c
sctp: remove the repeat initialize with 0
sctp: merge two if statements to one
net/sctp/associola.c | 4 ++--
net/sctp/auth.c | 14 +++++---------
net/sctp/chunk.c | 2 +-
net/sctp/sm_make_chunk.c | 29 ++++++++---------------------
4 files changed, 16 insertions(+), 33 deletions(-)
--
1.7.12
^ permalink raw reply
* [PATCH v2 1/3] sctp: fix some comments in chunk.c and associola.c
From: Wang Weidong @ 2013-10-26 8:06 UTC (permalink / raw)
To: nhorman, vyasevich; +Cc: davem, dingtianhong, linux-sctp, netdev
In-Reply-To: <1382774792-13440-1-git-send-email-wangweidong1@huawei.com>
fix some typos
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/sctp/associola.c | 4 ++--
net/sctp/chunk.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index cef5099..c9b91cb 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -602,7 +602,7 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,
/* Start a T3 timer here in case it wasn't running so
* that these migrated packets have a chance to get
- * retrnasmitted.
+ * retransmitted.
*/
if (!timer_pending(&active->T3_rtx_timer))
if (!mod_timer(&active->T3_rtx_timer,
@@ -665,7 +665,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
/* Set the path max_retrans. */
peer->pathmaxrxt = asoc->pathmaxrxt;
- /* And the partial failure retrnas threshold */
+ /* And the partial failure retrans threshold */
peer->pf_retrans = asoc->pf_retrans;
/* Initialize the peer's SACK delay timeout based on the
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index 7bd5ed4..f2044fc 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -201,7 +201,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
max = asoc->frag_point;
/* If the the peer requested that we authenticate DATA chunks
- * we need to accound for bundling of the AUTH chunks along with
+ * we need to account for bundling of the AUTH chunks along with
* DATA.
*/
if (sctp_auth_send_cid(SCTP_CID_DATA, asoc)) {
--
1.7.12
^ permalink raw reply related
* David Desmond.Business Manager Societe Generale Bank United Kingdom.I have a proposal worth £18,500,000.Get back to us for more details via david_desmond10@yahoo.com
From: David Desmond. @ 2013-10-26 8:04 UTC (permalink / raw)
To: info
^ permalink raw reply
* my subject
From: Mr. X @ 2013-10-26 8:36 UTC (permalink / raw)
To: Recipients
Need a Loan, Loans from $5000 - $10,000,000 00. Get your no obligation FREE quote now! Repayments up to 54 Months. No Collateral, Money paid into your account within 24 hours after approval. For more Info contact us today guaranteeloancompany1@gmail.com
^ permalink raw reply
* I have a better plans
From: HK China @ 2013-10-26 8:16 UTC (permalink / raw)
I have a better plans for us reply me ASAP. 2630920215@qq.com
Thanks.
^ permalink raw reply
* [PATCH net-next v2 3/5] 6lowpan: use netdev_alloc_skb instead dev_alloc_skb
From: Alexander Aring @ 2013-10-26 13:54 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1382795642-12501-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
This patch uses the netdev_alloc_skb instead dev_alloc_skb function and
drops the seperate assignment to skb->dev.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reviewed-by: Werner Almesberger <werner-SEdMjqphH88wryQfseakQg@public.gmane.org>
---
net/ieee802154/6lowpan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 9057f83..1884a84 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1127,12 +1127,12 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
- frag = dev_alloc_skb(hlen + mlen + plen + IEEE802154_MFR_SIZE);
+ frag = netdev_alloc_skb(skb->dev, hlen + mlen +
+ plen + IEEE802154_MFR_SIZE);
if (!frag)
return -ENOMEM;
frag->priority = skb->priority;
- frag->dev = skb->dev;
/* copy header, MFR and payload */
memcpy(skb_put(frag, mlen), skb->data, mlen);
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next v2 0/5] 6lowpan: trivial changes
From: Alexander Aring @ 2013-10-26 13:53 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
This patch series includes some trivial changes to prepare the 6lowpan stack
for upcomming patch-series which mainly fix fragmentation according to rfc4944
and udp handling(which is currently broken).
Changes since v2:
- change intendation in patch 3/5
- fix typo in 5/5 unecessary -> unnecessary
- add missing 6lowpan tag in cover-letter
Alexander Aring (5):
6lowpan: remove unnecessary ret variable
6lowpan: remove unnecessary check on err >= 0
6lowpan: use netdev_alloc_skb instead dev_alloc_skb
6lowpan: remove skb->dev assignment
6lowpan: remove unnecessary break
net/ieee802154/6lowpan.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
--
1.8.4.1
^ permalink raw reply
* [PATCH net-next v2 1/5] 6lowpan: remove unnecessary ret variable
From: Alexander Aring @ 2013-10-26 13:53 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
In-Reply-To: <1382795642-12501-1-git-send-email-alex.aring@gmail.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index ff41b4d..d288035 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1120,7 +1120,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
int mlen, int plen, int offset, int type)
{
struct sk_buff *frag;
- int hlen, ret;
+ int hlen;
hlen = (type == LOWPAN_DISPATCH_FRAG1) ?
LOWPAN_FRAG1_HEAD_SIZE : LOWPAN_FRAGN_HEAD_SIZE;
@@ -1145,9 +1145,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
lowpan_raw_dump_table(__func__, " raw fragment dump", frag->data,
frag->len);
- ret = dev_queue_xmit(frag);
-
- return ret;
+ return dev_queue_xmit(frag);
}
static int
--
1.8.4.1
^ permalink raw reply related
* [PATCH net-next v2 2/5] 6lowpan: remove unnecessary check on err >= 0
From: Alexander Aring @ 2013-10-26 13:53 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
In-Reply-To: <1382795642-12501-1-git-send-email-alex.aring@gmail.com>
The err variable can only be zero in this case.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d288035..9057f83 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1179,7 +1179,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
head[0] &= ~LOWPAN_DISPATCH_FRAG1;
head[0] |= LOWPAN_DISPATCH_FRAGN;
- while ((payload_length - offset > 0) && (err >= 0)) {
+ while (payload_length - offset > 0) {
int len = LOWPAN_FRAG_SIZE;
head[4] = offset / 8;
--
1.8.4.1
^ permalink raw reply related
* [PATCH net-next v2 4/5] 6lowpan: remove skb->dev assignment
From: Alexander Aring @ 2013-10-26 13:54 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
In-Reply-To: <1382795642-12501-1-git-send-email-alex.aring@gmail.com>
This patch removes the assignment of skb->dev. We don't need it here because
we use the netdev_alloc_skb_ip_align function which already sets the
skb->dev.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 1884a84..665b118 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -785,7 +785,6 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u16 len, u16 tag)
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));
--
1.8.4.1
^ permalink raw reply related
* [PATCH net-next v2 5/5] 6lowpan: remove unnecessary break
From: Alexander Aring @ 2013-10-26 13:54 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
In-Reply-To: <1382795642-12501-1-git-send-email-alex.aring@gmail.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 665b118..6d75038 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -440,7 +440,6 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
default:
pr_debug("ERROR: unknown UDP format\n");
goto err;
- break;
}
pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
--
1.8.4.1
^ permalink raw reply related
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