* Re: [PATCH net-next 0/5] tunnels: harmonize skb scrubbing during encapsulation/decapsulation
From: David Miller @ 2013-09-04 4:52 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: pshelar, netdev, jesse, dev
In-Reply-To: <1378128898-15136-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon, 2 Sep 2013 15:34:53 +0200
> We talk recently about harmonizing tunnels so they behave consistently wrt. SKB
> orphaning, cleaning netfilter state, etc.
> The goal of this serie is to achieve this.
>
> Note that I test only ipip, sit and ip6_tunnels modules.
>
> v2: add patch 2/5
> rebase on head
> remove 'RFC' prefix
Series applied.
^ permalink raw reply
* Re: [PATCH net-next 0/5] bonding: locking simplifications and cleanup
From: David Miller @ 2013-09-04 4:52 UTC (permalink / raw)
To: nikolay; +Cc: netdev, andy, fubar
In-Reply-To: <1378122702-28943-1-git-send-email-nikolay@redhat.com>
From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Mon, 2 Sep 2013 13:51:37 +0200
> This small patchset aims to remove some use cases of bond->lock for mutual
> exclusion which will help in the RCUfication of the function users. It also
> does some small style cleanups and fixes.
Series applied.
^ permalink raw reply
* [PATCH net-next 2/2] tuntap: orphan frags before trying to set tx timestamp
From: Jason Wang @ 2013-09-04 4:33 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: mst, Jason Wang, Richard Cochran
In-Reply-To: <1378269226-5969-1-git-send-email-jasowang@redhat.com>
sock_tx_timestamp() will clear all zerocopy flags of skb which may lead the
frags never to be orphaned. This will break guest to guest traffic when zerocopy
is enabled. Fix this by orphaning the frags before trying to set tx time stamp.
The issue were introduced by commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping).
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/net/tun.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 2dddb1b..af9a096 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -749,15 +749,16 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
>= dev->tx_queue_len / tun->numqueues)
goto drop;
+ /* Orphan the skb - required as we might hang on to it
+ * for indefinite time. */
+ if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
+ goto drop;
+
if (skb->sk) {
sock_tx_timestamp(skb->sk, &skb_shinfo(skb)->tx_flags);
sw_tx_timestamp(skb);
}
- /* Orphan the skb - required as we might hang on to it
- * for indefinite time. */
- if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
- goto drop;
skb_orphan(skb);
nf_reset(skb);
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 1/2] tuntap: purge socket error queue on detach
From: Jason Wang @ 2013-09-04 4:33 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: mst, Jason Wang, Richard Cochran
Commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping) will queue skbs into error queue
when tx stamping is enabled. But it forgets to purge the error queue during
detach. This patch fixes this.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/net/tun.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 60a1e93..2dddb1b 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -409,6 +409,12 @@ static struct tun_struct *tun_enable_queue(struct tun_file *tfile)
return tun;
}
+static void tun_queue_purge(struct tun_file *tfile)
+{
+ skb_queue_purge(&tfile->sk.sk_receive_queue);
+ skb_queue_purge(&tfile->sk.sk_error_queue);
+}
+
static void __tun_detach(struct tun_file *tfile, bool clean)
{
struct tun_file *ntfile;
@@ -435,7 +441,7 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
synchronize_net();
tun_flow_delete_by_queue(tun, tun->numqueues + 1);
/* Drop read queue */
- skb_queue_purge(&tfile->sk.sk_receive_queue);
+ tun_queue_purge(tfile);
tun_set_real_num_queues(tun);
} else if (tfile->detached && clean) {
tun = tun_enable_queue(tfile);
@@ -487,12 +493,12 @@ static void tun_detach_all(struct net_device *dev)
for (i = 0; i < n; i++) {
tfile = rtnl_dereference(tun->tfiles[i]);
/* Drop read queue */
- skb_queue_purge(&tfile->sk.sk_receive_queue);
+ tun_queue_purge(tfile);
sock_put(&tfile->sk);
}
list_for_each_entry_safe(tfile, tmp, &tun->disabled, next) {
tun_enable_queue(tfile);
- skb_queue_purge(&tfile->sk.sk_receive_queue);
+ tun_queue_purge(tfile);
sock_put(&tfile->sk);
}
BUG_ON(tun->numdisabled != 0);
--
1.7.1
^ permalink raw reply related
* Re: [E1000-devel] [PATCH 0/4] i40e: Neatening and object size reductions
From: Joe Perches @ 2013-09-04 4:31 UTC (permalink / raw)
To: Nelson, Shannon
Cc: Kirsher, Jeffrey T, e1000-devel@lists.sourceforge.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <FC41C24E35F18A40888AACA1A36F3E416C61C0E5@FMSMSX102.amr.corp.intel.com>
On Wed, 2013-09-04 at 01:00 +000, Nelson, Shannon wrote:
> we hadn't noticed the new experimental "--fix" option before. There
> are a lot of good suggestions there, but obviously it needs a lot of
> reading and tweaking before it can be used.
Yes, I think --fix works best on patches.
When you use -f and --fix together, it can do inappropriate things.
Using multiple passes of -f --fix --types=<ONE_SPECIFIC_TYPE> and
changing the "ONE_SPECIFIC_TYPE" can produce more reasonable patch
sequences.
If you do try it, and please remember it is experimental, do let me
know how well it works or doesn't work for you all.
Bug reports (and patches) welcome.
cheers, Joe
^ permalink raw reply
* Re: [PATCH 1/5] net: emac: use platform_{get,set}_drvdata()
From: Jingoo Han @ 2013-09-04 3:00 UTC (permalink / raw)
To: 'David Miller'; +Cc: netdev, pgynther, 'Jingoo Han'
In-Reply-To: <20130903.224003.792091851244921220.davem@davemloft.net>
On Wednesday, September 04, 2013 11:40 AM, David Miller wrote:
>
> From: Jingoo Han <jg1.han@samsung.com>
> Date: Mon, 02 Sep 2013 17:06:52 +0900
>
> > Use the wrapper functions for getting and setting the driver data
> > using platform_device instead of using dev_{get,set}_drvdata()
> > with &pdev->dev, so we can directly pass a struct platform_device.
> > This is a purely cosmetic change.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>
> All 5 patches applied.
>
> Please, in the future, provide an initial "[PATCH 00/nn] " posting for
> a series of patches, giving a top-level description of what is happening.
OK, I will provide an initial "[PATCH 00/nn]" posting.
Thank you for your suggestion. :-)
Best regards,
Jingoo Han
>
> This way I can include that commit message text in a merge commit and
> also I have an appropriate email to reply to if I just want to say
> that I applied everything in the series.
^ permalink raw reply
* Re: Re: [PATCH] USB2NET : SR9700 : One chip USB 1.1 USB2NETSR9700Device Driver Support
From: liujunliang_ljl @ 2013-09-04 2:54 UTC (permalink / raw)
To: David Miller
Cc: horms, joe, romieu, gregkh, netdev, linux-usb, linux-kernel,
sunhecheng
In-Reply-To: <20130903.222708.238851084536537650.davem@davemloft.net>
Dear David Miller :
Thanks a lot.
I'm sorry that I just wonder to know which kernel version will release this driver, thanks again. \x7f
2013-09-04
liujunliang_ljl
发件人: David Miller
发送时间: 2013-09-04 10:27:14
收件人: liujunliang_ljl
抄送: horms; joe; romieu; gregkh; netdev; linux-usb; linux-kernel; sunhecheng
主题: Re: [PATCH] USB2NET : SR9700 : One chip USB 1.1 USB2NETSR9700Device Driver Support
From: liujunliang_ljl@163.com
Date: Sun, 1 Sep 2013 19:38:08 +0800
> From: Liu Junliang <liujunliang_ljl@163.com>
>
> Signed-off-by: Liu Junliang <liujunliang_ljl@163.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH v2] drivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and H8300H_H8MAX dependancy for NE_H8300
From: Chen Gang @ 2013-09-04 2:52 UTC (permalink / raw)
To: David Miller; +Cc: paul.gortmaker, ysato, keescook, netdev
In-Reply-To: <20130903.223720.765149153140271341.davem@davemloft.net>
On 09/04/2013 10:37 AM, David Miller wrote:
> From: Chen Gang <gang.chen@asianux.com>
> Date: Mon, 02 Sep 2013 10:20:02 +0800
>
>> Currently only H8300H_AKI3068NET and H8300H_H8MAX define default
>> I/O base and IRQ values for the NE_H8300 driver. Hence builds
>> for other H8300H platforms will fail as per below. Since H8300H
>> does not support multi platform builds, we simply limit building
>> the driver to those two platforms specifically.
>>
>> The release error:
> ...
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>
> Applied, thanks.
>
>
Thank you too.
And h8300 architecture will be remove from Linux kernel (and I am sorry
for forgot to notifying Paul about it),
Do we still need this patch (I am not quite sure, maybe we still need) ?
Thanks.
--
Chen Gang
^ permalink raw reply
* Re: [patch] sfc: check for allocation failure
From: David Miller @ 2013-09-04 2:49 UTC (permalink / raw)
To: dan.carpenter; +Cc: linux-net-drivers, bhutchings, netdev, kernel-janitors
In-Reply-To: <20130902082828.GA30037@elgon.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 2 Sep 2013 12:04:42 +0300
> It upsets static analyzers when we don't check for allocation failure.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This applies cleanly neither to net nor net-next, please send me a
version that does.
Thanks.
^ permalink raw reply
* Re: [PATCH V3 0/6] vhost code cleanup and minor enhancement
From: David Miller @ 2013-09-04 2:47 UTC (permalink / raw)
To: jasowang; +Cc: netdev, virtualization, linux-kernel, kvm, mst
In-Reply-To: <1378111261-14826-1-git-send-email-jasowang@redhat.com>
From: Jason Wang <jasowang@redhat.com>
Date: Mon, 2 Sep 2013 16:40:55 +0800
> This series tries to unify and simplify vhost codes especially for
> zerocopy. With this series, 5% - 10% improvement for per cpu throughput were
> seen during netperf guest sending test.
>
> Plase review.
Applied and patch #5 queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH 1/5] net: emac: use platform_{get,set}_drvdata()
From: David Miller @ 2013-09-04 2:40 UTC (permalink / raw)
To: jg1.han; +Cc: netdev, pgynther
In-Reply-To: <000f01cea7b3$6226fd30$2674f790$%han@samsung.com>
From: Jingoo Han <jg1.han@samsung.com>
Date: Mon, 02 Sep 2013 17:06:52 +0900
> Use the wrapper functions for getting and setting the driver data
> using platform_device instead of using dev_{get,set}_drvdata()
> with &pdev->dev, so we can directly pass a struct platform_device.
> This is a purely cosmetic change.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
All 5 patches applied.
Please, in the future, provide an initial "[PATCH 00/nn] " posting for
a series of patches, giving a top-level description of what is happening.
This way I can include that commit message text in a merge commit and
also I have an appropriate email to reply to if I just want to say
that I applied everything in the series.
^ permalink raw reply
* Re: [PATCH v2] drivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and H8300H_H8MAX dependancy for NE_H8300
From: David Miller @ 2013-09-04 2:37 UTC (permalink / raw)
To: gang.chen; +Cc: paul.gortmaker, ysato, keescook, netdev
In-Reply-To: <5223F5D2.7050504@asianux.com>
From: Chen Gang <gang.chen@asianux.com>
Date: Mon, 02 Sep 2013 10:20:02 +0800
> Currently only H8300H_AKI3068NET and H8300H_H8MAX define default
> I/O base and IRQ values for the NE_H8300 driver. Hence builds
> for other H8300H platforms will fail as per below. Since H8300H
> does not support multi platform builds, we simply limit building
> the driver to those two platforms specifically.
>
> The release error:
...
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-hext] wireless: scan: Remove comment to compare_ether_addr
From: David Miller @ 2013-09-04 2:35 UTC (permalink / raw)
To: joe; +Cc: johannes, linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <1378075707.1953.29.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Sun, 01 Sep 2013 15:48:27 -0700
> This function is being removed, so remove the reference to it.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH] batman: Remove reference to compare_ether_addr
From: David Miller @ 2013-09-04 2:35 UTC (permalink / raw)
To: joe-6d6DIl74uiNBDgjK7y7TUQ
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
siwu-MaAgPAbsBIVS8oHt8HbXEIQuADTiUCJX,
ordex-GaUfNO9RBHfsrOwW+9ziJQ, lindner_marek-LWAfsSFWpa4
In-Reply-To: <1378075508.1953.27.camel@joe-AO722>
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Date: Sun, 01 Sep 2013 15:45:08 -0700
> This function is being removed, rename the reference.
>
> Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] llc: Use normal etherdevice.h tests
From: David Miller @ 2013-09-04 2:34 UTC (permalink / raw)
To: joe; +Cc: acme, netdev, linux-kernel
In-Reply-To: <1378066315.1953.23.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Sun, 01 Sep 2013 13:11:55 -0700
> Convert the llc_<foo> static inlines to the
> equivalents from etherdevice.h and remove
> the llc_<foo> static inline functions.
>
> llc_mac_null -> is_zero_ether_addr
> llc_mac_multicast -> is_multicast_ether_addr
> llc_mac_match -> ether_addr_equal
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] tcp: syncookies: reduce mss table to four values
From: David Miller @ 2013-09-04 2:32 UTC (permalink / raw)
To: fw; +Cc: netdev
In-Reply-To: <1378065356-25509-2-git-send-email-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Sun, 1 Sep 2013 21:55:56 +0200
> Halve mss table size to make blind cookie guessing more difficult.
> This is sad since the tables were already small, but there
> is little alternative except perhaps adding more precise mss information
> in the tcp timestamp. Timestamps are unfortunately not ubiquitous.
>
> Guessing all possible cookie values still has 8-in 2**32 chance.
>
> Reported-by: Jakob Lell <jakob@jakoblell.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> Changes since v1:
> - add comment explaining mss choices
The ipv6 choices are still a complete mystery.
Why do you put a 9000 entry into the ipv6 table and have nothing
similar in the ipv4 table? Why not mimick the ipv4 values in the ipv6
table, as this is exactly what I would expect to be done here?
You need to add a comment to the ipv6 table explaining things, at the
very least.
^ permalink raw reply
* Re: [PATCH net-next] drivers/net: Convert uses of compare_ether_addr to ether_addr_equal
From: David Miller @ 2013-09-04 2:28 UTC (permalink / raw)
To: joe; +Cc: netdev, e1000-devel, linux-kernel, linux-wireless, users
In-Reply-To: <1378061483.1953.3.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Sun, 01 Sep 2013 11:51:23 -0700
> Use the new bool function ether_addr_equal to add
> some clarity and reduce the likelihood for misuse
> of compare_ether_addr for sorting.
>
> Done via cocci script: (and a little typing)
...
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks Joe.
^ permalink raw reply
* Re: [PATCH] USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support
From: David Miller @ 2013-09-04 2:27 UTC (permalink / raw)
To: liujunliang_ljl
Cc: horms, joe, romieu, gregkh, netdev, linux-usb, linux-kernel,
sunhecheng
In-Reply-To: <1378035488-8643-1-git-send-email-liujunliang_ljl@163.com>
From: liujunliang_ljl@163.com
Date: Sun, 1 Sep 2013 19:38:08 +0800
> From: Liu Junliang <liujunliang_ljl@163.com>
>
> Signed-off-by: Liu Junliang <liujunliang_ljl@163.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] xen-netback: count number required slots for an skb more carefully
From: annie li @ 2013-09-04 2:25 UTC (permalink / raw)
To: Wei Liu
Cc: David Vrabel, xen-devel, Konrad Rzeszutek Wilk, Boris Ostrovsky,
Ian Campbell, netdev, msw
In-Reply-To: <20130903215328.GA13465@zion.uk.xensource.com>
On 2013-9-4 5:53, Wei Liu wrote:
> On Tue, Sep 03, 2013 at 06:29:50PM +0100, David Vrabel wrote:
>> From: David Vrabel <david.vrabel@citrix.com>
>>
>> When a VM is providing an iSCSI target and the LUN is used by the
>> backend domain, the generated skbs for direct I/O writes to the disk
>> have large, multi-page skb->data but no frags.
>>
>> With some lengths and starting offsets, xen_netbk_count_skb_slots()
>> would be one short because the simple calculation of
>> DIV_ROUND_UP(skb_headlen(), PAGE_SIZE) was not accounting for the
>> decisions made by start_new_rx_buffer() which does not guarantee
>> responses are fully packed.
>>
>> For example, a skb with length < 2 pages but which spans 3 pages would
>> be counted as requiring 2 slots but would actually use 3 slots.
>>
>> skb->data:
>>
>> | 1111|222222222222|3333 |
>>
>> Fully packed, this would need 2 slots:
>>
>> |111122222222|22223333 |
>>
>> But because the 2nd page wholy fits into a slot it is not split across
>> slots and goes into a slot of its own:
>>
>> |1111 |222222222222|3333 |
>>
>> Miscounting the number of slots means netback may push more responses
>> than the number of available requests. This will cause the frontend
>> to get very confused and report "Too many frags/slots". The frontend
>> never recovers and will eventually BUG.
>>
>> Fix this by counting the number of required slots more carefully. In
>> xen_netbk_count_skb_slots(), more closely follow the algorithm used by
>> xen_netbk_gop_skb() by introducing xen_netbk_count_frag_slots() which
>> is the dry-run equivalent of netbk_gop_frag_copy().
>>
> Phew! So this is backend miscounting bug. I thought it was a frontend
> bug so it didn't ring a bell when we had our face-to-face discussion,
> sorry. :-(
>
> This bug was discussed back in July among Annie, Matt, Ian and I. We
> finally agreed to take Matt's solution. Matt agreed to post final
> version within a week but obviously he's too busy to do so. I was away
> so I didn't follow closely. Eventually it fell through the crack. :-(
The fixes can be implemented in two ways, one is fix in
xen_netbk_count_skb_slots to return correct slot count, my
patch(http://lists.xen.org/archives/html/xen-devel/2013-07/msg00785.html) and
David's fall in this way. The other way is fixed in netbk_gop_frag_copy
which is
Matt's(http://lists.xen.org/archives/html/xen-devel/2013-07/msg00760.html).
> Matt, do you fancy sending the final version? IIRC the commit message
> needs to be re-written. I personally still prefer Matt's solution as
> it a) make efficient use of the ring, b) uses ring pointers to
> calculate slots which is most accurate, c) removes the dependence on
> MAX_SKB_FRAGS in guest RX path.
>
> Anyway, we should get this fixed ASAP.
Totally agree. This issue is easy to be reproduced with large MTU. It is
better to upstream the fix soon in case others hit it and waste time to
fix it.
Thanks
Annie
>
> Thanks
> Wei.
>
> REF:
> <1373409659-22383-1-git-send-email-msw@amazon.com>
> <1373350520-19985-1-git-send-email-annie.li@oracle.com>
>
>
>> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
>> ---
>> [Resend to actually Cc netdev, sorry.]
>> ---
>> drivers/net/xen-netback/netback.c | 94 +++++++++++++++++++++++++------------
>> 1 files changed, 64 insertions(+), 30 deletions(-)
>>
>> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
>> index 64828de..f149ce5 100644
>> --- a/drivers/net/xen-netback/netback.c
>> +++ b/drivers/net/xen-netback/netback.c
>> @@ -361,6 +361,49 @@ static bool start_new_rx_buffer(int offset, unsigned long size, int head)
>> return false;
>> }
>>
>> +struct xen_netbk_count_slot_state {
>> + unsigned long copy_off;
>> + bool head;
>> +};
>> +
>> +unsigned int xen_netbk_count_frag_slots(struct xenvif *vif,
>> + unsigned long offset, unsigned long size,
>> + struct xen_netbk_count_slot_state *state)
>> +{
>> + unsigned count = 0;
>> +
>> + offset &= ~PAGE_MASK;
>> +
>> + while (size > 0) {
>> + unsigned long bytes;
>> +
>> + bytes = PAGE_SIZE - offset;
>> +
>> + if (bytes > size)
>> + bytes = size;
>> +
>> + if (start_new_rx_buffer(state->copy_off, bytes, state->head)) {
>> + count++;
>> + state->copy_off = 0;
>> + }
>> +
>> + if (state->copy_off + bytes > MAX_BUFFER_OFFSET)
>> + bytes = MAX_BUFFER_OFFSET - state->copy_off;
>> +
>> + state->copy_off += bytes;
>> +
>> + offset += bytes;
>> + size -= bytes;
>> +
>> + if (offset == PAGE_SIZE)
>> + offset = 0;
>> +
>> + state->head = false;
>> + }
>> +
>> + return count;
>> +}
>> +
>> /*
>> * Figure out how many ring slots we're going to need to send @skb to
>> * the guest. This function is essentially a dry run of
>> @@ -368,48 +411,39 @@ static bool start_new_rx_buffer(int offset, unsigned long size, int head)
>> */
>> unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb)
>> {
>> + struct xen_netbk_count_slot_state state;
>> unsigned int count;
>> - int i, copy_off;
>> + unsigned char *data;
>> + unsigned i;
>>
>> - count = DIV_ROUND_UP(skb_headlen(skb), PAGE_SIZE);
>> + state.head = true;
>> + state.copy_off = 0;
>>
>> - copy_off = skb_headlen(skb) % PAGE_SIZE;
>> + /* Slot for the first (partial) page of data. */
>> + count = 1;
>>
>> + /* Need a slot for the GSO prefix for GSO extra data? */
>> if (skb_shinfo(skb)->gso_size)
>> count++;
>>
>> - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
>> - unsigned long size = skb_frag_size(&skb_shinfo(skb)->frags[i]);
>> - unsigned long offset = skb_shinfo(skb)->frags[i].page_offset;
>> - unsigned long bytes;
>> -
>> - offset &= ~PAGE_MASK;
>> -
>> - while (size > 0) {
>> - BUG_ON(offset >= PAGE_SIZE);
>> - BUG_ON(copy_off > MAX_BUFFER_OFFSET);
>> -
>> - bytes = PAGE_SIZE - offset;
>> -
>> - if (bytes > size)
>> - bytes = size;
>> + data = skb->data;
>> + while (data < skb_tail_pointer(skb)) {
>> + unsigned long offset = offset_in_page(data);
>> + unsigned long size = PAGE_SIZE - offset;
>>
>> - if (start_new_rx_buffer(copy_off, bytes, 0)) {
>> - count++;
>> - copy_off = 0;
>> - }
>> + if (data + size > skb_tail_pointer(skb))
>> + size = skb_tail_pointer(skb) - data;
>>
>> - if (copy_off + bytes > MAX_BUFFER_OFFSET)
>> - bytes = MAX_BUFFER_OFFSET - copy_off;
>> + count += xen_netbk_count_frag_slots(vif, offset, size, &state);
>>
>> - copy_off += bytes;
>> + data += size;
>> + }
>>
>> - offset += bytes;
>> - size -= bytes;
>> + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
>> + unsigned long size = skb_frag_size(&skb_shinfo(skb)->frags[i]);
>> + unsigned long offset = skb_shinfo(skb)->frags[i].page_offset;
>>
>> - if (offset == PAGE_SIZE)
>> - offset = 0;
>> - }
>> + count += xen_netbk_count_frag_slots(vif, offset, size, &state);
>> }
>> return count;
>> }
>> --
>> 1.7.2.5
>>
>> --
>> 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] tg3: Don't turn off led on 5719 serdes port 0
From: David Miller @ 2013-09-04 2:24 UTC (permalink / raw)
To: nsujir; +Cc: netdev, mchan
In-Reply-To: <1377907296-25737-1-git-send-email-nsujir@broadcom.com>
From: "Nithin Nayak Sujir" <nsujir@broadcom.com>
Date: Fri, 30 Aug 2013 17:01:36 -0700
> From: Nithin Sujir <nsujir@broadcom.com>
>
> Turning off led on port 0 of the 5719 serdes causes all other ports to
> lose power and stop functioning. Add tg3_phy_led_bug() function to check
> for this condition. We use a switch() in tg3_phy_led_bug() for
> consistency with the tg3_phy_power_bug() function.
>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH v3 01/11] net: calxedaxgmac: remove NETIF_F_FRAGLIST setting
From: David Miller @ 2013-09-04 2:22 UTC (permalink / raw)
To: robherring2; +Cc: netdev, bhutchings, buytenh, rob.herring
In-Reply-To: <1377899369-23252-1-git-send-email-robherring2@gmail.com>
Series applied, thanks.
In the future, when you send more than one patch at a time, always provide
an initial "[PATCH 00/NN] " posting which gives a top-level overview
description of your patch series and what it achieves.
You can look at what other developers do on this list for examples.
Thank you.
^ permalink raw reply
* Re: [PATCH net-next] be2net: set and query VEB/VEPA mode of the PF interface
From: David Miller @ 2013-09-04 2:20 UTC (permalink / raw)
To: ajit.khaparde; +Cc: netdev
In-Reply-To: <20130830200116.GA6311@emulex.com>
From: Ajit Khaparde <ajit.khaparde@emulex.com>
Date: Fri, 30 Aug 2013 15:01:16 -0500
> SkyHawk-R can support VEB or VEPA mode.
> This patch will allow the user to set/query this switch setting.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net: fix comment typo for __skb_alloc_pages()
From: David Miller @ 2013-09-04 2:17 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
In-Reply-To: <1377873374-11350-1-git-send-email-f.fainelli@gmail.com>
From: "Florian Fainelli" <f.fainelli@gmail.com>
Date: Fri, 30 Aug 2013 15:36:14 +0100
> The name of the function in the comment is __skb_alloc_page() while we
> are actually commenting __skb_alloc_pages(). Fix this typo and make it
> a valid kernel doc comment.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] ipv6: ipv6_create_tempaddr cleanup
From: David Miller @ 2013-09-04 2:17 UTC (permalink / raw)
To: pholasek; +Cc: hannes, netdev, linux-kernel
In-Reply-To: <1377874958-2426-1-git-send-email-pholasek@redhat.com>
From: Petr Holasek <pholasek@redhat.com>
Date: Fri, 30 Aug 2013 17:02:38 +0200
> This two-liner removes max_addresses variable which is now unecessary related
> to patch [ipv6: remove max_addresses check from ipv6_create_tempaddr].
>
> Signed-off-by: Petr Holasek <pholasek@redhat.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH][net-next] gianfar: Fix reported number of sent bytes to BQL
From: David Miller @ 2013-09-04 2:14 UTC (permalink / raw)
To: claudiu.manoil; +Cc: netdev, eric.dumazet
In-Reply-To: <1377864075-19491-1-git-send-email-claudiu.manoil@freescale.com>
From: Claudiu Manoil <claudiu.manoil@freescale.com>
Date: Fri, 30 Aug 2013 15:01:15 +0300
> Fix the amount of sent bytes reported to BQL by reporting the
> number of bytes on wire in the xmit routine, and recording that
> value for each skb in order to be correctly confirmed on Tx
> confirmation cleanup.
>
> Reporting skb->len to BQL just before exiting xmit is not correct
> due to possible insertions of TOE block and alignment bytes in the
> skb->data, which are being stripped off by the controller before
> transmission on wire. This led to mismatch of (incorrectly)
> reported bytes to BQL b/w xmit and Tx confirmation, resulting in
> Tx timeout firing, for the h/w tx timestamping acceleration case.
>
> There's no easy way to obtain the number of bytes on wire in the Tx
> confirmation routine, so skb->cb is used to convey that information
> from xmit to Tx confirmation, for now (as proposed by Eric). Revived
> the currently unused GFAR_CB() construct for that purpose.
>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Applied.
^ 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