* [PATCH net-next v2 1/3] r8152: remove the duplicate init for the list of rx_done
From: Hayes Wang @ 2014-10-31 9:56 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
In-Reply-To: <1394712342-15778-79-Taiwan-albertk@realtek.com>
The INIT_LIST_HEAD(&tp->rx_done) would be done in rtl_start_rx(),
so remove the unnecessary one in alloc_all_mem().
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/usb/r8152.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f116335..ff54098 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1256,7 +1256,6 @@ static int alloc_all_mem(struct r8152 *tp)
spin_lock_init(&tp->rx_lock);
spin_lock_init(&tp->tx_lock);
- INIT_LIST_HEAD(&tp->rx_done);
INIT_LIST_HEAD(&tp->tx_free);
skb_queue_head_init(&tp->tx_queue);
--
1.9.3
^ permalink raw reply related
* [PATCH net-next v2 0/3] Code adjustment
From: Hayes Wang @ 2014-10-31 9:56 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
In-Reply-To: <1394712342-15778-75-Taiwan-albertk@realtek.com>
v2:
Correct the spelling error for the comment of patch #3.
v1:
Adjust some codes to make them more reasonable.
Hayes Wang (3):
r8152: remove the duplicate init for the list of rx_done
r8152: clear the flag of SCHEDULE_TASKLET in tasklet
r8152: check RTL8152_UNPLUG and netif_running before autoresume
drivers/net/usb/r8152.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--
1.9.3
^ permalink raw reply
* Re: [PATCH net-next v4 0/4] netns: allow to identify peer netns
From: Nicolas Dichtel @ 2014-10-31 9:48 UTC (permalink / raw)
To: Eric W. Biederman
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
luto-kltTT9wpgjJwATOyAt5JVQ, cwang-xCSkyg8dI+0RB7SZvlqPiA
In-Reply-To: <871tpph03k.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
Le 30/10/2014 19:41, Eric W. Biederman a écrit :
> Nicolas Dichtel <nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> writes:
>
>> The goal of this serie is to be able to multicast netlink messages with an
>> attribute that identify a peer netns.
>> This is needed by the userland to interpret some informations contained in
>> netlink messages (like IFLA_LINK value, but also some other attributes in case
>> of x-netns netdevice (see also
>> http://thread.gmane.org/gmane.linux.network/315933/focus=316064 and
>> http://thread.gmane.org/gmane.linux.kernel.containers/28301/focus=4239)).
>>
>> Ids of peer netns are set by userland via a new genl messages. These ids are
>> stored per netns and are local (ie only valid in the netns where they are set).
>> To avoid allocating an int for each peer netns, I use idr_for_each() to retrieve
>> the id of a peer netns. Note that it will be possible to add a table (struct net
>> -> id) later to optimize this lookup if needed.
>>
>> Patch 1/4 introduces the netlink API mechanism to set and get these ids.
>> Patch 2/4 and 3/4 implements an example of how to use these ids in rtnetlink
>> messages. And patch 4/4 shows that the netlink messages can be symetric between
>> a GET and a SET.
>>
>> iproute2 patches are available, I can send them on demand.
>
> A quick reply. I think this patchset is in the right general direction.
> There are some oddball details that seem odd/awkward to me such as using
> genetlink instead of rtnetlink to get and set the ids, and not having
> ids if they are not set (that feels like a maintenance/usability challenge).
No problem to use rtnetlink, in fact, I hesitated.
For the second point, I'm not sure to follow you: how to have an id, which will
not break migration, without asking the user to set it?
Note that if the user does not provide an id, you still have a magic value to
say "it's a peer netns but we don't know which one".
>
> I would like to give your patches a deep review, but I won't be able to
> do that for a couple of weeks. I am deep in the process of moving,
> and will be mostly offline until about the Nov 11th.
No problem, I will wait.
I would be great to get a final version for the 3.19 ;-)
Thank you,
Nicolas
^ permalink raw reply
* Re: [PATCH net-next v4 1/4] netns: add genl cmd to add and get peer netns ids
From: Nicolas Dichtel @ 2014-10-31 9:41 UTC (permalink / raw)
To: Eric W. Biederman
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
luto-kltTT9wpgjJwATOyAt5JVQ, cwang-xCSkyg8dI+0RB7SZvlqPiA
In-Reply-To: <874mulh0cs.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
Le 30/10/2014 19:35, Eric W. Biederman a écrit :
> Nicolas Dichtel <nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> writes:
>
>> With this patch, a user can define an id for a peer netns by providing a FD or a
>> PID. These ids are local to netns (ie valid only into one netns).
>
> Scratches head. Do you actually find value in using the pid instead of
> a file descriptor?
I copied the mechanism from rtnl_link_get_net():
First check if the user provides a PID, if not, check for a FD.
>
> Doing things by pid was an early attempt to make things work, and has
> been a bit clutsy. If you don't find value in it I would recommend just
> supporting getting/setting the network namespace by file descriptor.
Hmm, if I understand well, it's what is done in the patch:
[snip]
>> +static int netns_nl_cmd_newid(struct sk_buff *skb, struct genl_info *info)
>> +{
[snip]
>> + if (info->attrs[NETNSA_PID])
>> + peer = get_net_ns_by_pid(nla_get_u32(info->attrs[NETNSA_PID]));
>> + else if (info->attrs[NETNSA_FD])
>> + peer = get_net_ns_by_fd(nla_get_u32(info->attrs[NETNSA_FD]));
>> + else
>> + return -EINVAL;
>> + if (IS_ERR(peer))
>> + return PTR_ERR(peer);
Am I right?
Regards,
Nicolas
^ permalink raw reply
* Re: [PATCH -next 0/2] net: allow setting ecn via routing table
From: Daniel Borkmann @ 2014-10-31 9:24 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Florian Westphal, David Miller, netdev
In-Reply-To: <1414710342.15352.14.camel@edumazet-glaptop2.roam.corp.google.com>
On 10/31/2014 12:05 AM, Eric Dumazet wrote:
> On Thu, 2014-10-30 at 23:15 +0100, Florian Westphal wrote:
>
>> Do you think a fallback to non-ecn for retransmitted syns would help?
>> If not, do you think having ecn tunable available via route is helpful?
>
> Unfortunately some firewalls are buggy and accept a single SYN per flow.
>
> You would need to blacklist ecn at first sign of a possible ecn problem,
> for all following connections attempts.
>
> Note that ECN problems are not only contained in SYN packets being
> eventually dropped. You might have a success to establish a flow, and
> later get CE marks for all packets and cwnd converges to 1.
Wow, that is buggy! Btw, fwiw, there was a recent study [1] (paper
not public yet) which scanned the Alexa's publicly available top
million websites list from a vantage point in US, Europe and Asia:
Half of the Alexa list will now happily use ECN (tcp_ecn=2, most
likely blamed to commit 255cac91c3c9 ;)), the break in connectivity
on-path was found is about 1 in 10,000 cases. Timeouts rather than
receiving back RSTs were much more common in the negotiation phase
(and mostly seen in the Alexa middle band, ranks around 50k-150k):
from 12-thousand hosts on which there _may_ be ECN-linked connection
failures, only 79 failed with RST when _not_ failing with RST when
ECN is not requested.
It's unclear though, how much equipment actually marks the CE, and
as you mention above, marks it correctly ...
> This is really a lot of work to get all sorted out.
Yep, you are right.
[1] http://ecn.ethz.ch/
^ permalink raw reply
* Re: iwlwifi: mvm: BACKPORT_WANT_DEV_COREDUMP?
From: Paul Bolle @ 2014-10-31 9:17 UTC (permalink / raw)
To: Johannes Berg
Cc: Valentin Rothberg, Emmanuel Grumbach, John W. Linville,
Intel Linux Wireless, linux-wireless, netdev, linux-kernel
In-Reply-To: <1414746518.3014.18.camel@jlt4.sipsolutions.net>
On Fri, 2014-10-31 at 10:08 +0100, Johannes Berg wrote:
> On Fri, 2014-10-31 at 10:06 +0100, Paul Bolle wrote:
> > Perhaps you could also look into somehow guarding the call of
> > dev_coredumpm(), that this commit added, with checks for
> > CONFIG_DEV_COREDUMP. See, I had a quick look at all this and selecting
> > WANT_DEV_COREDUMP might not be enough, because DISABLE_DEV_COREDUMP can
> > still, well, disable DEV_COREDUMP. Or am I misreading the Kconfig
> > symbols that regulate DEV_COREDUMP?
>
> No, you're correctly reading that. However, the devcoredump header file
> provides simple functions in this case. That means there's some extra
> work (allocating and filling the buffer just to free it immediately) but
> it simplifies the code.
I see. More than a quick look was required here. Thanks for explaining
this!
Paul Bolle
^ permalink raw reply
* Re: iwlwifi: mvm: BACKPORT_WANT_DEV_COREDUMP?
From: Johannes Berg @ 2014-10-31 9:08 UTC (permalink / raw)
To: Paul Bolle
Cc: Valentin Rothberg, Emmanuel Grumbach, John W. Linville,
Intel Linux Wireless, linux-wireless, netdev, linux-kernel
In-Reply-To: <1414746397.1964.13.camel@x220>
On Fri, 2014-10-31 at 10:06 +0100, Paul Bolle wrote:
> On Fri, 2014-10-31 at 09:45 +0100, Johannes Berg wrote:
> > On Fri, 2014-10-31 at 09:40 +0100, Paul Bolle wrote:
> > > Your commit aadede6e9f4c ("iwlwifi: mvm: port to devcoredump framework")
> > > landed in today's linux-next (next-20141031). It adds a select statement
> > > for BACKPORT_WANT_DEV_COREDUMP. There's no Kconfig symbol
> > > BACKPORT_WANT_DEV_COREDUMP so this select is currently a nop. (In
> > > https://lkml.org/lkml/2014/9/30/578 I proposed a patch that emits a
> > > warning in cases like this.)
> > >
> > > Did you perhaps meant to select WANT_DEV_COREDUMP?
> >
> > Yes. We'll fix it up in the iwlwifi tree.
> >
> > Thanks for the report!
>
> Perhaps you could also look into somehow guarding the call of
> dev_coredumpm(), that this commit added, with checks for
> CONFIG_DEV_COREDUMP. See, I had a quick look at all this and selecting
> WANT_DEV_COREDUMP might not be enough, because DISABLE_DEV_COREDUMP can
> still, well, disable DEV_COREDUMP. Or am I misreading the Kconfig
> symbols that regulate DEV_COREDUMP?
No, you're correctly reading that. However, the devcoredump header file
provides simple functions in this case. That means there's some extra
work (allocating and filling the buffer just to free it immediately) but
it simplifies the code.
johannes
^ permalink raw reply
* Re: iwlwifi: mvm: BACKPORT_WANT_DEV_COREDUMP?
From: Paul Bolle @ 2014-10-31 9:06 UTC (permalink / raw)
To: Johannes Berg
Cc: Valentin Rothberg, Emmanuel Grumbach, John W. Linville,
Intel Linux Wireless, linux-wireless, netdev, linux-kernel
In-Reply-To: <1414745106.3014.17.camel@jlt4.sipsolutions.net>
On Fri, 2014-10-31 at 09:45 +0100, Johannes Berg wrote:
> On Fri, 2014-10-31 at 09:40 +0100, Paul Bolle wrote:
> > Your commit aadede6e9f4c ("iwlwifi: mvm: port to devcoredump framework")
> > landed in today's linux-next (next-20141031). It adds a select statement
> > for BACKPORT_WANT_DEV_COREDUMP. There's no Kconfig symbol
> > BACKPORT_WANT_DEV_COREDUMP so this select is currently a nop. (In
> > https://lkml.org/lkml/2014/9/30/578 I proposed a patch that emits a
> > warning in cases like this.)
> >
> > Did you perhaps meant to select WANT_DEV_COREDUMP?
>
> Yes. We'll fix it up in the iwlwifi tree.
>
> Thanks for the report!
Perhaps you could also look into somehow guarding the call of
dev_coredumpm(), that this commit added, with checks for
CONFIG_DEV_COREDUMP. See, I had a quick look at all this and selecting
WANT_DEV_COREDUMP might not be enough, because DISABLE_DEV_COREDUMP can
still, well, disable DEV_COREDUMP. Or am I misreading the Kconfig
symbols that regulate DEV_COREDUMP?
Thanks,
Paul Bolle
^ permalink raw reply
* Re: iwlwifi: mvm: BACKPORT_WANT_DEV_COREDUMP?
From: Johannes Berg @ 2014-10-31 8:45 UTC (permalink / raw)
To: Paul Bolle
Cc: Valentin Rothberg, Emmanuel Grumbach, John W. Linville,
Intel Linux Wireless, linux-wireless, netdev, linux-kernel
In-Reply-To: <1414744834.1964.7.camel@x220>
On Fri, 2014-10-31 at 09:40 +0100, Paul Bolle wrote:
> Your commit aadede6e9f4c ("iwlwifi: mvm: port to devcoredump framework")
> landed in today's linux-next (next-20141031). It adds a select statement
> for BACKPORT_WANT_DEV_COREDUMP. There's no Kconfig symbol
> BACKPORT_WANT_DEV_COREDUMP so this select is currently a nop. (In
> https://lkml.org/lkml/2014/9/30/578 I proposed a patch that emits a
> warning in cases like this.)
>
> Did you perhaps meant to select WANT_DEV_COREDUMP?
Yes. We'll fix it up in the iwlwifi tree.
Thanks for the report!
johannes
^ permalink raw reply
* iwlwifi: mvm: BACKPORT_WANT_DEV_COREDUMP?
From: Paul Bolle @ 2014-10-31 8:40 UTC (permalink / raw)
To: Johannes Berg
Cc: Valentin Rothberg, Emmanuel Grumbach, John W. Linville,
Intel Linux Wireless, linux-wireless, netdev, linux-kernel
Your commit aadede6e9f4c ("iwlwifi: mvm: port to devcoredump framework")
landed in today's linux-next (next-20141031). It adds a select statement
for BACKPORT_WANT_DEV_COREDUMP. There's no Kconfig symbol
BACKPORT_WANT_DEV_COREDUMP so this select is currently a nop. (In
https://lkml.org/lkml/2014/9/30/578 I proposed a patch that emits a
warning in cases like this.)
Did you perhaps meant to select WANT_DEV_COREDUMP? Or is the Kconfig
symbol BACKPORT_WANT_DEV_COREDUMP queued somewhere?
Paul Bolle
^ permalink raw reply
* Re: DMA allocations from CMA and fatal_signal_pending check
From: Joonsoo Kim @ 2014-10-31 8:28 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-arm-kernel, Brian Norris, Gregory Fong, linux-kernel,
linux-mm, lauraa, gioh.kim, aneesh.kumar, mina86, m.szyprowski,
akpm, netdev@vger.kernel.org
In-Reply-To: <544FE9BE.6040503@gmail.com>
On Tue, Oct 28, 2014 at 12:08:46PM -0700, Florian Fainelli wrote:
> Hello,
>
> While debugging why some dma_alloc_coherent() allocations where
> returning NULL on our brcmstb platform, specifically with
> drivers/net/ethernet/broadcom/bcmcsysport.c, I came across the
> fatal_signal_pending() check in mm/page_alloc.c which is there.
>
> This driver calls dma_alloc_coherent(, GFP_KERNEL) which ends up making
> a coherent allocation from a CMA region on our platform. Since that
> allocation is allowed to sleep, and because we are in bcm_syport_open(),
> executed from process context, a pending signal makes
> dma_alloc_coherent() return NULL.
Hello, Florian.
fatal_signal_pending means that there is SIGKILL on that process.
I guess that caller of dma_alloc_coherent() will die soon.
In this case, why CMA should be succeed?
>
> There are two ways I could fix this:
>
> - use a GFP_ATOMIC allocation, which would avoid this sensitivity to a
> pending signal being fatal (we suffer from the same issue in
> bcm_sysport_resume)
>
> - move the DMA coherent allocation before bcm_sysport_open(), in the
> driver's probe function, but if the network interface is never used, we
> would be waisting precious DMA coherent memory for nothing (it is only 4
> bytes times 32 but still
I guess that it is okay that bcm_sysport_open() return -EINTR?
Thanks.
^ permalink raw reply
* [PATCH iproute2] tests: Move tc related tests to testsuite/tests/tc folder
From: Vadim Kochan @ 2014-10-31 8:03 UTC (permalink / raw)
To: netdev; +Cc: Vadim Kochan
With this change the results of tc tests will be recorded under:
testsuite/results/tc/
The ip related tests can be added under:
testsuite/tests/ip
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
testsuite/tests/cbq.t | 10 ------
testsuite/tests/cls-testbed.t | 73 ----------------------------------------
testsuite/tests/dsmark.t | 31 -----------------
testsuite/tests/policer.t | 13 -------
testsuite/tests/tc/cbq.t | 10 ++++++
testsuite/tests/tc/cls-testbed.t | 73 ++++++++++++++++++++++++++++++++++++++++
testsuite/tests/tc/dsmark.t | 31 +++++++++++++++++
testsuite/tests/tc/policer.t | 13 +++++++
8 files changed, 127 insertions(+), 127 deletions(-)
delete mode 100755 testsuite/tests/cbq.t
delete mode 100755 testsuite/tests/cls-testbed.t
delete mode 100755 testsuite/tests/dsmark.t
delete mode 100755 testsuite/tests/policer.t
create mode 100755 testsuite/tests/tc/cbq.t
create mode 100755 testsuite/tests/tc/cls-testbed.t
create mode 100755 testsuite/tests/tc/dsmark.t
create mode 100755 testsuite/tests/tc/policer.t
diff --git a/testsuite/tests/cbq.t b/testsuite/tests/cbq.t
deleted file mode 100755
index bff814b..0000000
--- a/testsuite/tests/cbq.t
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-$TC qdisc del dev $DEV root >/dev/null 2>&1
-$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
-$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
-$TC qdisc list dev $DEV
-$TC qdisc del dev $DEV root
-$TC qdisc list dev $DEV
-$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
-$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
-$TC qdisc del dev $DEV root
diff --git a/testsuite/tests/cls-testbed.t b/testsuite/tests/cls-testbed.t
deleted file mode 100755
index 2afc26f..0000000
--- a/testsuite/tests/cls-testbed.t
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-# vim: ft=sh
-
-source lib/generic.sh
-
-QDISCS="cbq htb dsmark"
-
-if [ ! -d tests/cls ]; then
- ts_log "tests/cls folder does not exist"
- ts_skip
-fi
-
-for q in ${QDISCS}; do
- ts_log "Preparing classifier testbed with qdisc $q"
-
- for c in tests/cls/*.c; do
-
- case "$q" in
- cbq)
- ts_tc "cls-testbed" "cbq root qdisc creation" \
- qdisc add dev $DEV root handle 10:0 \
- cbq bandwidth 100Mbit avpkt 1400 mpu 64
- ts_tc "cls-testbed" "cbq root class creation" \
- class add dev $DEV parent 10:0 classid 10:12 \
- cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 \
- maxburst 1 avpkt 500 bounded
- ;;
- htb)
- ts_qdisc_available "htb"
- if [ $? -eq 0 ]; then
- ts_log "cls-testbed: HTB is unsupported by $TC, skipping"
- continue;
- fi
- ts_tc "cls-testbed" "htb root qdisc creation" \
- qdisc add dev $DEV root handle 10:0 htb
- ts_tc "cls-testbed" "htb root class creation" \
- class add dev $DEV parent 10:0 classid 10:12 \
- htb rate 100Mbit quantum 1514
- ;;
- dsmark)
- ts_qdisc_available "dsmark"
- if [ $? -eq 0 ]; then
- ts_log "cls-testbed: dsmark is unsupported by $TC, skipping"
- continue;
- fi
- ts_tc "cls-testbed" "dsmark root qdisc creation" \
- qdisc add dev $DEV root handle 20:0 \
- dsmark indices 64 default_index 1 set_tc_index
- ts_tc "cls-testbed" "dsmark class creation" \
- class change dev $DEV parent 20:0 classid 20:12 \
- dsmark mask 0xff value 2
- ts_tc "cls-testbed" "prio inner qdisc creation" \
- qdisc add dev $DEV parent 20:0 handle 10:0 prio
- ;;
- *)
- ts_err "cls-testbed: no testbed configuration found for qdisc $q"
- continue
- ;;
- esac
-
- ts_tc "cls-testbed" "tree listing" qdisc list dev eth0
- ts_tc "cls-testbed" "tree class listing" class list dev eth0
- ts_log "cls-testbed: starting classifier test $c"
- $c
-
- case "$q" in
- *)
- ts_tc "cls-testbed" "generic qdisc tree deletion" \
- qdisc del dev $DEV root
- ;;
- esac
- done
-done
diff --git a/testsuite/tests/dsmark.t b/testsuite/tests/dsmark.t
deleted file mode 100755
index 6934165..0000000
--- a/testsuite/tests/dsmark.t
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# vim: ft=sh
-
-source lib/generic.sh
-
-ts_qdisc_available "dsmark"
-if [ $? -eq 0 ]; then
- ts_log "dsmark: Unsupported by $TC, skipping"
- exit 127
-fi
-
-ts_tc "dsmark" "dsmark root qdisc creation" \
- qdisc add dev $DEV root handle 10:0 \
- dsmark indices 64 default_index 1 set_tc_index
-
-ts_tc "dsmark" "dsmark class 1 creation" \
- class change dev $DEV parent 10:0 classid 10:12 \
- dsmark mask 0xff value 2
-
-ts_tc "dsmark" "dsmark class 2 creation" \
- class change dev $DEV parent 10:0 classid 10:13 \
- dsmark mask 0xfc value 4
-
-ts_tc "dsmark" "dsmark dump qdisc" \
- qdisc list dev $DEV
-
-ts_tc "dsmark" "dsmark dump class" \
- class list dev $DEV parent 10:0
-
-ts_tc "dsmark" "generic qdisc tree deletion" \
- qdisc del dev $DEV root
diff --git a/testsuite/tests/policer.t b/testsuite/tests/policer.t
deleted file mode 100755
index eaf16ac..0000000
--- a/testsuite/tests/policer.t
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-$TC qdisc del dev $DEV root >/dev/null 2>&1
-$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
-$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
-$TC filter add dev $DEV parent 10:0 protocol ip prio 10 u32 match ip protocol 1 0xff police rate 2kbit buffer 10k drop flowid 10:12
-$TC qdisc list dev $DEV
-$TC filter list dev $DEV parent 10:0
-$TC qdisc del dev $DEV root
-$TC qdisc list dev $DEV
-$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
-$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
-$TC filter add dev $DEV parent 10:0 protocol ip prio 10 u32 match ip protocol 1 0xff police rate 2kbit buffer 10k drop flowid 10:12
-$TC qdisc del dev $DEV root
diff --git a/testsuite/tests/tc/cbq.t b/testsuite/tests/tc/cbq.t
new file mode 100755
index 0000000..bff814b
--- /dev/null
+++ b/testsuite/tests/tc/cbq.t
@@ -0,0 +1,10 @@
+#!/bin/sh
+$TC qdisc del dev $DEV root >/dev/null 2>&1
+$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
+$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
+$TC qdisc list dev $DEV
+$TC qdisc del dev $DEV root
+$TC qdisc list dev $DEV
+$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
+$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
+$TC qdisc del dev $DEV root
diff --git a/testsuite/tests/tc/cls-testbed.t b/testsuite/tests/tc/cls-testbed.t
new file mode 100755
index 0000000..2afc26f
--- /dev/null
+++ b/testsuite/tests/tc/cls-testbed.t
@@ -0,0 +1,73 @@
+#!/bin/bash
+# vim: ft=sh
+
+source lib/generic.sh
+
+QDISCS="cbq htb dsmark"
+
+if [ ! -d tests/cls ]; then
+ ts_log "tests/cls folder does not exist"
+ ts_skip
+fi
+
+for q in ${QDISCS}; do
+ ts_log "Preparing classifier testbed with qdisc $q"
+
+ for c in tests/cls/*.c; do
+
+ case "$q" in
+ cbq)
+ ts_tc "cls-testbed" "cbq root qdisc creation" \
+ qdisc add dev $DEV root handle 10:0 \
+ cbq bandwidth 100Mbit avpkt 1400 mpu 64
+ ts_tc "cls-testbed" "cbq root class creation" \
+ class add dev $DEV parent 10:0 classid 10:12 \
+ cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 \
+ maxburst 1 avpkt 500 bounded
+ ;;
+ htb)
+ ts_qdisc_available "htb"
+ if [ $? -eq 0 ]; then
+ ts_log "cls-testbed: HTB is unsupported by $TC, skipping"
+ continue;
+ fi
+ ts_tc "cls-testbed" "htb root qdisc creation" \
+ qdisc add dev $DEV root handle 10:0 htb
+ ts_tc "cls-testbed" "htb root class creation" \
+ class add dev $DEV parent 10:0 classid 10:12 \
+ htb rate 100Mbit quantum 1514
+ ;;
+ dsmark)
+ ts_qdisc_available "dsmark"
+ if [ $? -eq 0 ]; then
+ ts_log "cls-testbed: dsmark is unsupported by $TC, skipping"
+ continue;
+ fi
+ ts_tc "cls-testbed" "dsmark root qdisc creation" \
+ qdisc add dev $DEV root handle 20:0 \
+ dsmark indices 64 default_index 1 set_tc_index
+ ts_tc "cls-testbed" "dsmark class creation" \
+ class change dev $DEV parent 20:0 classid 20:12 \
+ dsmark mask 0xff value 2
+ ts_tc "cls-testbed" "prio inner qdisc creation" \
+ qdisc add dev $DEV parent 20:0 handle 10:0 prio
+ ;;
+ *)
+ ts_err "cls-testbed: no testbed configuration found for qdisc $q"
+ continue
+ ;;
+ esac
+
+ ts_tc "cls-testbed" "tree listing" qdisc list dev eth0
+ ts_tc "cls-testbed" "tree class listing" class list dev eth0
+ ts_log "cls-testbed: starting classifier test $c"
+ $c
+
+ case "$q" in
+ *)
+ ts_tc "cls-testbed" "generic qdisc tree deletion" \
+ qdisc del dev $DEV root
+ ;;
+ esac
+ done
+done
diff --git a/testsuite/tests/tc/dsmark.t b/testsuite/tests/tc/dsmark.t
new file mode 100755
index 0000000..6934165
--- /dev/null
+++ b/testsuite/tests/tc/dsmark.t
@@ -0,0 +1,31 @@
+#!/bin/bash
+# vim: ft=sh
+
+source lib/generic.sh
+
+ts_qdisc_available "dsmark"
+if [ $? -eq 0 ]; then
+ ts_log "dsmark: Unsupported by $TC, skipping"
+ exit 127
+fi
+
+ts_tc "dsmark" "dsmark root qdisc creation" \
+ qdisc add dev $DEV root handle 10:0 \
+ dsmark indices 64 default_index 1 set_tc_index
+
+ts_tc "dsmark" "dsmark class 1 creation" \
+ class change dev $DEV parent 10:0 classid 10:12 \
+ dsmark mask 0xff value 2
+
+ts_tc "dsmark" "dsmark class 2 creation" \
+ class change dev $DEV parent 10:0 classid 10:13 \
+ dsmark mask 0xfc value 4
+
+ts_tc "dsmark" "dsmark dump qdisc" \
+ qdisc list dev $DEV
+
+ts_tc "dsmark" "dsmark dump class" \
+ class list dev $DEV parent 10:0
+
+ts_tc "dsmark" "generic qdisc tree deletion" \
+ qdisc del dev $DEV root
diff --git a/testsuite/tests/tc/policer.t b/testsuite/tests/tc/policer.t
new file mode 100755
index 0000000..eaf16ac
--- /dev/null
+++ b/testsuite/tests/tc/policer.t
@@ -0,0 +1,13 @@
+#!/bin/sh
+$TC qdisc del dev $DEV root >/dev/null 2>&1
+$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
+$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
+$TC filter add dev $DEV parent 10:0 protocol ip prio 10 u32 match ip protocol 1 0xff police rate 2kbit buffer 10k drop flowid 10:12
+$TC qdisc list dev $DEV
+$TC filter list dev $DEV parent 10:0
+$TC qdisc del dev $DEV root
+$TC qdisc list dev $DEV
+$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
+$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded
+$TC filter add dev $DEV parent 10:0 protocol ip prio 10 u32 match ip protocol 1 0xff police rate 2kbit buffer 10k drop flowid 10:12
+$TC qdisc del dev $DEV root
--
2.1.0
^ permalink raw reply related
* Re: [PATCH net 2/2] mpls: Allow mpls_gso to be built as module
From: Simon Horman @ 2014-10-31 6:49 UTC (permalink / raw)
To: Pravin B Shelar; +Cc: davem, netdev
In-Reply-To: <1414655404-1572-1-git-send-email-pshelar@nicira.com>
On Thu, Oct 30, 2014 at 12:50:04AM -0700, Pravin B Shelar wrote:
> Kconfig already allows mpls to be built as module. Following patch
> fixes Makefile to do same.
Thanks, and sorry for messing that up.
Acked-by: Simon Horman <simon.horman@netronome.com>
> CC: Simon Horman <simon.horman@netronome.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> ---
> net/mpls/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/mpls/Makefile b/net/mpls/Makefile
> index 0a3c171..6dec088 100644
> --- a/net/mpls/Makefile
> +++ b/net/mpls/Makefile
> @@ -1,4 +1,4 @@
> #
> # Makefile for MPLS.
> #
> -obj-y += mpls_gso.o
> +obj-$(CONFIG_NET_MPLS_GSO) += mpls_gso.o
> --
> 1.7.1
>
^ permalink raw reply
* Re: Mistake in commit 0d961b3b52f566f823070ce2366511a7f64b928c breaks cpsw non dual_emac mode.
From: Heiko Schocher @ 2014-10-31 6:49 UTC (permalink / raw)
To: David Miller; +Cc: lsorense, linux-kernel, mugunthanvnm, netdev
In-Reply-To: <20141030.154323.1702996635200338108.davem@davemloft.net>
Hello David, Lennart,
Am 30.10.2014 20:43, schrieb David Miller:
> From: "Lennart Sorensen"<lsorense@csclub.uwaterloo.ca>
> Date: Tue, 28 Oct 2014 13:02:42 -0400
>
>> I believe commit 0d961b3b52f566f823070ce2366511a7f64b928c made a mistake
>> while correcting a bug.
Seems I missed your original patch ... looked in it here:
https://lkml.org/lkml/2014/10/28/837
and I think you are correct, thanks for this fix. You can add my
Acked-by: Heiko Schocher <hs@denx.de>
if you post a corrected v2, as David suggested.
bye,
Heiko
> This patch submission is not properly formed.
>
> You subject line should be of the form:
>
> subsystem: Description.
>
> "subsystem" here would be "cpsw: " or something like that.
>
> Secondly, you should not refer to a commit ID in the patch
> Subject line, instead just describe exactly what is being
> fixed in the most succinct yet complete manner that is
> possible.
>
> Thirdly, when you do refer to commit ID's in your commit
> message body you must do so in the following format:
>
> ${SHA1_ID} ("Commit message header line text.")
>
> The commit message body is also not a place to have a general
> discussion. Please avoid saying things like "I think", for example.
> State facts, and be exact about what the problem is and exactly
> how you are fixing it.
>
> Because this commit message will be read by others looking at your
> change days, weeks, years from now.
>
> Thanks.
>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply
* Re: [PATCH net 1/2] mpls: Fix mpls_gso handler.
From: Simon Horman @ 2014-10-31 6:41 UTC (permalink / raw)
To: Pravin B Shelar; +Cc: davem, netdev
In-Reply-To: <1414655397-1541-1-git-send-email-pshelar@nicira.com>
On Thu, Oct 30, 2014 at 12:49:57AM -0700, Pravin B Shelar wrote:
> mpls gso handler needs to pull skb after segmenting skb.
>
> CC: Simon Horman <simon.horman@netronome.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Apologies for messing that up, your change does seem to match the comment
above it.
So, assuming that this has been tested:
Acked-by: Simon Horman <simon.horman@netronome.com>
> ---
> net/mpls/mpls_gso.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
> index f0f5309..e3545f2 100644
> --- a/net/mpls/mpls_gso.c
> +++ b/net/mpls/mpls_gso.c
> @@ -59,8 +59,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
> * above pulled. It will be re-pushed after returning
> * skb_mac_gso_segment(), an indirect caller of this function.
> */
> - __skb_push(skb, skb->data - skb_mac_header(skb));
> -
> + __skb_pull(skb, skb->data - skb_mac_header(skb));
> out:
> return segs;
> }
> --
> 1.7.1
>
^ permalink raw reply
* Re: [PATCH v2] PPC: bpf_jit_comp: add SKF_AD_PKTTYPE instruction
From: Denis Kirjanov @ 2014-10-31 6:09 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Denis Kirjanov, netdev@vger.kernel.org, linuxppc-dev,
Michael Ellerman, Matt Evans
In-Reply-To: <CAADnVQKvfay7zC-kNGXz7uAjVrhqL80xQ=zvmAsSz4pNhD=9NQ@mail.gmail.com>
On 10/30/14, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> On Wed, Oct 29, 2014 at 11:12 PM, Denis Kirjanov <kda@linux-powerpc.org>
> wrote:
>> Add BPF extension SKF_AD_PKTTYPE to ppc JIT to load
>> skb->pkt_type field.
>>
>> Before:
>> [ 88.262622] test_bpf: #11 LD_IND_NET 86 97 99 PASS
>> [ 88.265740] test_bpf: #12 LD_PKTTYPE 109 107 PASS
>>
>> After:
>> [ 80.605964] test_bpf: #11 LD_IND_NET 44 40 39 PASS
>> [ 80.607370] test_bpf: #12 LD_PKTTYPE 9 9 PASS
>
> if you'd only quoted #12, it would all make sense ;)
> but #11 test is not using PKTTYPE. So your patch shouldn't
> make a difference. Are these numbers with JIT on and off?
Right.
> --
> 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
>
--
Regards,
Denis
^ permalink raw reply
* Re: [PATCH] virtio_net: fix use after free
From: Jason Wang @ 2014-10-31 6:07 UTC (permalink / raw)
To: Eric Dumazet, Michael S. Tsirkin
Cc: netdev, virtualization, linux-kernel, David S. Miller
In-Reply-To: <1414726609.499.6.camel@edumazet-glaptop2.roam.corp.google.com>
On 10/31/2014 11:36 AM, Eric Dumazet wrote:
> On Wed, 2014-10-15 at 16:23 +0300, Michael S. Tsirkin wrote:
>> commit 0b725a2ca61bedc33a2a63d0451d528b268cf975
>> net: Remove ndo_xmit_flush netdev operation, use signalling instead.
>>
>> added code that looks at skb->xmit_more after the skb has
>> been put in TX VQ. Since some paths process the ring and free the skb
>> immediately, this can cause use after free.
>>
>> Fix by storing xmit_more in a local variable.
>>
>> Cc: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>
>> David, am I using the API correctly?
>> Seems to work for me.
>> You used __netif_subqueue_stopped but that seems to use
>> a slightly more expensive test_bit internally.
>> The reason I added a variable for the txq here is because it's handy for
>> BQL patch later on.
>>
>>
>> drivers/net/virtio_net.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>> index 3d0ce44..13d0a8b 100644
>> --- a/drivers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -920,6 +920,8 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
>> int qnum = skb_get_queue_mapping(skb);
>> struct send_queue *sq = &vi->sq[qnum];
>> int err;
>> + struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
>> + bool kick = !skb->xmit_more;
>>
>> /* Free up any pending old buffers before queueing new ones. */
>> free_old_xmit_skbs(sq);
>> @@ -956,7 +958,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
>> }
>> }
>>
>> - if (__netif_subqueue_stopped(dev, qnum) || !skb->xmit_more)
>> + if (kick || netif_xmit_stopped(txq))
>> virtqueue_kick(sq->vq);
>>
>> return NETDEV_TX_OK;
> I must say I am kind of confused by this patch.
>
> Why the skb_orphan(skb) & nf_reset(skb) do not have the same issue ?
>
Since they are called before the possible free_old_xmit_skbs(), skb
won't get freed at this time.
^ permalink raw reply
* [PATCH net-next 2/3] r8152: clear the flag of SCHEDULE_TASKLET in tasklet
From: Hayes Wang @ 2014-10-31 6:03 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
In-Reply-To: <1394712342-15778-75-Taiwan-albertk@realtek.com>
Clear the flag of SCHEDULE_TASKLET in bottom_half() to avoid
re-schedule the tasklet again by workqueue.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/usb/r8152.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index ff54098..670279a 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1798,6 +1798,9 @@ static void bottom_half(unsigned long data)
if (!netif_carrier_ok(tp->netdev))
return;
+ if (test_bit(SCHEDULE_TASKLET, &tp->flags))
+ clear_bit(SCHEDULE_TASKLET, &tp->flags);
+
rx_bottom(tp);
tx_bottom(tp);
}
--
1.9.3
^ permalink raw reply related
* [PATCH net-next 3/3] r8152: check RTL8152_UNPLUG and netif_running before autoresume
From: Hayes Wang @ 2014-10-31 6:03 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
In-Reply-To: <1394712342-15778-75-Taiwan-albertk@realtek.com>
If the device is unplugged or !netif_running(), the workqueue
doesn't neet to wake the device, and could return directly.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/usb/r8152.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 670279a..e522abe 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2859,15 +2859,18 @@ static void rtl_work_func_t(struct work_struct *work)
{
struct r8152 *tp = container_of(work, struct r8152, schedule.work);
+ /* If the device is unplugged or !netif_running(), the workqueue
+ * doesn't neet to wake the device, and could return directly.
+ */
+ if (test_bit(RTL8152_UNPLUG, &tp->flags) || !netif_running(tp->netdev))
+ return;
+
if (usb_autopm_get_interface(tp->intf) < 0)
return;
if (!test_bit(WORK_ENABLE, &tp->flags))
goto out1;
- if (test_bit(RTL8152_UNPLUG, &tp->flags))
- goto out1;
-
if (!mutex_trylock(&tp->control)) {
schedule_delayed_work(&tp->schedule, 0);
goto out1;
--
1.9.3
^ permalink raw reply related
* [PATCH net-next 1/3] r8152: remove the duplicate init for the list of rx_done
From: Hayes Wang @ 2014-10-31 6:03 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
In-Reply-To: <1394712342-15778-75-Taiwan-albertk@realtek.com>
The INIT_LIST_HEAD(&tp->rx_done) would be done in rtl_start_rx(),
so remove the unnecessary one in alloc_all_mem().
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/usb/r8152.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f116335..ff54098 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1256,7 +1256,6 @@ static int alloc_all_mem(struct r8152 *tp)
spin_lock_init(&tp->rx_lock);
spin_lock_init(&tp->tx_lock);
- INIT_LIST_HEAD(&tp->rx_done);
INIT_LIST_HEAD(&tp->tx_free);
skb_queue_head_init(&tp->tx_queue);
--
1.9.3
^ permalink raw reply related
* [PATCH net-next 0/3] Code adjustment
From: Hayes Wang @ 2014-10-31 6:03 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
Adjust some codes to make them more reasonable.
Hayes Wang (3):
r8152: remove the duplicate the init for the list of rx_done
r8152: clear the flag of SCHEDULE_TASKLET in tasklet
r8152: check RTL8152_UNPLUG and netif_running before autoresume
drivers/net/usb/r8152.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--
1.9.3
^ permalink raw reply
* [PATCH net] r8152: stop submitting intr for -EPROTO
From: Hayes Wang @ 2014-10-31 5:35 UTC (permalink / raw)
To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang
For Renesas USB 3.0 host controller, when unplugging the usb hub which
has the RTL8153 plugged, the driver would get -EPROTO for interrupt
transfer. There is high probability to get the information of "HC died;
cleaning up", if the driver continues to submit the interrupt transfer
before the disconnect() is called.
[ 1024.197678] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.213673] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.229668] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.245661] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.261653] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.277648] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.293642] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.309638] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.325633] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.341627] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.357621] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.373615] r8152 9-1.4:1.0 eth0: intr status -71
[ 1024.383097] usb 9-1: USB disconnect, device number 2
[ 1024.383103] usb 9-1.4: USB disconnect, device number 6
[ 1029.391010] xhci_hcd 0000:04:00.0: xHCI host not responding to stop endpoint command.
[ 1029.391016] xhci_hcd 0000:04:00.0: Assuming host is dying, halting host.
[ 1029.392551] xhci_hcd 0000:04:00.0: HC died; cleaning up
[ 1029.421480] usb 8-1: USB disconnect, device number 2
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/usb/r8152.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index ca3c5d5..c6554c7 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1162,6 +1162,9 @@ static void intr_callback(struct urb *urb)
case -ESHUTDOWN:
netif_device_detach(tp->netdev);
case -ENOENT:
+ case -EPROTO:
+ netif_info(tp, intr, tp->netdev,
+ "Stop submitting intr, status %d\n", status);
return;
case -EOVERFLOW:
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
--
1.9.3
^ permalink raw reply related
* Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support
From: Lothar Waßmann @ 2014-10-31 5:32 UTC (permalink / raw)
To: David Miller
Cc: netdev, rmk+kernel, Frank.Li, fabio.estevam, linux-kernel,
linux-arm-kernel
In-Reply-To: <20141030.121710.1524000348187962764.davem@davemloft.net>
Hi,
David Miller wrote:
> From: Lothar Waßmann <LW@KARO-electronics.de>
> Date: Thu, 30 Oct 2014 07:51:04 +0100
>
> >> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop
> >> in swap_buffer() is valid. The whole point is that the current
> >> code handles buffers which have a length which is not a multiple
> >> of 4 properly, after your change it will no longer do so.
> >>
> > Do you really think so?
>
> Yes, because you're rounding down so you'll miss the final
> partial word (if any).
>
Nope. DIV_ROUND_UP() would give '1' as upper bound for lengths from 1 to
4, '2' for lengths from 5 to 8 and so on.
The loop with increment 4 and i < len does exactly the same.
Try it for yourself, if you don't believe it.
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
^ permalink raw reply
* [PATCH net-next] bridge: make proxy arp configurable
From: Stephen Hemminger @ 2014-10-31 3:09 UTC (permalink / raw)
To: Kyeyoon Park, David Miller; +Cc: netdev
This solves kernel build without INET enabled, and allows user
to control building this feature.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
net/bridge/Kconfig | 16 ++++++++++++++++
net/bridge/br_input.c | 4 ++++
net/bridge/br_sysfs_if.c | 4 ++++
3 files changed, 24 insertions(+)
--- a/net/bridge/Kconfig 2014-10-30 18:51:19.242364880 -0700
+++ b/net/bridge/Kconfig 2014-10-30 18:51:21.326379955 -0700
@@ -60,3 +60,19 @@ config BRIDGE_VLAN_FILTERING
Say N to exclude this support and reduce the binary size.
If unsure, say Y.
+
+config BRIDGE_ARP_PROXY
+ bool "ARP proxying"
+ depends on BRIDGE
+ depends on INET
+ default y
+ ---help---
+ If you say Y here, then the Ethernet bridge to keep track of
+ the hardware address to IP address mapping.
+
+ It is most useful when used as a wireless AP.
+
+ Say N to exclude this support and reduce the binary size.
+
+ If unsure, say Y.
+
--- a/net/bridge/br_input.c 2014-10-30 18:51:19.242364880 -0700
+++ b/net/bridge/br_input.c 2014-10-30 19:00:11.050205767 -0700
@@ -59,6 +59,7 @@ static int br_pass_frame_up(struct sk_bu
netif_receive_skb);
}
+#ifdef CONFIG_BRIDGE_PROXY_ARP
static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br,
u16 vid)
{
@@ -112,6 +113,7 @@ static void br_do_proxy_arp(struct sk_bu
neigh_release(n);
}
}
+#endif
/* note: already called with rcu_read_lock */
int br_handle_frame_finish(struct sk_buff *skb)
@@ -154,9 +156,11 @@ int br_handle_frame_finish(struct sk_buf
dst = NULL;
if (is_broadcast_ether_addr(dest)) {
+#ifdef CONFIG_BRIDGE_PROXY_ARP
if (p->flags & BR_PROXYARP &&
skb->protocol == htons(ETH_P_ARP))
br_do_proxy_arp(skb, br, vid);
+#endif
skb2 = skb;
unicast = false;
--- a/net/bridge/br_sysfs_if.c 2014-10-27 20:24:06.376733888 -0700
+++ b/net/bridge/br_sysfs_if.c 2014-10-30 18:58:58.209680384 -0700
@@ -170,7 +170,9 @@ BRPORT_ATTR_FLAG(bpdu_guard, BR_BPDU_GUA
BRPORT_ATTR_FLAG(root_block, BR_ROOT_BLOCK);
BRPORT_ATTR_FLAG(learning, BR_LEARNING);
BRPORT_ATTR_FLAG(unicast_flood, BR_FLOOD);
+#ifdef CONFIG_BRIDGE_PROXY_ARP
BRPORT_ATTR_FLAG(proxyarp, BR_PROXYARP);
+#endif
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
@@ -214,7 +216,9 @@ static const struct brport_attribute *br
&brport_attr_multicast_router,
&brport_attr_multicast_fast_leave,
#endif
+#ifdef CONFIG_BRIDGE_PROXY_ARP
&brport_attr_proxyarp,
+#endif
NULL
};
^ permalink raw reply
* Re: [PATCH] net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0
From: Andrew Lunn @ 2014-10-31 3:56 UTC (permalink / raw)
To: Guenter Roeck; +Cc: netdev, David S. Miller, Andrew Lunn, linux-kernel
In-Reply-To: <1414727415-5470-1-git-send-email-linux@roeck-us.net>
On Thu, Oct 30, 2014 at 08:50:15PM -0700, Guenter Roeck wrote:
> If a driver supports reading EEPROM but no EEPROM is installed in the system,
> the driver's get_eeprom_len function returns 0. ethtool will subsequently
> try to read that zero-length EEPROM anyway. If the driver does not support
> EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
> does support EEPROM access but no EEPROM is installed, the operation will
> return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
root@dir665:~# ethtool -e lan4
Cannot get EEPROM data: Operation not supported
Tested-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
^ 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