* Re: [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Marcel Holtmann @ 2015-01-03 18:02 UTC (permalink / raw)
To: Paul Bolle
Cc: Stanislav Yakovlev, Kalle Valo, Jiri Kosina, Linus Torvalds,
linux-wireless, Network Development, linux-kernel
In-Reply-To: <1420297188.2397.3.camel@tiscali.nl>
Hi Paul,
> This reverts commit dddd60220f41775e634258efd1b54c6fa81ce706.
>
> The raison d'être of commit dddd60220f41 ("ipw2200: select
> CFG80211_WEXT") was reverted in commit 2d36e008739e ("Revert "cfg80211:
> make WEXT compatibility unselectable""). So revert this commit too.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> drivers/net/wireless/ipw2x00/Kconfig | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ipw2x00/Kconfig b/drivers/net/wireless/ipw2x00/Kconfig
> index 21de4fe6cf2d..91c0cb3c368e 100644
> --- a/drivers/net/wireless/ipw2x00/Kconfig
> +++ b/drivers/net/wireless/ipw2x00/Kconfig
> @@ -65,8 +65,7 @@ config IPW2100_DEBUG
>
> config IPW2200
> tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
> - depends on PCI && CFG80211
> - select CFG80211_WEXT
> + depends on PCI && CFG80211 && CFG80211_WEXT
> select WIRELESS_EXT
> select WEXT_SPY
> select WEXT_PRIV
why would you revert this? It is obviously the correct change to actually select CFG80211_WEXT.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH iproute2] man ss: Fix 'Kuznetosv' -> 'Kuznetsov' typo
From: Stephen Hemminger @ 2015-01-03 18:00 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420279669-3491-1-git-send-email-vadim4j@gmail.com>
Thanks, I found two others as well and did the change manually.
^ permalink raw reply
* Re: [PATCH iproute2 3/3] ss: Filtering logic changing, with fixes
From: Stephen Hemminger @ 2015-01-03 17:57 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420245877-11763-4-git-send-email-vadim4j@gmail.com>
On Sat, 3 Jan 2015 02:44:37 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:
> +struct filter default_dbs[MAX_DB] = {
> + [TCP_DB] = {
> + .states = SS_CONN,
> + .families = (1 << AF_INET) | (1 << AF_INET6),
> + },
I like table driven code, so this is good. But please make
mark the table as const.
^ permalink raw reply
* Re: [PATCH iproute2 1/3] ss: Unify unix stats output from netlink and proc
From: Stephen Hemminger @ 2015-01-03 17:56 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420245877-11763-2-git-send-email-vadim4j@gmail.com>
Looks good, but could you fix some minor style things.
On Sat, 3 Jan 2015 02:44:35 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:
>
> -static void unix_list_print(struct unixstat *list, struct filter *f)
> +static int unix_type_skip(struct unixstat *s, struct filter *f)
> +{
Please use bool for logical true/false value in new code.
^ permalink raw reply
* Please Confirm
From: Linda Okoh @ 2015-01-02 23:33 UTC (permalink / raw)
To: Recipients
Is your email still active?
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Rickard Strandqvist @ 2015-01-03 15:41 UTC (permalink / raw)
To: Sedat Dilek
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CA+icZUUfFr2PQjp4ppMNj5UQE3U7-ArmO1LSDoZZf5c1Y85OMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-03 15:51 GMT+01:00 Sedat Dilek <sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> On Sat, Jan 3, 2015 at 3:45 PM, Rickard Strandqvist
> <rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
> [ ... ]
>>> > I just got one more complaining about my subject-line in "net: wireless: "
>>> > I use some sed call for this, so it's easy to fix. I will now remove that
>>> > part hereinafter.
>>> > I check in Documentation/ but did not find any clear info for this.
>>> >
>>>
>>> The easiest way to make (sub)maintainers happy is to check the git-log...
>>>
>>> $ git log --oneline /path/to/file
>>>
>>> ...and look how other contributors labeled their patches.
>>>
>>> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
>>> To promote the good work of Greg, see [2,3] for a video and tutorial
>>> on that topic, too.
>>>
>>> - Sedat -
>>>
>>> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
>>> [2] https://www.youtube.com/watch?v=XXix80GCvpo
>>> [3] https://github.com/gregkh/kernel-tutorial
>>
>>
>>
>> Hi Sedat
>>
>> Thanks for the tip :)
>>
>> To bad with the audio in the video thow. Have read SubmittingPatches before.
>>
>
> AFAICS there is another (earlier) video "Write and Submit your first
> Linux kernel Patch" from FOSDEM 2010.
>
> For German readers I can recommend the book from [2] (no I get no
> money for promotion).
>
> - Sedat -
>
> [1] https://www.youtube.com/watch?v=LLBrBBImJt4
> [2] http://www.opensourcepress.de/de/produkte/Git/33227/978-3-95539-119-5-
>
>>
>> But I have now added a line in my script that does a:
>>
>> git log -10 --oneline
>>
>> So I can at least see the other subjekt lines, and make adjustments if
>> necessary.
>>
>>
>>
>> Kind regards
>> Rickard Strandqvist
Hi
Good video!
Wish I had seen this a year ago.
Sorry, no German for me :)
Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] Drivers: isdn: gigaset: checkpatch cleanup
From: Tilman Schmidt @ 2015-01-03 15:01 UTC (permalink / raw)
To: Bas Peters; +Cc: hjlipp, isdn, gigaset307x-common, netdev, linux-kernel
In-Reply-To: <1420047298-7798-1-git-send-email-baspeters93@gmail.com>
[I only just noticed that my first reply got terribly mangled by my
mailer, so here it is again, hopefully more readable this time.]
Hello Bas,
I have several objections to your patch.
Am 31.12.2014 um 18:34 schrieb Bas Peters:
> I have not been able to test the code as I do not have access to the
> hardware but since no new features were really added I don't think that
> should pose a problem.
It's always problematic to change code you cannot test.
At the very least, if you do coding style cleanups you should test
whether the result still compiles and generates the same code as before.
> --- a/drivers/isdn/gigaset/bas-gigaset.c
> +++ b/drivers/isdn/gigaset/bas-gigaset.c
> @@ -261,11 +261,12 @@ static inline void dump_urb(enum debuglevel level, const char *tag,
> {
> #ifdef CONFIG_GIGASET_DEBUG
> int i;
> +
> gig_dbg(level, "%s urb(0x%08lx)->{", tag, (unsigned long) urb);
> if (urb) {
> gig_dbg(level,
> - " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s, "
> - "hcpriv=0x%08lx, transfer_flags=0x%x,",
> + " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s,
> + hcpriv=0x%08lx, transfer_flags=0x%x,",
This is syntactically wrong and won't compile. You cannot have an
unescaped newline inside a string literal. (Applies to two later
chunks, too.)
> @@ -566,8 +566,8 @@ static int atread_submit(struct cardstate *cs, int timeout)
>
> if (basstate & BS_SUSPEND) {
> dev_notice(cs->dev,
> - "HD_READ_ATMESSAGE not submitted, "
> - "suspend in progress\n");
> + "HD_READ_ATMESSAGE not submitted,\
> + suspend in progress\n");
This makes the message less readable by inserting lots of whitespace
after the comma. (Applies to five later chunks, too.)
> @@ -2312,13 +2312,13 @@ static int gigaset_probe(struct usb_interface *interface,
> /* Reject application specific interfaces
> */
> if (hostif->desc.bInterfaceClass != 255) {
> - dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n",
> + dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n",\
> __func__, hostif->desc.bInterfaceClass);
> return -ENODEV;
> }
>
> dev_info(&udev->dev,
> - "%s: Device matched (Vendor: 0x%x, Product: 0x%x)\n",
> + "%s: Device matched (Vendor: 0x%x, Product: 0x%x)\n",\
> __func__, le16_to_cpu(udev->descriptor.idVendor),
> le16_to_cpu(udev->descriptor.idProduct));
This looks strange, and not like correct coding style. Why would you
want to escape the end of line after a function argument?
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -1370,7 +1373,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
> cmsg->adr.adrPLCI |= (bcs->channel + 1) << 8;
>
> /* build command table */
> - commands = kzalloc(AT_NUM * (sizeof *commands), GFP_KERNEL);
> + commands = kzalloc(AT_NUM * (sizeof(*commands)), GFP_KERNEL);
Extra pair of parentheses around sizeof(*commands) is unnecessary.
(Applies to one later chunk, too.)
> --- a/drivers/isdn/gigaset/common.c
> +++ b/drivers/isdn/gigaset/common.c
> @@ -53,7 +53,7 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg,
> {
> unsigned char outbuf[80];
> unsigned char c;
> - size_t space = sizeof outbuf - 1;
> + size_t space = sizeof(outbuf - 1);
This is wrong. The sizeof operator must be applied to the array
variable outbuf, not to the expression (outbuf - 1).
> --- a/drivers/isdn/gigaset/ev-layer.c
> +++ b/drivers/isdn/gigaset/ev-layer.c
> @@ -1083,7 +1079,7 @@ static void do_action(int action, struct cardstate *cs,
>
> int channel;
>
> - unsigned char *s, *e;
> + unsigned char *s;
> int i;
> unsigned long val;
>
> @@ -1355,8 +1351,20 @@ static void do_action(int action, struct cardstate *cs,
> }
>
> for (i = 0; i < 4; ++i) {
> - val = simple_strtoul(s, (char **) &e, 10);
> - if (val > INT_MAX || e == s)
> + unsigned long *e;
> +
> + val = kstrtoul(s, 10, e);
> + if (val == -EINVAL) {
> + dev_err(cs->dev, "Parsing error on converting string to\
> + unsigned long\n");
> + break;
> + }
> + if (val == -ERANGE) {
> + dev_err(cs->dev, "Overflow error converting string to\
> + unsigned long\n");
> + break;
> + }
> + if (val > INT_MAX || *e == s)
> break;
> if (i == 3) {
> if (*e)
> @@ -1364,7 +1372,7 @@ static void do_action(int action, struct cardstate *cs,
> } else if (*e != '.')
> break;
> else
> - s = e + 1;
> + s = *e + 1;
> cs->fwver[i] = val;
> }
> if (i != 4) {
This cannot work. The pointer variable e gets dereferenced without
ever being initialized. The type mismatches when declaring e as
pointing to an unsigned long but comparing *e to s in one place and to
a character literal in another point make me wonder which semantics
you had in mind for e in the first place.
Also your error messages are not helpful for someone reading the log
and trying to find out what went wrong, and not very readable because
of the big stretch of whitespace you insert between the words "to" and
"unsigned". In fact I'm not even convinced it's a good idea to emit a
log message at all here.
> --- a/drivers/isdn/gigaset/gigaset.h
> +++ b/drivers/isdn/gigaset/gigaset.h
> @@ -94,8 +94,7 @@ enum debuglevel {
> #define gig_dbg(level, format, arg...) \
> do { \
> if (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \
> - printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \
> - ## arg); \
> + dev_dbg(cs->dev, KBUILD_MODNAME ": " format "\n")\
> } while (0)
This will not work when
- there is no cs variable in the context where the macro is used or
- cs->dev doesn't contain a valid device pointer or
- the format string references additional arguments,
all of which actually occur in the driver.
> --- a/drivers/isdn/gigaset/i4l.c
> +++ b/drivers/isdn/gigaset/i4l.c
> @@ -624,14 +624,14 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
> {
> isdn_if *iif;
>
> - iif = kmalloc(sizeof *iif, GFP_KERNEL);
> + iif = kmalloc(sizeof(*iif, GFP_KERNEL));
You're calling kmalloc with too few arguments here.
> if (!iif) {
> pr_err("out of memory\n");
> return -ENOMEM;
> }
>
> - if (snprintf(iif->id, sizeof iif->id, "%s_%u", isdnid, cs->minor_index)
> - >= sizeof iif->id) {
> + if (snprintf(iif->id, sizeof(iif->id, "%s_%u", isdnid, cs->minor_index))
> + >= sizeof(iif->id)) {
You're calling snprintf with too few arguments here.
> --- a/drivers/isdn/gigaset/proc.c
> +++ b/drivers/isdn/gigaset/proc.c
> @@ -27,13 +27,18 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
> const char *buf, size_t count)
> {
> struct cardstate *cs = dev_get_drvdata(dev);
> - long int value;
> - char *end;
> + long int *value;
> + int result;
>
> - value = simple_strtol(buf, &end, 0);
> - while (*end)
> - if (!isspace(*end++))
> - return -EINVAL;
> + result = kstrtol(buf, 0, &value);
> + if (result == -ERANGE)
> + /* Overflow error */
> + dev_err(cs->dev, "Overflow error on conversion from string to\
> + long\n");
> + if (result == -EINVAL)
> + /* Parsing error */
> + dev_err(cs->dev, "Parsing error on conversion from string to\
> + long\n");
> if (value < 0 || value > 1)
> return -EINVAL;
>
This changes semantics. Your code will not accept the same input as
the original code, and it will emit messages of its own instead of
just returning an error code to the caller as it should.
In sum: NACK.
Regards,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
^ permalink raw reply
* [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Paul Bolle @ 2015-01-03 14:59 UTC (permalink / raw)
To: Stanislav Yakovlev, Kalle Valo
Cc: Jiri Kosina, Linus Torvalds, linux-wireless, netdev, linux-kernel
This reverts commit dddd60220f41775e634258efd1b54c6fa81ce706.
The raison d'être of commit dddd60220f41 ("ipw2200: select
CFG80211_WEXT") was reverted in commit 2d36e008739e ("Revert "cfg80211:
make WEXT compatibility unselectable""). So revert this commit too.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
drivers/net/wireless/ipw2x00/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ipw2x00/Kconfig b/drivers/net/wireless/ipw2x00/Kconfig
index 21de4fe6cf2d..91c0cb3c368e 100644
--- a/drivers/net/wireless/ipw2x00/Kconfig
+++ b/drivers/net/wireless/ipw2x00/Kconfig
@@ -65,8 +65,7 @@ config IPW2100_DEBUG
config IPW2200
tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
- depends on PCI && CFG80211
- select CFG80211_WEXT
+ depends on PCI && CFG80211 && CFG80211_WEXT
select WIRELESS_EXT
select WEXT_SPY
select WEXT_PRIV
--
2.1.0
^ permalink raw reply related
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Sedat Dilek @ 2015-01-03 14:51 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CAKXHbyPm+2gy3E_FAVY82ggvJhWe-E_xtrhgeAPxUyRS-FutaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, Jan 3, 2015 at 3:45 PM, Rickard Strandqvist
<rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
[ ... ]
>> > I just got one more complaining about my subject-line in "net: wireless: "
>> > I use some sed call for this, so it's easy to fix. I will now remove that
>> > part hereinafter.
>> > I check in Documentation/ but did not find any clear info for this.
>> >
>>
>> The easiest way to make (sub)maintainers happy is to check the git-log...
>>
>> $ git log --oneline /path/to/file
>>
>> ...and look how other contributors labeled their patches.
>>
>> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
>> To promote the good work of Greg, see [2,3] for a video and tutorial
>> on that topic, too.
>>
>> - Sedat -
>>
>> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
>> [2] https://www.youtube.com/watch?v=XXix80GCvpo
>> [3] https://github.com/gregkh/kernel-tutorial
>
>
>
> Hi Sedat
>
> Thanks for the tip :)
>
> To bad with the audio in the video thow. Have read SubmittingPatches before.
>
AFAICS there is another (earlier) video "Write and Submit your first
Linux kernel Patch" from FOSDEM 2010.
For German readers I can recommend the book from [2] (no I get no
money for promotion).
- Sedat -
[1] https://www.youtube.com/watch?v=LLBrBBImJt4
[2] http://www.opensourcepress.de/de/produkte/Git/33227/978-3-95539-119-5-
>
> But I have now added a line in my script that does a:
>
> git log -10 --oneline
>
> So I can at least see the other subjekt lines, and make adjustments if
> necessary.
>
>
>
> Kind regards
> Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Rickard Strandqvist @ 2015-01-03 14:45 UTC (permalink / raw)
To: Sedat Dilek
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CA+icZUUJfemKC85=p7Huyw7xwfUdXBhePseJCnUKLx9edgpT4w@mail.gmail.com>
2015-01-03 14:19 GMT+01:00 Sedat Dilek <sedat.dilek@gmail.com>:
>
> On Sat, Jan 3, 2015 at 1:28 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
> > 2015-01-02 22:34 GMT+01:00 Rafał Miłecki <zajec5@gmail.com>:
> >>
> >> On 2 January 2015 at 18:46, Rickard Strandqvist
> >> <rickard_strandqvist@spectrumdigital.se> wrote:
> >> > 2015-01-02 13:14 GMT+01:00 Sedat Dilek <sedat.dilek@gmail.com>:
> >> >>
> >> >> On Fri, Jan 2, 2015 at 1:06 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> >> >> > On 2 January 2015 at 13:05, Rafał Miłecki <zajec5@gmail.com> wrote:
> >> >> >> On 1 January 2015 at 16:46, Rickard Strandqvist
> >> >> >> <rickard_strandqvist@spectrumdigital.se> wrote:
> >> >> >>> Remove the function b43legacy_radio_set_tx_iq() that is not used
> >> >> >>> anywhere.
> >> >> >>>
> >> >> >>> This was partially found by using a static code analysis program
> >> >> >>> called cppcheck.
> >> >> >>
> >> >> >> It seems to be for A-PHY based hardware (with 0x2060 radio id) which
> >> >> >> is not handled by b43legacy. Should be safe to drop this code (we
> >> >> >> won't likely need it).
> >> >> >>
> >> >> >> Ack
> >> >> >
> >> >> > For future, we prefix patches with just a driver name. So this could
> >> >> > be simply called
> >> >> > b43legacy: radio.c: Remove unused function
> >> >> >
> >> >>
> >> >> Alternatively...
> >> >>
> >> >> "b43legacy: Remove unused function in radio.c"
> >> >>
> >> >> BTW, as Arnd Bergmann pointed out [1] how did you test with cppcheck
> >> >> to get such stuff?
> >> >>
> >> >> - Sedat -
> >> >>
> >> >> [1] https://lkml.org/lkml/2015/1/2/51
> >> >
> >> >
> >> >
> >> > Hi Rafal and Sedat
> >> >
> >> > Rafal do you mean I should remove the entire b43legacy part?
> >>
> >> 1) I gave you Ack for the changes
> >> 2) You could drop "net: wireless: " or better use something Sedat proposed
> >>
> >> --
> >> Rafał
> >
> >
> >
> > Hi
> >
> > Nice, yes I miss the Ack :)
> >
> > I just got one more complaining about my subject-line in "net: wireless: "
> > I use some sed call for this, so it's easy to fix. I will now remove that
> > part hereinafter.
> > I check in Documentation/ but did not find any clear info for this.
> >
>
> The easiest way to make (sub)maintainers happy is to check the git-log...
>
> $ git log --oneline /path/to/file
>
> ...and look how other contributors labeled their patches.
>
> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
> To promote the good work of Greg, see [2,3] for a video and tutorial
> on that topic, too.
>
> - Sedat -
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
> [2] https://www.youtube.com/watch?v=XXix80GCvpo
> [3] https://github.com/gregkh/kernel-tutorial
Hi Sedat
Thanks for the tip :)
To bad with the audio in the video thow. Have read SubmittingPatches before.
But I have now added a line in my script that does a:
git log -10 --oneline
So I can at least see the other subjekt lines, and make adjustments if
necessary.
Kind regards
Rickard Strandqvist
^ permalink raw reply
* Re: [PATCH] can: kvaser_usb: Don't free packets when tight on URBs
From: Ahmed S. Darwish @ 2015-01-03 14:34 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Olivier Sobrie, Oliver Hartkopp, Wolfgang Grandegger,
Marc Kleine-Budde, David S. Miller, Paul Gortmaker, Linux-CAN,
netdev, LKML
In-Reply-To: <20150101135913.6205ce0e@urahara>
On Thu, Jan 01, 2015 at 01:59:13PM -0800, Stephen Hemminger wrote:
> On Tue, 23 Dec 2014 17:46:54 +0200
> "Ahmed S. Darwish" <darwish.07@gmail.com> wrote:
>
> > int ret = NETDEV_TX_OK;
> > + bool kfree_skb_on_error = true;
> >
> > if (can_dropped_invalid_skb(netdev, skb))
> > return NETDEV_TX_OK;
> > @@ -1336,6 +1337,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
> >
> > if (!context) {
> > netdev_warn(netdev, "cannot find free context\n");
> > + kfree_skb_on_error = false;
> > ret = NETDEV_TX_BUSY;
>
> You already have a flag value (ret == NETDEV_TX_BUSY), why
> not use that instead of introducing another variable?
Yes, that variable got implicitly removed in v2 patch 1/4.
Thanks,
--
Darwish
^ permalink raw reply
* [PATCH net-next] enic: reconfigure resources for kdump crash kernel
From: Govindarajulu Varadarajan @ 2015-01-03 14:05 UTC (permalink / raw)
To: davem, netdev; +Cc: ssujith, benve, Govindarajulu Varadarajan
When running in kdump kernel, reduce number of resources used by the driver.
This will enable NIC to operate in low memory kdump kernel environment.
Also change the driver version to .83
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/cisco/enic/enic.h | 2 +-
drivers/net/ethernet/cisco/enic/enic_main.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h
index d2a1035..84b6a2b 100644
--- a/drivers/net/ethernet/cisco/enic/enic.h
+++ b/drivers/net/ethernet/cisco/enic/enic.h
@@ -33,7 +33,7 @@
#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION "2.1.1.67"
+#define DRV_VERSION "2.1.1.83"
#define DRV_COPYRIGHT "Copyright 2008-2013 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 142c9b5..9027fc1 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -45,6 +45,7 @@
#ifdef CONFIG_NET_RX_BUSY_POLL
#include <net/busy_poll.h>
#endif
+#include <linux/crash_dump.h>
#include "cq_enet_desc.h"
#include "vnic_dev.h"
@@ -2265,6 +2266,18 @@ static void enic_dev_deinit(struct enic *enic)
enic_clear_intr_mode(enic);
}
+static void enic_kdump_kernel_config(struct enic *enic)
+{
+ if (is_kdump_kernel()) {
+ dev_info(enic_get_dev(enic), "Running from within kdump kernel. Using minimal resources\n");
+ enic->rq_count = 1;
+ enic->wq_count = 1;
+ enic->config.rq_desc_count = ENIC_MIN_RQ_DESCS;
+ enic->config.wq_desc_count = ENIC_MIN_WQ_DESCS;
+ enic->config.mtu = min_t(u16, 1500, enic->config.mtu);
+ }
+}
+
static int enic_dev_init(struct enic *enic)
{
struct device *dev = enic_get_dev(enic);
@@ -2294,6 +2307,10 @@ static int enic_dev_init(struct enic *enic)
enic_get_res_counts(enic);
+ /* modify resource count if we are in kdump_kernel
+ */
+ enic_kdump_kernel_config(enic);
+
/* Set interrupt mode based on resource counts and system
* capabilities
*/
--
2.2.1
^ permalink raw reply related
* [PATCH 1/1 linux-next] hp100: simplify hp100_module_init
From: Fabian Frederick @ 2015-01-03 13:44 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Jaroslav Kysela, netdev
-Avoid double goto and directly return err where possible.
-Remove unused labels which fixes:
drivers/net/ethernet/hp/hp100.c:3047:2: warning: label
'out3' defined but not used [-Wunused-label]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
This is untested.
drivers/net/ethernet/hp/hp100.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index ae6e30d..7155938 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -3031,26 +3031,25 @@ static int __init hp100_module_init(void)
err = hp100_isa_init();
if (err && err != -ENODEV)
- goto out;
+ return err;
#ifdef CONFIG_EISA
err = eisa_driver_register(&hp100_eisa_driver);
if (err && err != -ENODEV)
- goto out2;
+ goto out_eisa;
+ else
+ return err;
#endif
#ifdef CONFIG_PCI
err = pci_register_driver(&hp100_pci_driver);
- if (err && err != -ENODEV)
- goto out3;
+ if (!err || err == -ENODEV)
+ return err;
#endif
- out:
- return err;
- out3:
#ifdef CONFIG_EISA
eisa_driver_unregister (&hp100_eisa_driver);
- out2:
+ out_eisa:
#endif
hp100_isa_cleanup();
- goto out;
+ return err;
}
--
2.1.0
^ permalink raw reply related
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Sedat Dilek @ 2015-01-03 13:19 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CAKXHbyMqTk=k7eieBNtAD+n6+4w3weL82twHBo-o8ebm_3+wvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, Jan 3, 2015 at 1:28 PM, Rickard Strandqvist
<rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
> 2015-01-02 22:34 GMT+01:00 Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>>
>> On 2 January 2015 at 18:46, Rickard Strandqvist
>> <rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
>> > 2015-01-02 13:14 GMT+01:00 Sedat Dilek <sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>> >>
>> >> On Fri, Jan 2, 2015 at 1:06 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>> >> > On 2 January 2015 at 13:05, Rafał Miłecki <zajec5@gmail.com> wrote:
>> >> >> On 1 January 2015 at 16:46, Rickard Strandqvist
>> >> >> <rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
>> >> >>> Remove the function b43legacy_radio_set_tx_iq() that is not used
>> >> >>> anywhere.
>> >> >>>
>> >> >>> This was partially found by using a static code analysis program
>> >> >>> called cppcheck.
>> >> >>
>> >> >> It seems to be for A-PHY based hardware (with 0x2060 radio id) which
>> >> >> is not handled by b43legacy. Should be safe to drop this code (we
>> >> >> won't likely need it).
>> >> >>
>> >> >> Ack
>> >> >
>> >> > For future, we prefix patches with just a driver name. So this could
>> >> > be simply called
>> >> > b43legacy: radio.c: Remove unused function
>> >> >
>> >>
>> >> Alternatively...
>> >>
>> >> "b43legacy: Remove unused function in radio.c"
>> >>
>> >> BTW, as Arnd Bergmann pointed out [1] how did you test with cppcheck
>> >> to get such stuff?
>> >>
>> >> - Sedat -
>> >>
>> >> [1] https://lkml.org/lkml/2015/1/2/51
>> >
>> >
>> >
>> > Hi Rafal and Sedat
>> >
>> > Rafal do you mean I should remove the entire b43legacy part?
>>
>> 1) I gave you Ack for the changes
>> 2) You could drop "net: wireless: " or better use something Sedat proposed
>>
>> --
>> Rafał
>
>
>
> Hi
>
> Nice, yes I miss the Ack :)
>
> I just got one more complaining about my subject-line in "net: wireless: "
> I use some sed call for this, so it's easy to fix. I will now remove that
> part hereinafter.
> I check in Documentation/ but did not find any clear info for this.
>
The easiest way to make (sub)maintainers happy is to check the git-log...
$ git log --oneline /path/to/file
...and look how other contributors labeled their patches.
[1] is the 1st address to look at on how to submit patches to Linux-kernel.
To promote the good work of Greg, see [2,3] for a video and tutorial
on that topic, too.
- Sedat -
[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
[2] https://www.youtube.com/watch?v=XXix80GCvpo
[3] https://github.com/gregkh/kernel-tutorial
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Reply ASAP!!!
From: sallie suyin @ 2015-01-03 11:46 UTC (permalink / raw)
we need to talk!!!
^ permalink raw reply
* [PATCH 2/2 net-next] netfilter: remove 0 assignment on static
From: Fabian Frederick @ 2015-01-03 11:42 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, Stephen Hemminger, David S. Miller, bridge,
netdev
static values are automatically initialized to 0
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
net/bridge/br_netfilter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 37e7d9a..26d73fa 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -53,9 +53,9 @@ static struct ctl_table_header *brnf_sysctl_header;
static int brnf_call_iptables __read_mostly = 1;
static int brnf_call_ip6tables __read_mostly = 1;
static int brnf_call_arptables __read_mostly = 1;
-static int brnf_filter_vlan_tagged __read_mostly = 0;
-static int brnf_filter_pppoe_tagged __read_mostly = 0;
-static int brnf_pass_vlan_indev __read_mostly = 0;
+static int brnf_filter_vlan_tagged __read_mostly;
+static int brnf_filter_pppoe_tagged __read_mostly;
+static int brnf_pass_vlan_indev __read_mostly;
#else
#define brnf_call_iptables 1
#define brnf_call_ip6tables 1
--
2.1.0
^ permalink raw reply related
* [PATCH 1/2 net-next] netfilter: remove err1 label only used with CONFIG_SYSCTL
From: Fabian Frederick @ 2015-01-03 11:42 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, Stephen Hemminger, David S. Miller, bridge,
netdev
This patch fixes the following warning:
net/bridge/br_netfilter.c:995:1: warning: label ‘err1’ defined but not used [-Wunused-label]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
net/bridge/br_netfilter.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index c190d22..37e7d9a 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -987,15 +987,12 @@ static int __init br_netfilter_init(void)
if (brnf_sysctl_header == NULL) {
printk(KERN_WARNING
"br_netfilter: can't register to sysctl.\n");
- ret = -ENOMEM;
- goto err1;
+ nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
+ return -ENOMEM;
}
#endif
printk(KERN_NOTICE "Bridge firewalling registered\n");
return 0;
-err1:
- nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
- return ret;
}
static void __exit br_netfilter_fini(void)
--
2.1.0
^ permalink raw reply related
* [PATCH iproute2] man ss: Fix 'Kuznetosv' -> 'Kuznetsov' typo
From: Vadim Kochan @ 2015-01-03 10:07 UTC (permalink / raw)
To: netdev; +Cc: Vadim Kochan
From: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
man/man8/ss.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index f4b709b..450649a 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -190,7 +190,7 @@ List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7
.SH AUTHOR
.I ss
-was written by Alexey Kuznetosv, <kuznet@ms2.inr.ac.ru>.
+was written by Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>.
.PP
This manual page was written by Michael Prokop <mika@grml.org>
for the Debian project (but may be used by others).
--
2.1.3
^ permalink raw reply related
* Re: [PATCH net-next v2 2/2] bridge: modify bridge af spec parser to accomodate vlan list and ranges
From: roopa @ 2015-01-03 8:39 UTC (permalink / raw)
To: Scott Feldman
Cc: Arad, Ronen, netdev@vger.kernel.org, hemminger@vyatta.com,
vyasevic@redhat.com, wkok@cumulusnetworks.com
In-Reply-To: <CAE4R7bCGC+hC1nR9YxbFB9+-cWvtkxmt1cs57kD-PpKnWk3RmQ@mail.gmail.com>
On 1/1/15, 11:34 AM, Scott Feldman wrote:
> On Thu, Jan 1, 2015 at 12:54 AM, Arad, Ronen <ronen.arad@intel.com> wrote:
>>
>>> -----Original Message-----
>>> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
>>> Behalf Of roopa@cumulusnetworks.com
>>> Sent: Wednesday, December 31, 2014 6:49 PM
>>> To: netdev@vger.kernel.org; hemminger@vyatta.com; vyasevic@redhat.com
>>> Cc: sfeldma@gmail.com; wkok@cumulusnetworks.com; Roopa Prabhu
>>> Subject: [PATCH net-next v2 2/2] bridge: modify bridge af spec parser to
>>> accomodate vlan list and ranges
>>>
>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>
>>> This patch modifies br_afspec to parse incoming IFLA_BRIDGE_VLAN_INFO_LIST
>>>
>>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>>> ---
>>> net/bridge/br_netlink.c | 115 ++++++++++++++++++++++++++++++++++------------
>>> -
>>> 1 file changed, 85 insertions(+), 30 deletions(-)
>>>
>>> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
>>> index 492ef6a..bcba9d2 100644
>>> --- a/net/bridge/br_netlink.c
>>> +++ b/net/bridge/br_netlink.c
>>> @@ -226,53 +226,108 @@ static const struct nla_policy
>>> ifla_br_policy[IFLA_MAX+1] = {
>>> [IFLA_BRIDGE_VLAN_INFO_LIST] = { .type = NLA_NESTED, },
>>> };
>>>
>>> +static int br_vlan_info(struct net_bridge *br, struct net_bridge_port *p,
>>> + int cmd, struct bridge_vlan_info *vinfo)
>>> +{
>>> + int err = 0;
>>> +
>>> + switch (cmd) {
>>> + case RTM_SETLINK:
>>> + if (p) {
>>> + err = nbp_vlan_add(p, vinfo->vid, vinfo->flags);
>>> + if (err)
>>> + break;
>>> +
>>> + if (vinfo->flags & BRIDGE_VLAN_INFO_MASTER)
>>> + err = br_vlan_add(p->br, vinfo->vid,
>>> + vinfo->flags);
>>> + } else {
>>> + err = br_vlan_add(br, vinfo->vid, vinfo->flags);
>>> + }
>>> + break;
>>> +
>>> + case RTM_DELLINK:
>>> + if (p) {
>>> + nbp_vlan_delete(p, vinfo->vid);
>>> + if (vinfo->flags & BRIDGE_VLAN_INFO_MASTER)
>>> + br_vlan_delete(p->br, vinfo->vid);
>>> + } else {
>>> + br_vlan_delete(br, vinfo->vid);
>>> + }
>>> + break;
>>> + }
>>> +
>>> + return err;
>>> +}
>>> +
>>> static int br_afspec(struct net_bridge *br,
>>> struct net_bridge_port *p,
>>> struct nlattr *af_spec,
>>> int cmd)
>>> {
>>> struct nlattr *tb[IFLA_BRIDGE_MAX+1];
>>> + struct nlattr *attr;
>>> int err = 0;
>>> + int rem;
>>>
>>> err = nla_parse_nested(tb, IFLA_BRIDGE_MAX, af_spec, ifla_br_policy);
>>> if (err)
>>> return err;
>>>
>>> if (tb[IFLA_BRIDGE_VLAN_INFO]) {
>>> - struct bridge_vlan_info *vinfo;
>>> -
>>> - vinfo = nla_data(tb[IFLA_BRIDGE_VLAN_INFO]);
>>> -
>>> - if (!vinfo->vid || vinfo->vid >= VLAN_VID_MASK)
>>> - return -EINVAL;
>>> -
>>> - switch (cmd) {
>>> - case RTM_SETLINK:
>>> - if (p) {
>>> - err = nbp_vlan_add(p, vinfo->vid, vinfo->flags);
>>> - if (err)
>>> - break;
>>> -
>>> - if (vinfo->flags & BRIDGE_VLAN_INFO_MASTER)
>>> - err = br_vlan_add(p->br, vinfo->vid,
>>> - vinfo->flags);
>>> - } else
>>> - err = br_vlan_add(br, vinfo->vid, vinfo->flags);
>>> -
>>> - break;
>>> -
>>> - case RTM_DELLINK:
>>> - if (p) {
>>> - nbp_vlan_delete(p, vinfo->vid);
>>> - if (vinfo->flags & BRIDGE_VLAN_INFO_MASTER)
>>> - br_vlan_delete(p->br, vinfo->vid);
>>> - } else
>>> - br_vlan_delete(br, vinfo->vid);
>>> - break;
>>> + attr = tb[IFLA_BRIDGE_VLAN_INFO];
>>> + if (nla_len(attr) != sizeof(struct bridge_vlan_info))
>>> + goto err_inval;
>>> +
>>> + err = br_vlan_info(br, p, cmd,
>>> + (struct bridge_vlan_info *)nla_data(attr));
>>> +
>>> + } else if (tb[IFLA_BRIDGE_VLAN_INFO_LIST]) {
>>> + struct bridge_vlan_info *vinfo_start = NULL;
>>> + struct bridge_vlan_info *vinfo = NULL;
>>> +
>>> + nla_for_each_nested(attr, tb[IFLA_BRIDGE_VLAN_INFO_LIST], rem) {
>>> + if (nla_len(attr) != sizeof(struct bridge_vlan_info) ||
>>> + nla_type(attr) != IFLA_BRIDGE_VLAN_INFO)
>>> + goto err_inval;
>>> + vinfo = nla_data(attr);
>>> + if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_START) {
>>> + if (vinfo_start)
>>> + goto err_inval;
>>> + vinfo_start = vinfo;
>>> + continue;
>>> + }
>>> +
>>> + if (vinfo_start) {
>>> + int v;
>>> +
>>> + if (!(vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END))
>>> + goto err_inval;
>>> +
>>> + if (vinfo->vid < vinfo_start->vid)
>> This check rejects inverted range. However it allows the RANGE_START and
>> RANGE_END vinfos to have the same vid. Isn't it inconsistent with the rejection
>> of a single vinfo with both RANGE_START and RANGE_END set?
> Allowing both START and END to be set on single vinfo might simplify
> the encoding of LIST, so maybe it should be allowed.
sorry, i did not understand this. How does it help ?.
>
> Roopa, I know you dropped the subsequent notification patches from the
> set, but I suspect now with these new START/END markers, the
> notification algorithm can be very close to the original loop, without
> having to make copies of the vlan_bitmap and untagged_bitmap.
> Using
> both START/END on a single vinfo will keep the loop simple for adding
> single vids that are not in a range.
The way i am seeing it is, both, making copies of vlan_bitmap and using
the existing loop can be used
with both old and the new proposed netlink attributes (unless i am
missing something).
Our original in-house code used copies of vlan bitmap (not authored by
me) and it was well tested,
so it was safer to post that code in terms of testing effort.
But during the course of this review, i do realize that the existing
loop can be used. And now i see that the existing loop
can be used with both the old proposed and the new netlink formats. I
have coded up the patches. In the process of testing it. Will post the
new series soon. Maybe you will spot something.
>
> (hmmm...START/STOP or BEGIN/END? Seems START/END is mixing the two
> concepts...BEGIN/END seems best)
Sure, no preference there. I will use BEGIN/END.
Thanks,
Roopa
^ permalink raw reply
* Re: [PATCH] net: wireless: rtlwifi: btcoexist: halbtc8821a2ant: Remove some unused functions
From: Larry Finger @ 2015-01-03 6:05 UTC (permalink / raw)
To: Rickard Strandqvist, Chaoming Li
Cc: Kalle Valo, Greg Kroah-Hartman, Fengguang Wu, linux-wireless,
netdev, linux-kernel
In-Reply-To: <1420230361-1862-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On 01/02/2015 02:26 PM, Rickard Strandqvist wrote:
> Removes some functions that are not used anywhere:
> ex_halbtc8821a2ant_periodical() ex_halbtc8821a2ant_halt_notify()
> ex_halbtc8821a2ant_bt_info_notify()
> ex_halbtc8821a2ant_special_packet_notify()
> ex_halbtc8821a2ant_connect_notify() ex_halbtc8821a2ant_scan_notify()
> ex_halbtc8821a2ant_lps_notify() ex_halbtc8821a2ant_ips_notify()
> ex_halbtc8821a2ant_display_coex_info() ex_halbtc8821a2ant_init_coex_dm()
> ex_halbtc8821a2ant_init_hwconfig()
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
I know that you have been told that including "net: wireless:" in the subject
line is discouraged. Please do not do this again. The staging directory is
different as GregKH uses "staging:" in the subject to route patches, but
wireless does not.
As to the patch, NACK for the simple reason that I am currently working on a
number of changes to btcoexist. Some of these routines may end up being removed,
but others will not. Having your patch remove them, and one of mine adding them
back just constitutes a lot of churning of the source. In addition, it greatly
increases the probability of the source trees becoming unsynchronized and
getting merge conflicts.
Larry
^ permalink raw reply
* Re: [PATCH] staging: r8188eu: Fix memory leak in firmware loading
From: Larry Finger @ 2015-01-03 5:57 UTC (permalink / raw)
To: gregkh; +Cc: devel, netdev
In-Reply-To: <1420222628-4955-1-git-send-email-Larry.Finger@lwfinger.net>
On 01/02/2015 12:17 PM, Larry Finger wrote:
> The driver allocates memory to store the firmware image; however, that
> memory is never released. The kmemleak facility was used to find this
> error.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/staging/rtl8188eu/hal/fw.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
> index 3b28754..a5b7fc4 100644
> --- a/drivers/staging/rtl8188eu/hal/fw.c
> +++ b/drivers/staging/rtl8188eu/hal/fw.c
> @@ -231,6 +231,7 @@ int rtl88eu_download_fw(struct adapter *adapt)
> _rtl88e_enable_fw_download(adapt, false);
>
> err = _rtl88e_fw_free_to_go(adapt);
> + kfree(pfwdata);
>
> return err;
> }
Greg,
Please drop this patch. Unfortunately, further testing showed that the kfree()
call is in the wrong place. I will send V2 shortly.
Thanks,
Larry
^ permalink raw reply
* Re: [PATCH 3/4] net: ethernet: cpsw: split out IRQ handler
From: Felipe Balbi @ 2015-01-03 3:02 UTC (permalink / raw)
To: Dave Taht; +Cc: Felipe Balbi, netdev@vger.kernel.org, Linux OMAP Mailing List
In-Reply-To: <CAA93jw4BckMYOz_fUMVkW8m1YVO8uGjsb1srrhiF-meDoiD1WA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]
Hi,
On Fri, Jan 02, 2015 at 02:56:36PM -0800, Dave Taht wrote:
> On Fri, Jan 2, 2015 at 11:03 AM, Felipe Balbi <balbi@ti.com> wrote:
> > Hi,
> >
> > (please use reply-all to keep mailing lists in Cc, also avoid
> > top-posting)
>
> I am trying not to read netdev right now... and failing, obviously.
oops :-)
> > On Fri, Jan 02, 2015 at 10:58:29AM -0800, Dave Taht wrote:
> >> The beaglebone only has a 100mbit phy, so you aren't going to get more
> >> than that.
> >
> > very true :-) Still, with AM437x SK which is definitely GigE, I'm
> > getting 201Mbits/sec.
> >
> >> (so do a lot of IoT devices).
> >>
> >> So you have the two patches that went by on BQL and on NAPI for the beagle?
> >
> > no, got any pointers ?
>
> the relevant thread was "am335x: cpsw: phy ignores max-speed setting"
>
> and the initial very small BQL enablement patch was here:
>
> https://patchwork.ozlabs.org/patch/407640/
I'll test it out, sure.
> (it needed a saner treatment of a failure to dma something in
> cpsw_tx_packet_submit - the patch as is has also been part of nelsons
> trees for the beaglebone for a while)
>
> But it was rightly pointed out later in the thread that this change
>
> +#define CPSW_POLL_WEIGHT 16
>
> made for the biggest part of the improvement, and someone else on the
> thread proposed handling that more dynamically for 100mbit phys with
> another patch (that I can't find at the moment)
>
> ... but the root cause of the excessive latency in this driver was the
> single tx/rx dma queue, which you are addressing in your patch set.
I still think there's a lot of work pending for CPSW, the think slows to
a crawl and takes a lot of CPU for something that should be mostly
handled by DMA. I can very easily get 85% CPU usage with iperf.
> So if you glop on more of the above, mo better, perhaps you will win
> bigger.
>
> I will try to slice out some time to boot up a beagle on net-next next week.
my patches aren't applied yet, however.
cheers
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the net-next tree
From: Stephen Rothwell @ 2015-01-03 3:01 UTC (permalink / raw)
To: David Miller, netdev
Cc: linux-next, linux-kernel, Richard Cochran, Jeff Kirsher
In-Reply-To: <20150103091101.04b2c11e@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]
Hi all,
On Sat, 3 Jan 2015 09:11:01 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/net/ethernet/mellanox/mlx4/en_clock.c: In function 'mlx4_en_init_timestamp':
> drivers/net/ethernet/mellanox/mlx4/en_clock.c:249:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration]
> mdev->cycles.mask = CLOCKSOURCE_MASK(48);
> ^
> drivers/net/ethernet/mellanox/mlx4/en_clock.c:257:3: error: implicit declaration of function 'clocksource_khz2mult' [-Werror=implicit-function-declaration]
> clocksource_khz2mult(1000 * dev->caps.hca_core_clock, mdev->cycles.shift);
> ^
> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c: In function 'ixgbe_ptp_start_cyclecounter':
> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c:796:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration]
> adapter->cc.mask = CLOCKSOURCE_MASK(64);
> ^
>
My powerpc allyesconfig build also produced this:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function 'bnx2x_init_cyclecounter':
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:14613:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration]
bp->cyclecounter.mask = CLOCKSOURCE_MASK(64);
^
So I added this patch:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Sat, 3 Jan 2015 12:15:37 +1100
Subject: [PATCH] bnx2x: Include clocksource.h to get CLOCKSOURCE_MASK
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 2c951326a85d..119c190721da 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -57,6 +57,7 @@
#include <linux/semaphore.h>
#include <linux/stringify.h>
#include <linux/vmalloc.h>
+#include <linux/clocksource.h>
#include "bnx2x.h"
#include "bnx2x_init.h"
--
2.1.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related
* [PATCH net-next 3/4] geneve: Remove socket hash table.
From: Jesse Gross @ 2015-01-03 2:26 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <1420251965-44794-1-git-send-email-jesse@nicira.com>
The hash table for open Geneve ports is used only on creation and
deletion time. It is not performance critical and is not likely to
grow to a large number of items. Therefore, this can be changed
to use a simple linked list.
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
include/net/geneve.h | 2 +-
net/ipv4/geneve.c | 26 +++++++-------------------
2 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/include/net/geneve.h b/include/net/geneve.h
index b40f4af..03aa2ad 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -68,7 +68,7 @@ struct geneve_sock;
typedef void (geneve_rcv_t)(struct geneve_sock *gs, struct sk_buff *skb);
struct geneve_sock {
- struct hlist_node hlist;
+ struct list_head list;
geneve_rcv_t *rcv;
void *rcv_data;
struct socket *sock;
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index ad8dbae..4fe5a59 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -26,7 +26,6 @@
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
-#include <linux/hash.h>
#include <linux/ethtool.h>
#include <linux/mutex.h>
#include <net/arp.h>
@@ -54,12 +53,9 @@
/* Protects sock_list and refcounts. */
static DEFINE_MUTEX(geneve_mutex);
-#define PORT_HASH_BITS 8
-#define PORT_HASH_SIZE (1<<PORT_HASH_BITS)
-
/* per-network namespace private data for this module */
struct geneve_net {
- struct hlist_head sock_list[PORT_HASH_SIZE];
+ struct list_head sock_list;
};
static int geneve_net_id;
@@ -69,19 +65,13 @@ static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
return (struct genevehdr *)(udp_hdr(skb) + 1);
}
-static struct hlist_head *gs_head(struct net *net, __be16 port)
-{
- struct geneve_net *gn = net_generic(net, geneve_net_id);
-
- return &gn->sock_list[hash_32(ntohs(port), PORT_HASH_BITS)];
-}
-
/* Find geneve socket based on network namespace and UDP port */
static struct geneve_sock *geneve_find_sock(struct net *net, __be16 port)
{
+ struct geneve_net *gn = net_generic(net, geneve_net_id);
struct geneve_sock *gs;
- hlist_for_each_entry(gs, gs_head(net, port), hlist) {
+ list_for_each_entry(gs, &gn->sock_list, list) {
if (inet_sk(gs->sock->sk)->inet_sport == port)
return gs;
}
@@ -339,6 +329,7 @@ static struct geneve_sock *geneve_socket_create(struct net *net, __be16 port,
geneve_rcv_t *rcv, void *data,
bool ipv6)
{
+ struct geneve_net *gn = net_generic(net, geneve_net_id);
struct geneve_sock *gs;
struct socket *sock;
struct udp_tunnel_sock_cfg tunnel_cfg;
@@ -371,7 +362,7 @@ static struct geneve_sock *geneve_socket_create(struct net *net, __be16 port,
tunnel_cfg.encap_destroy = NULL;
setup_udp_tunnel_sock(net, sock, &tunnel_cfg);
- hlist_add_head(&gs->hlist, gs_head(net, port));
+ list_add(&gs->list, &gn->sock_list);
return gs;
}
@@ -407,7 +398,7 @@ void geneve_sock_release(struct geneve_sock *gs)
if (--gs->refcnt)
goto unlock;
- hlist_del(&gs->hlist);
+ list_del(&gs->list);
geneve_notify_del_rx_port(gs);
udp_tunnel_sock_release(gs->sock);
kfree_rcu(gs, rcu);
@@ -420,17 +411,14 @@ EXPORT_SYMBOL_GPL(geneve_sock_release);
static __net_init int geneve_init_net(struct net *net)
{
struct geneve_net *gn = net_generic(net, geneve_net_id);
- unsigned int h;
- for (h = 0; h < PORT_HASH_SIZE; ++h)
- INIT_HLIST_HEAD(&gn->sock_list[h]);
+ INIT_LIST_HEAD(&gn->sock_list);
return 0;
}
static struct pernet_operations geneve_net_ops = {
.init = geneve_init_net,
- .exit = NULL,
.id = &geneve_net_id,
.size = sizeof(struct geneve_net),
};
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 4/4] geneve: Check family when reusing sockets.
From: Jesse Gross @ 2015-01-03 2:26 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <1420251965-44794-1-git-send-email-jesse@nicira.com>
When searching for an existing socket to reuse, the address family
is not taken into account - only port number. This means that an
IPv4 socket could be used for IPv6 traffic and vice versa, which
is sure to cause problems when passing packets.
It is not possible to trigger this problem currently because the
only user of Geneve creates just IPv4 sockets. However, that is
likely to change in the near future.
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
net/ipv4/geneve.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index 4fe5a59..5b52046 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -65,14 +65,15 @@ static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
return (struct genevehdr *)(udp_hdr(skb) + 1);
}
-/* Find geneve socket based on network namespace and UDP port */
-static struct geneve_sock *geneve_find_sock(struct net *net, __be16 port)
+static struct geneve_sock *geneve_find_sock(struct net *net,
+ sa_family_t family, __be16 port)
{
struct geneve_net *gn = net_generic(net, geneve_net_id);
struct geneve_sock *gs;
list_for_each_entry(gs, &gn->sock_list, list) {
- if (inet_sk(gs->sock->sk)->inet_sport == port)
+ if (inet_sk(gs->sock->sk)->inet_sport == port &&
+ inet_sk(gs->sock->sk)->sk.sk_family == family)
return gs;
}
@@ -375,7 +376,7 @@ struct geneve_sock *geneve_sock_add(struct net *net, __be16 port,
mutex_lock(&geneve_mutex);
- gs = geneve_find_sock(net, port);
+ gs = geneve_find_sock(net, ipv6 ? AF_INET6 : AF_INET, port);
if (gs) {
if (!no_share && gs->rcv == rcv)
gs->refcnt++;
--
1.9.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