* Re: [PATCH] tcp: fix MSG_SENDPAGE_NOTLAST logic
From: David Miller @ 2013-01-07 4:59 UTC (permalink / raw)
To: eric.dumazet; +Cc: w, netdev, linux-kernel
In-Reply-To: <1357532509.6919.1715.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 06 Jan 2013 20:21:49 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> commit 35f9c09fe9c72e (tcp: tcp_sendpages() should call tcp_push() once)
> added an internal flag : MSG_SENDPAGE_NOTLAST meant to be set on all
> frags but the last one for a splice() call.
>
> The condition used to set the flag in pipe_to_sendpage() relied on
> splice() user passing the exact number of bytes present in the pipe,
> or a smaller one.
>
> But some programs pass an arbitrary high value, and the test fails.
>
> The effect of this bug is a lack of tcp_push() at the end of a
> splice(pipe -> socket) call, and possibly very slow or erratic TCP
> sessions.
>
> We should both test sd->total_len and fact that another fragment
> is in the pipe (pipe->nrbufs > 1)
>
> Many thanks to Willy for providing very clear bug report, bisection
> and test programs.
>
> Reported-by: Willy Tarreau <w@1wt.eu>
> Bisected-by: Willy Tarreau <w@1wt.eu>
> Tested-by: Willy Tarreau <w@1wt.eu>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks everyone.
^ permalink raw reply
* Re: [PATCH 1/4 net-next] tg3: Add support for new 5762 ASIC
From: David Miller @ 2013-01-07 5:02 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1357512670-17636-1-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Sun, 6 Jan 2013 14:51:07 -0800
> Add basic support for 5762 which is a 57765_PLUS class device.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/4 net-next] tg3: Add NVRAM support for 5762
From: David Miller @ 2013-01-07 5:02 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1357512670-17636-2-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Sun, 6 Jan 2013 14:51:08 -0800
> Detect NVRAM types for 5762 and read OTP firmware version.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/4 net-next] tg3: Improve PCI function number detection.
From: David Miller @ 2013-01-07 5:02 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1357512670-17636-3-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Sun, 6 Jan 2013 14:51:09 -0800
> Simplify the code to detect PCI function number on 5717, 5719, and 5720.
> If shared memory does not have proper signature, read the function number
> from register directly.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 4/4 net-next] tg3: Remove IS_ENABLED(CONFIG_HWMON) check
From: David Miller @ 2013-01-07 5:03 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1357512670-17636-4-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Sun, 6 Jan 2013 14:51:10 -0800
> From: Nithin Nayak Sujir <nsujir@broadcom.com>
>
> Commit de0a41484c47d783dd4d442914815076aa2caac2 added Kconfig logic to
> select HWMON and removed all the IS_ENABLED(CONFIG_HWMON) checks in the
> tg3.c file. It missed this one check in the header.
>
> Update version to 3.129 and update copyright year.
>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [patch net] ethoc: fix mac address set
From: David Miller @ 2013-01-07 5:04 UTC (permalink / raw)
To: jiri; +Cc: netdev
In-Reply-To: <1357478745-19923-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 6 Jan 2013 14:25:45 +0100
> Function ethoc_set_mac_address() was incorrectly using passed pointer as
> pointer to address, that is not correct.
> Struct sockaddr have to be be used here.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
This only applies to the net-next tree, so that's where I've
added it.
^ permalink raw reply
* Re: [patch net-next] ethtool: set addr_assign_type to NET_ADDR_SET when addr is passed on create
From: David Miller @ 2013-01-07 5:05 UTC (permalink / raw)
To: jiri; +Cc: netdev, bhutchings, shemminger, sassmann
In-Reply-To: <1357512117-5581-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 6 Jan 2013 23:41:57 +0100
> In case user passed address via netlink during create, NET_ADDR_PERM was set.
> That is not correct so fix this by setting NET_ADDR_SET.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied.
^ permalink raw reply
* Re: [patch net-next] net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
From: David Miller @ 2013-01-07 5:06 UTC (permalink / raw)
To: jiri; +Cc: netdev, linville, linux-wireless
In-Reply-To: <1357474371-30887-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 6 Jan 2013 13:12:51 +0100
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied.
^ permalink raw reply
* Re: [patch net-next V2] ethtool: fix drvinfo strings set in drivers
From: David Miller @ 2013-01-07 5:06 UTC (permalink / raw)
To: jiri
Cc: netdev, edumazet, bhutchings, shemminger, fbl, sathya.perla,
subbu.seetharaman, ajit.khaparde, roland, sean.hefty,
hal.rosenstock, ursula.braun, blaschka, linux390
In-Reply-To: <1357469066-10620-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 6 Jan 2013 11:44:26 +0100
> Use strlcpy where possible to ensure the string is \0 terminated.
> Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
> and custom defines.
> Use snprintf instead of sprint.
> Remove unnecessary inits of ->fw_version
> Remove unnecessary inits of drvinfo struct.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] net: splice: avoid high order page splitting
From: David Miller @ 2013-01-07 5:07 UTC (permalink / raw)
To: eric.dumazet; +Cc: w, netdev
In-Reply-To: <1357457478.1678.5928.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 05 Jan 2013 23:31:18 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> splice() can handle pages of any order, but network code tries hard to
> split them in PAGE_SIZE units. Not quite successfully anyway, as
> __splice_segment() assumed poff < PAGE_SIZE. This is true for
> the skb->data part, not necessarily for the fragments.
>
> This patch removes this logic to give the pages as they are in the skb.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] ndisc: Use struct rd_msg for redirect message.
From: David Miller @ 2013-01-07 5:08 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
In-Reply-To: <50E8E2CB.9080809@linux-ipv6.org>
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Sun, 06 Jan 2013 11:34:51 +0900
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] tcp: make sysctl_tcp_ecn namespace aware
From: David Miller @ 2013-01-07 5:10 UTC (permalink / raw)
To: eric.dumazet; +Cc: hannes, shemminger, netdev
In-Reply-To: <1357438762.1678.5215.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 05 Jan 2013 18:19:22 -0800
> On Sun, 2013-01-06 at 03:10 +0100, Hannes Frederic Sowa wrote:
>> As per suggestion from Eric Dumazet this patch makes tcp_ecn sysctl
>> namespace aware. The reason behind this patch is to ease the testing
>> of ecn problems on the internet and allows applications to tune their
>> own use of ecn.
>>
>> Cc: Eric Dumazet <eric.dumazet@gmail.com>
>> Cc: David Miller <davem@davemloft.net>
>> Cc: Stephen Hemminger <shemminger@vyatta.com>
>> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>> ---
>
> Seems good to me, thanks !
>
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] ipv4: fix NULL checking in devinet_ioctl()
From: David Miller @ 2013-01-07 5:11 UTC (permalink / raw)
To: eric.dumazet; +Cc: xi.wang, netdev
In-Reply-To: <1357427402.1678.4738.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 05 Jan 2013 15:10:02 -0800
> On Sat, 2013-01-05 at 16:19 -0500, Xi Wang wrote:
>> The NULL pointer check `!ifa' should come before its first use.
>>
>> Signed-off-by: Xi Wang <xi.wang@gmail.com>
>> ---
>> net/ipv4/devinet.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
>> index cc06a47..a8e4f26 100644
>> --- a/net/ipv4/devinet.c
>> +++ b/net/ipv4/devinet.c
>> @@ -823,9 +823,9 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
>> if (!ifa) {
>> ret = -ENOBUFS;
>> ifa = inet_alloc_ifa();
>> - INIT_HLIST_NODE(&ifa->hash);
>> if (!ifa)
>> break;
>> + INIT_HLIST_NODE(&ifa->hash);
>> if (colon)
>> memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>> else
>
> Acked-by: Eric Dumazet <edumazet@google.com>
>
> Bug origin : commit fd23c3b31107e2fc483301ee923d8a1db14e53f4
> (ipv4: Add hash table of interface addresses)
>
> in linux-2.6.39
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next] team: use strlcpy with ethtool_drvinfo fields
From: David Miller @ 2013-01-07 5:12 UTC (permalink / raw)
To: bhutchings; +Cc: fbl, netdev, jpirko
In-Reply-To: <1357395077.4324.5.camel@deadeye.wl.decadent.org.uk>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sat, 5 Jan 2013 14:11:17 +0000
> On Sat, 2013-01-05 at 10:53 -0200, Flavio Leitner wrote:
>> The fields must be null-terminated.
>>
>> Signed-off-by: Flavio Leitner <fbl@redhat.com>
>
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Applied.
^ permalink raw reply
* Re: [PATCH] drivers/net: remove orphaned references to micro channel
From: David Miller @ 2013-01-07 5:13 UTC (permalink / raw)
To: paul.gortmaker; +Cc: netdev
In-Reply-To: <1357354637-1784-1-git-send-email-paul.gortmaker@windriver.com>
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Fri, 4 Jan 2013 21:57:17 -0500
> We threw away the microchannel support, but the removal wasn't
> completely trivial since there was namespace overlap with the
> machine check support, and hence some orphaned dependencies
> survived the deletion. This attempts to sweep those up and
> send them to the bit-bucket.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Applied, thanks.
^ permalink raw reply
* Re: [patch net-next] net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
From: Luciano Coelho @ 2013-01-07 5:58 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linville-2XuSBdqkA4R54TAoqtyWWQ,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1357474371-30887-1-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
Hi Jiri,
On Sun, 2013-01-06 at 13:12 +0100, Jiri Pirko wrote:
> Signed-off-by: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
> ---
Please add a commit message explaining why this change is needed.
--
Luca.
--
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-next] net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
From: David Miller @ 2013-01-07 6:05 UTC (permalink / raw)
To: coelho-l0cyMroinI0
Cc: jiri-rHqAuBHg3fBzbRFIqnYvSA, netdev-u79uwXL29TY76Z2rM5mHXA,
linville-2XuSBdqkA4R54TAoqtyWWQ,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1357538335.22318.19.camel-eHkr6bJ9aPyyenC2BZ5AVw@public.gmane.org>
From: Luciano Coelho <coelho-l0cyMroinI0@public.gmane.org>
Date: Mon, 7 Jan 2013 07:58:55 +0200
> Hi Jiri,
>
> On Sun, 2013-01-06 at 13:12 +0100, Jiri Pirko wrote:
>> Signed-off-by: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
>> ---
>
> Please add a commit message explaining why this change is needed.
It's obvious, not such commit message is necessary.
--
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: [RFC PATCH] vsprintf: Add %p*D extension for 80211 SSIDs
From: Chen Gang @ 2013-01-07 6:07 UTC (permalink / raw)
To: Joe Perches; +Cc: John W. Linville, stas.yakovlev, linux-wireless, netdev
In-Reply-To: <1357534195.21481.31.camel@joe-AO722>
于 2013年01月07日 12:49, Joe Perches 写道:
> On Sun, 2013-01-06 at 19:19 -0800, Joe Perches wrote:
>> Maybe these days this should be another vsprintf %p extension
>> like %pM when the DECLARE_MAC_BUF/print_mac uses were converted.
>>
>> (or maybe extend %ph for ssids with %*phs, length, array)
>
excuse me:
I do not quite know how to reply the [RFC PATCH].
it would be better if you can tell me how to do for [RFC PATCH], thanks.
:-)
at least for me:
although it is good idea to add common, widely used features in public tools function.
after searching the relative source code:
it seems print ssid is not quite widely used (although it is a common feature).
it is used by drivers/net/wireless/libertas
it is used by drivers/net/wireless/ipw2x00
no additional using in current kernel source code wide.
if another modules want to print ssid,
they can still call print_ssid now (EXPORT_SYMBOL in net/wireless).
so at least now, it is not necessary to add this feature to public tools function.
Regards
gchen.
> Maybe like this:
>
> lib/vsprintf.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 55 insertions(+), 2 deletions(-)
>
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> index fab33a9..98916a0 100644
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -26,6 +26,7 @@
> #include <linux/math64.h>
> #include <linux/uaccess.h>
> #include <linux/ioport.h>
> +#include <linux/ieee80211.h>
> #include <net/addrconf.h>
>
> #include <asm/page.h> /* for PAGE_SIZE */
> @@ -660,10 +661,59 @@ char *resource_string(char *buf, char *end, struct resource *res,
> }
>
> static noinline_for_stack
> +char *ssid_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
> + const char *fmt)
> +{
> + int i, len = 1; /* if we pass %*p, field width remains
> + negative value, fallback to the default */
> +
> + if (spec.field_width == 0)
> + /* nothing to print */
> + return buf;
> +
> + if (ZERO_OR_NULL_PTR(addr))
> + /* NULL pointer */
> + return string(buf, end, NULL, spec);
> +
> + if (spec.field_width > 0)
> + len = min_t(int, spec.field_width, IEEE80211_MAX_SSID_LEN);
> +
> + for (i = 0; i < len && buf < end; i++) {
> + if (isprint(addr[i])) {
> + *buf++ = addr[i];
> + continue;
> + }
> + *buf++ = '\\';
> + if (buf >= end)
> + continue;
> + if (addr[i] == '\0')
> + *buf++ = '0';
> + else if (addr[i] == '\n')
> + *buf++ = 'n';
> + else if (addr[i] == '\r')
> + *buf++ = 'r';
> + else if (addr[i] == '\t')
> + *buf++ = 't';
> + else if (addr[i] == '\\')
> + *buf++ = '\\';
> + else {
> + if (buf < end)
> + *buf++ = ((addr[i] >> 6) & 7) + '0';
> + if (buf < end)
> + *buf++ = ((addr[i] >> 3) & 7) + '0';
> + if (buf < end)
> + *buf++ = ((addr[i] >> 0) & 7) + '0';
> + }
> + }
> +
> + return buf;
> +}
> +
> +static noinline_for_stack
> char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
> const char *fmt)
> {
> - int i, len = 1; /* if we pass '%ph[CDN]', field witdh remains
> + int i, len = 1; /* if we pass '%ph[CDN]', field width remains
> negative value, fallback to the default */
> char separator;
>
> @@ -695,7 +745,6 @@ char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
>
> for (i = 0; i < len && buf < end - 1; i++) {
> buf = hex_byte_pack(buf, addr[i]);
> -
> if (buf < end && separator && i != len - 1)
> *buf++ = separator;
> }
> @@ -1016,6 +1065,8 @@ int kptr_restrict __read_mostly;
> * [0][1][2][3]-[4][5]-[6][7]-[8][9]-[10][11][12][13][14][15]
> * little endian output byte order is:
> * [3][2][1][0]-[5][4]-[7][6]-[8][9]-[10][11][12][13][14][15]
> + * - 'D' For a 80211 SSID, it prints the SSID escaping any non-printable
> + characters with a leading \ and octal or [0nrt\]
> * - 'V' For a struct va_format which contains a format string * and va_list *,
> * call vsnprintf(->format, *->va_list).
> * Implements a "recursive vsnprintf".
> @@ -1088,6 +1139,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> break;
> case 'U':
> return uuid_string(buf, end, ptr, spec, fmt);
> + case 'D':
> + return ssid_string(buf, end, ptr, spec, fmt);
> case 'V':
> {
> va_list va;
>
>
>
>
--
Chen Gang
Asianux Corporation
^ permalink raw reply
* Re: [patch net-next] net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
From: Luciano Coelho @ 2013-01-07 6:09 UTC (permalink / raw)
To: David Miller; +Cc: jiri, netdev, linville, linux-wireless
In-Reply-To: <20130106.220523.1783238632929635985.davem@davemloft.net>
On Sun, 2013-01-06 at 22:05 -0800, David Miller wrote:
> From: Luciano Coelho <coelho@ti.com>
> Date: Mon, 7 Jan 2013 07:58:55 +0200
>
> > Hi Jiri,
> >
> > On Sun, 2013-01-06 at 13:12 +0100, Jiri Pirko wrote:
> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> >> ---
> >
> > Please add a commit message explaining why this change is needed.
>
> It's obvious, not such commit message is necessary.
Hmmm, okay. I just always prefer to see a commit message. If not for
more clarity, at least so that the commit looks more "balanced" in the
log.
Anyway, for the wlcore part:
Acked-by: Luciano Coelho <coelho@ti.com>
^ permalink raw reply
* Re: [RFC PATCH] vsprintf: Add %p*D extension for 80211 SSIDs
From: Joe Perches @ 2013-01-07 6:37 UTC (permalink / raw)
To: Chen Gang
Cc: John W. Linville, stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <50EA6612.6010506-bOixZGp5f+dBDgjK7y7TUQ@public.gmane.org>
On Mon, 2013-01-07 at 14:07 +0800, Chen Gang wrote:
> 于 2013年01月07日 12:49, Joe Perches 写道:
> > On Sun, 2013-01-06 at 19:19 -0800, Joe Perches wrote:
> >> Maybe these days this should be another vsprintf %p extension
> >> like %pM when the DECLARE_MAC_BUF/print_mac uses were converted.
> >>
> >> (or maybe extend %ph for ssids with %*phs, length, array)
> >
> excuse me:
> I do not quite know how to reply the [RFC PATCH].
> it would be better if you can tell me how to do for [RFC PATCH], thanks.
You did fine except you unnecessarily quoted the entire original email.
Remember to trim your replies please. _lots_ of people read these
mailing lists and unnecessary quoting wastes all of their times.
> at least for me:
> although it is good idea to add common, widely used features in public tools function.
It's akin to most of the minor uuid/bluetooth mac, etc codes
in vsprintf I've added.
cheers, Joe
--
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: [RFC PATCH] vsprintf: Add %p*D extension for 80211 SSIDs
From: Chen Gang @ 2013-01-07 6:58 UTC (permalink / raw)
To: Joe Perches
Cc: John W. Linville, stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1357540670.21481.38.camel@joe-AO722>
于 2013年01月07日 14:37, Joe Perches 写道:
> You did fine except you unnecessarily quoted the entire original email.
> Remember to trim your replies please. _lots_ of people read these
> mailing lists and unnecessary quoting wastes all of their times.
>
ok, thank you.
I should notice, next time. :-)
>> > at least for me:
>> > although it is good idea to add common, widely used features in public tools function.
> It's akin to most of the minor uuid/bluetooth mac, etc codes
after see the comments for function pointer in lib/vsprintf.c
sorry for I do not think it is suitable to add ssid in vsprintf
all formate features in vsprintf are face to kernel wide, not for one sub system
one exception is for mac and ip:
they have already been well known in kernel wide
every one knows about mac and ip.
I feel, our ssid is not quite well known in kernel wide
maybe current place (net/wireless/) is not quite suitable for print_ssid:
for bluetooth, it is not belong to net/wireless.
if necessary, I suggest to reconstruct it within net sub system wide, not in kernel wide.
(it is also my fault for my original reply, it is not quite clear)
Regards
--
Chen Gang
Asianux Corporation
--
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: [RFC PATCH 0/3] Make rfc3686 template work with asynchronous block ciphers
From: Steffen Klassert @ 2013-01-07 7:00 UTC (permalink / raw)
To: Herbert Xu; +Cc: David Miller, jussi.kivilinna, linux-crypto, netdev
In-Reply-To: <20121229000812.GA29866@gondor.apana.org.au>
On Sat, Dec 29, 2012 at 11:08:12AM +1100, Herbert Xu wrote:
> On Fri, Dec 28, 2012 at 03:23:11PM -0800, David Miller wrote:
> > From: Herbert Xu <herbert@gondor.apana.org.au>
> > Date: Sat, 29 Dec 2012 09:42:49 +1100
> >
> > > On Fri, Dec 28, 2012 at 12:04:48PM +0200, Jussi Kivilinna wrote:
> > >> I'm not sure how this patchset should be dealt with (should 1st patch go
> > >> through different tree than 2nd and 3rd?), so therefore it's RFC.
> > >>
> > >> Second patch makes rfc3686 template work with asynchronous block ciphers and
> > >> third patch changes aesni-intel to use this template. First patch fixed problem
> > >> in xfrm_algo found with help of 2nd and 3rd patches and without 1st patch
> > >> 2nd patch breaks aes-ctr with IPSEC.
> > >
> > > I think the easiest way is to have these patches go through Dave's
> > > tree.
> >
> > Better yet, Steffen's IPSEC tree :-)
>
> Of course :)
Herbert, can I add your Ack to the crypto patches?
^ permalink raw reply
* [PATCH V2 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
From: Wanlong Gao @ 2013-01-07 7:14 UTC (permalink / raw)
To: linux-kernel; +Cc: Michael S. Tsirkin, netdev, virtualization, Eric Dumazet
As M.S.T mentioned, set affinity will not work very well when
CPU IDs are not consecutive, this can happen with hot unplug.
Fix this bug by traversal the online CPUs.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Eric Dumazet <erdnetdev@gmail.com>
Cc: virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
drivers/net/virtio_net.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a6fcf15..b483fb5 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1016,6 +1016,7 @@ static int virtnet_vlan_rx_kill_vid(struct net_device *dev, u16 vid)
static void virtnet_set_affinity(struct virtnet_info *vi, bool set)
{
int i;
+ int cpu;
/* In multiqueue mode, when the number of cpu is equal to the number of
* queue pairs, we let the queue pairs to be private to one cpu by
@@ -1029,16 +1030,25 @@ static void virtnet_set_affinity(struct virtnet_info *vi, bool set)
return;
}
- for (i = 0; i < vi->max_queue_pairs; i++) {
- int cpu = set ? i : -1;
- virtqueue_set_affinity(vi->rq[i].vq, cpu);
- virtqueue_set_affinity(vi->sq[i].vq, cpu);
- }
+ if (set) {
+ i = 0;
+ for_each_online_cpu(cpu) {
+ virtqueue_set_affinity(vi->rq[i].vq, cpu);
+ virtqueue_set_affinity(vi->sq[i].vq, cpu);
+ i++;
+ if (i >= vi->max_queue_pairs)
+ break;
+ }
- if (set)
vi->affinity_hint_set = true;
- else
+ } else {
+ for(i = 0; i < vi->max_queue_pairs; i++) {
+ virtqueue_set_affinity(vi->rq[i].vq, -1);
+ virtqueue_set_affinity(vi->sq[i].vq, -1);
+ }
+
vi->affinity_hint_set = false;
+ }
}
static void virtnet_get_ringparam(struct net_device *dev,
--
1.8.1
^ permalink raw reply related
* [PATCH V2 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug
From: Wanlong Gao @ 2013-01-07 7:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Michael S. Tsirkin, netdev, virtualization, Eric Dumazet
In-Reply-To: <1357542900-15557-1-git-send-email-gaowanlong@cn.fujitsu.com>
Add a cpu notifier to virtio-net, so that we can reset the
virtqueue affinity if the cpu hotplug happens. It improve
the performance through enabling or disabling the virtqueue
affinity after doing cpu hotplug.
Adding the notifier block to virtnet_info is suggested by
Jason, thank you.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Eric Dumazet <erdnetdev@gmail.com>
Cc: virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
drivers/net/virtio_net.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b483fb5..9547b4c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -26,6 +26,7 @@
#include <linux/scatterlist.h>
#include <linux/if_vlan.h>
#include <linux/slab.h>
+#include <linux/cpu.h>
static int napi_weight = 128;
module_param(napi_weight, int, 0444);
@@ -123,6 +124,9 @@ struct virtnet_info {
/* Does the affinity hint is set for virtqueues? */
bool affinity_hint_set;
+
+ /* CPU hot plug notifier */
+ struct notifier_block nb;
};
struct skb_vnet_hdr {
@@ -1051,6 +1055,23 @@ static void virtnet_set_affinity(struct virtnet_info *vi, bool set)
}
}
+static int virtnet_cpu_callback(struct notifier_block *nfb,
+ unsigned long action, void *hcpu)
+{
+ struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb);
+ switch(action) {
+ case CPU_ONLINE:
+ case CPU_ONLINE_FROZEN:
+ case CPU_DEAD:
+ case CPU_DEAD_FROZEN:
+ virtnet_set_affinity(vi, true);
+ break;
+ default:
+ break;
+ }
+ return NOTIFY_OK;
+}
+
static void virtnet_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
{
@@ -1509,6 +1530,13 @@ static int virtnet_probe(struct virtio_device *vdev)
}
}
+ vi->nb.notifier_call = &virtnet_cpu_callback;
+ err = register_hotcpu_notifier(&vi->nb);
+ if (err) {
+ pr_debug("virtio_net: registering cpu notifier failed\n");
+ goto free_recv_bufs;
+ }
+
/* Assume link up if device can't report link status,
otherwise get link status from config. */
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
@@ -1553,6 +1581,8 @@ static void virtnet_remove(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
+ unregister_hotcpu_notifier(&vi->nb);
+
/* Prevent config work handler from accessing the device. */
mutex_lock(&vi->config_lock);
vi->config_enable = false;
--
1.8.1
^ permalink raw reply related
* [PATCH net-next v4 0/3] netpoll: add IPv6 support
From: Cong Wang @ 2013-01-07 7:17 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang
v4: remove ndisc_parse_options(), ignore ICMP options there
make udp6_csum_init() inline so that we don't rely on IPV6=y
fix a conflict with Jiri's patchset
v3: fix CONFIG_IPV6=m case
v2: use bool for ipv6 flag
fix !CONFIG_IPV6 case
This patchset implements netpoll over IPv6.
Cong Wang (3):
netpoll: prepare for ipv6
netpoll: add IPv6 support
netconsole: add IPv6 example in doc
Documentation/networking/netconsole.txt | 7 +-
drivers/net/netconsole.c | 46 ++-
include/linux/netpoll.h | 13 +-
include/net/udp.h | 34 ++
net/core/netpoll.c | 617 ++++++++++++++++++++++---------
net/ipv6/udp.c | 34 --
6 files changed, 534 insertions(+), 217 deletions(-)
--
1.7.7.6
^ 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