* Re: [PATCH] unix_diag: use netlink attribute MAX convention
From: Stephen Hemminger @ 2012-04-25 20:09 UTC (permalink / raw)
To: David Miller; +Cc: shanwei88, xemul, netdev
In-Reply-To: <20120425.155717.2099319998110521099.davem@davemloft.net>
On Wed, 25 Apr 2012 15:57:17 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Wed, 25 Apr 2012 12:47:43 -0700
>
> > On Wed, 25 Apr 2012 15:07:16 -0400 (EDT)
> > David Miller <davem@davemloft.net> wrote:
> >
> >> Either you apply them as soon as possible, or you mark them
> >> appropriately as "Changes Requested" or "Deferred" so that the
> >> submitter makes appropriate fixes you've asked for, or resubmits when
> >> it's more appropriate for the change to go in.
> >>
> >> "Under Review" doesn't mean, "I'm waiting for a kernel release with
> >> the feature". But that's how you use it.
> >
> > Ok. What is the suggested tag for that.
>
> As I said above, "Deferred", with a note sent to the submitter to resubmit
> the patch at the appropriate time.
That doesn't work, not asking original submitter to resubmit.
I tried a branch, but git doesn't like branches coming and going
on remote repos.
Probably better to just have an ephemeral iproute2-next repo on kernel.org.
^ permalink raw reply
* This will make you smile ;)
From: Shannon Lavenia @ 2012-04-25 18:07 UTC (permalink / raw)
To: netdev
Hi,
Thanks for taking a minute to read this message.
I know your time is valuable and I appreciate it. That's
why I'm sending you this note. You will benefit from it,
I promise.
http://www.boldstatementmarketing.com/video3
Like you, I am self-employed. I've had a lot
of success and have done millions in sales but it's
been a roller coaster. There's been huge wins and
big losses. The wins drive me further and the losses...
well, they keep me humble and keep me learning ;)
I've felt the frustration of trying to find new
clients and customers and it's gotten down-right
dirty online...
the competition is stiff, Google's just slapping
everyone (yep...I've been spanked by Google too)
and it was getting harder and harder to grow my lists and
customer base.
Not to mention expensive. About a year ago, I transitioned
everything to offline marketing and that was just tedious, slow
and, I have to admit, boring.
I was determined to figure out how to get the same or better
lead flow that I was getting back in 2007 with Google before
they got spank happy.
It took us almost a year, but we figured it out. I can't believe
it even took us that long because this is so ridiculously simple...
It was right under our noses the entire time. Every major brand
is doing it. All the big marketers are doing it.
And now we're doing it and it is bringing in a flood of traffic,
leads and sales faster than anything we've done before.
Our results now are blowing away what we saw back with Google
Adwords before they got all funky.
You might already be using this to grow your business...if you are
congratulations, because I know you're killing it!
If not, learn how now (for fr.ee).
http://www.boldstatementmarketing.com/video3
Just click the link and sign up to get instant access to the fast start
course for fr.ee and you'll know exactly how to get more leads,
more customers and a freakin' flood of sales.
I'm excited for you to watch the training. The playing field is wide
open with this...I'm still shocked by how few business are actually
using this strategy because it's so darn easy and the results are
shocking.
Have fun ;)
Shannon Lavenia
PS: John (my husband) and I are driven by the comments we get
so leave me a note about the training on the site...I appreciate it and
love to hear how your succeeding with this training.
Peace.
http://www.boldstatementmarketing.com/video3
^ permalink raw reply
* Re: [PATCH 2/2] iproute2: add ip-l2tp man page
From: Stephen Hemminger @ 2012-04-25 20:11 UTC (permalink / raw)
To: James Chapman; +Cc: netdev
In-Reply-To: <1334921383-32109-3-git-send-email-jchapman@katalix.com>
On Fri, 20 Apr 2012 12:29:43 +0100
James Chapman <jchapman@katalix.com> wrote:
> Add a man page to cover the "ip l2tp" commands. Add a reference to it
> in the main ip page.
>
> Signed-off-by: James Chapman <jchapman@katalix.com>
> ---
> man/man8/ip-l2tp.8 | 350 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> man/man8/ip.8 | 3 +-
> 2 files changed, 352 insertions(+), 1 deletions(-)
> create mode 100644 man/man8/ip-l2tp.8
>
> diff --git a/man/man8/ip-l2tp.8 b/man/man8/ip-l2tp.8
> new file mode 100644
> index 0000000..c115e7c
> --- /dev/null
> +++ b/man/man8/ip-l2tp.8
> @@ -0,0 +1,350 @@
> +.TH IP\-L2TP 8 "19 Apr 2012" "iproute2" "Linux"
> +.SH "NAME"
> +ip-l2tp - L2TPv3 static unmanaged tunnel configuration
> +.SH "SYNOPSIS"
> +.sp
> +.ad l
> +.in +8
> +.ti -8
> +.B ip
> +.RI "[ " OPTIONS " ]"
> +.B l2tp
> +.RI " { " COMMAND " | "
> +.BR help " }"
> +.sp
> +.ti -8
> +.BR "ip l2tp add tunnel"
> +.br
> +.B remote
> +.RI "[ " ADDR " ]"
> +.B local
> +.RI "[ " ADDR " ]"
> +.br
> +.B tunnel_id
> +.IR ID
> +.B peer_tunnel_id
> +.IR ID
> +.br
> +.RB "[ " encap " { " ip " | " udp " } ]"
> +.br
> +.RB "[ " udp_sport
> +.IR PORT
> +.RB " ] [ " udp_dport
> +.IR PORT
> +.RB " ]"
> +.br
> +.ti -8
> +.BR "ip l2tp add session"
> +.RB "[ " name
> +.IR NAME
> +.RB " ]"
> +.br
> +.B tunnel_id
> +.IR ID
> +.B session_id
> +.IR ID
> +.B peer_session_id
> +.IR ID
> +.br
> +.RB "[ " cookie
> +.IR HEXSTR
> +.RB " ] [ " peer_cookie
> +.IR HEXSTR
> +.RB " ]"
> +.br
> +.RB "[ " offset
> +.IR OFFSET
> +.RB " ] [ " peer_offset
> +.IR OFFSET
> +.RB " ]"
> +.br
> +.ti -8
> +.BR "ip l2tp del tunnel"
> +.B tunnel_id
> +.IR ID
> +.br
> +.ti -8
> +.BR "ip l2tp del session"
> +.B tunnel_id
> +.IR ID
> +.B session_id
> +.IR ID
> +.br
> +.ti -8
> +.BR "ip l2tp show tunnel"
> +.B "[" tunnel_id
> +.IR ID
> +.B "]"
> +.br
> +.ti -8
> +.BR "ip l2tp show session"
> +.B "[" tunnel_id
> +.IR ID
> +.B "] [" session_id
> +.IR ID
> +.B "]"
> +.br
> +.ti -8
> +.IR NAME " := "
> +.IR STRING
> +.ti -8
> +.IR ADDR " := { " IP_ADDRESS " }"
> +.ti -8
> +.IR PORT " := { " NUMBER " }"
> +.ti -8
> +.IR ID " := { " NUMBER " }"
> +.ti -8
> +.ti -8
> +.IR HEXSTR " := { 8 or 16 hex digits (4 / 8 bytes) }"
> +.SH DESCRIPTION
> +The
> +.B ip l2tp
> +commands are used to establish static, or so-called
> +.I unmanaged
> +L2TPv3 ethernet tunnels. For unmanaged tunnels, there is no L2TP
> +control protocol so no userspace daemon is required - tunnels are
> +manually created by issuing commands at a local system and at a remote
> +peer.
> +.PP
> +L2TPv3 is suitable for Layer-2 tunnelling. Static tunnels are useful
> +to establish network links across IP networks when the tunnels are
> +fixed. L2TPv3 tunnels can carry data of more than one session. Each
> +session is identified by a session_id and its parent tunnel's
> +tunnel_id. A tunnel must be created before a session can be created in
> +the tunnel.
> +.PP
> +When creating an L2TP tunnel, the IP address of the remote peer is
> +specified, which can be either an IPv4 or IPv6 address. The local IP
> +address to be used to reach the peer must also be specified. This is
> +the address on which the local system will listen for and accept
> +received L2TP data packets from the peer.
> +.PP
> +L2TPv3 defines two packet encapsulation formats: UDP or IP. UDP
> +encapsulation is most common. IP encapsulation uses a dedicated IP
> +protocol value to carry L2TP data without the overhead of UDP. Use IP
> +encapsulation only when there are no NAT devices or firewalls in the
> +network path.
> +.PP
> +When an L2TPv3 ethernet session is created, a virtual network
> +interface is created for the session, which must then be configured
> +and brought up, just like any other network interface. When data is
> +passed through the interface, it is carried over the L2TP tunnel to
> +the peer. By configuring the system's routing tables or adding the
> +interface to a bridge, the L2TP interface is like a virtual wire
> +(pseudowire) connected to the peer.
> +.PP
> +Establishing an unmanaged L2TPv3 ethernet pseudowire involves manually
> +creating L2TP contexts on the local system and at the peer. Parameters
> +used at each site must correspond or no data will be passed. No
> +consistency checks are possible since there is no control protocol
> +used to establish unmanaged L2TP tunnels. Once the virtual network
> +interface of a given L2TP session is configured and enabled, data can
> +be transmitted, even if the peer isn't yet configured. If the peer
> +isn't configured, the L2TP data packets will be discarded by
> +the peer.
> +.PP
> +To establish an unmanaged L2TP tunnel, use
> +.B l2tp add tunnel
> +and
> +.B l2tp add session
> +commands described in this document. Then configure and enable the
> +tunnel's virtual network interface, as required.
> +.PP
> +Note that unmanaged tunnels carry only ethernet frames. If you need to
> +carry PPP traffic (L2TPv2) or your peer doesn't support unmanaged
> +L2TPv3 tunnels, you will need an L2TP server which implements the L2TP
> +control protocol. The L2TP control protocol allows dynamic L2TP
> +tunnels and sessions to be established and provides for detecting and
> +acting upon network failures.
> +.SS ip l2tp add tunnel - add a new tunnel
> +.TP
> +.BI name " NAME "
> +sets the session network interface name. Default is l2tpethN.
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id, which is a 32-bit integer value. Uniquely
> +identifies the tunnel. The value used must match the peer_tunnel_id
> +value being used at the peer.
> +.TP
> +.BI peer_tunnel_id " ID"
> +set the peer tunnel id, which is a 32-bit integer value assigned to
> +the tunnel by the peer. The value used must match the tunnel_id value
> +being used at the peer.
> +.TP
> +.BI remote " ADDR"
> +set the IP address of the remote peer. May be specified as an IPv4
> +address or an IPv6 address.
> +.TP
> +.BI local " ADDR"
> +set the IP address of the local interface to be used for the
> +tunnel. This address must be the address of a local interface. May be
> +specified as an IPv4 address or an IPv6 address.
> +.TP
> +.BI encap " ENCAP"
> +set the encapsulation type of the tunnel.
> +.br
> +Valid values for encapsulation are:
> +.BR udp ", " ip "."
> +.TP
> +.BI udp_sport " PORT"
> +set the UDP source port to be used for the tunnel. Must be present
> +when udp encapsulation is selected. Ignored when ip encapsulation is
> +selected.
> +.TP
> +.BI udp_dport " PORT"
> +set the UDP destination port to be used for the tunnel. Must be
> +present when udp encapsulation is selected. Ignored when ip
> +encapsulation is selected.
> +.SS ip l2tp del tunnel - destroy a tunnel
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id of the tunnel to be deleted. All sessions within the
> +tunnel must be deleted first.
> +.SS ip l2tp show tunnel - show information about tunnels
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id of the tunnel to be shown. If not specified,
> +information about all tunnels is printed.
> +.SS ip l2tp add session - add a new session to a tunnel
> +.TP
> +.BI name " NAME "
> +sets the session network interface name. Default is l2tpethN.
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id, which is a 32-bit integer value. Uniquely
> +identifies the tunnel into which the session will be created. The
> +tunnel must already exist.
> +.TP
> +.BI session_id " ID"
> +set the session id, which is a 32-bit integer value. Uniquely
> +identifies the session being created. The value used must match the
> +peer_session_id value being used at the peer.
> +.TP
> +.BI peer_session_id " ID"
> +set the peer session id, which is a 32-bit integer value assigned to
> +the session by the peer. The value used must match the session_id
> +value being used at the peer.
> +.TP
> +.BI cookie " HEXSTR"
> +sets an optional cookie value to be assigned to the session. This is a
> +4 or 8 byte value, specified as 8 or 16 hex digits,
> +e.g. 014d3636deadbeef. The value must match the peer_cookie value set
> +at the peer. The cookie value is carried in L2TP data packets and is
> +checked for expected value at the peer. Default is to use no cookie.
> +.TP
> +.BI peer_cookie " HEXSTR"
> +sets an optional peer cookie value to be assigned to the session. This
> +is a 4 or 8 byte value, specified as 8 or 16 hex digits,
> +e.g. 014d3636deadbeef. The value must match the cookie value set at
> +the peer. It tells the local system what cookie value to expect to
> +find in received L2TP packets. Default is to use no cookie.
> +.TP
> +.BI offset " OFFSET"
> +sets the byte offset from the L2TP header where user data starts in
> +transmitted L2TP data packets. This is hardly ever used. If set, the
> +value must match the peer_offset value used at the peer. Default is 0.
> +.TP
> +.BI peer_offset " OFFSET"
> +sets the byte offset from the L2TP header where user data starts in
> +received L2TP data packets. This is hardly ever used. If set, the
> +value must match the offset value used at the peer. Default is 0.
> +.SS ip l2tp del session - destroy a session
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id in which the session to be deleted is located.
> +.TP
> +.BI session_id " ID"
> +set the session id of the session to be deleted.
> +.SS ip l2tp show session - show information about sessions
> +.TP
> +.BI tunnel_id " ID"
> +set the tunnel id of the session(s) to be shown. If not specified,
> +information about sessions in all tunnels is printed.
> +.TP
> +.BI session_id " ID"
> +set the session id of the session to be shown. If not specified,
> +information about all sessions is printed.
> +.SH EXAMPLES
> +.PP
> +.SS Setup L2TP tunnels and sessions
> +.nf
> +site-A:# ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 \\
> + encap udp local 1.2.3.4 remote 5.6.7.8 \\
> + udp_sport 5000 udp_dport 6000
> +site-A:# ip l2tp add session tunnel_id 3000 session_id 1000 \\
> + peer_session_id 2000
> +
> +site-B:# ip l2tp add tunnel tunnel_id 4000 peer_tunnel_id 3000 \\
> + encap udp local 5.6.7.8 remote 1.2.3.4 \\
> + udp_sport 6000 udp_dport 5000
> +site-B:# ip l2tp add session tunnel_id 4000 session_id 2000 \\
> + peer_session_id 1000
> +
> +site-A:# ip link set l2tpeth0 up mtu 1488
> +
> +site-B:# ip link set l2tpeth0 up mtu 1488
> +.fi
> +.PP
> +Notice that the IP addresses, UDP ports and tunnel / session ids are
> +matched and reversed at each site.
> +.SS Configure as IP interfaces
> +The two interfaces can be configured with IP addresses if only IP data
> +is to be carried. This is perhaps the simplest configuration.
> +.PP
> +.nf
> +site-A:# ip addr add 10.42.1.1 peer 10.42.1.2 dev l2tpeth0
> +
> +site-B:# ip addr add 10.42.1.2 peer 10.42.1.1 dev l2tpeth0
> +
> +site-A:# ping 10.42.1.2
> +.fi
> +.PP
> +Now the link should be usable. Add static routes as needed to have
> +data sent over the new link.
> +.PP
> +.SS Configure as bridged interfaces
> +To carry non-IP data, the L2TP network interface is added to a bridge
> +instead of being assigned its own IP address, using standard Linux
> +utilities.
> +.PP
> +.nf
> +site-A:# brctl addbr br0
> +site-A:# brctl addif br0 l2tpeth0
> +site-A:# brctl addif br0 eth0
> +site-A:# ip link set br0 up promisc on
> +.fi
> +.PP
> +If you are using VLANs, setup a bridge per VLAN and bridge each VLAN
> +over a separate L2TP session. For example, to bridge VLAN ID 5 on eth1
> +over an L2TP pseudowire:
> +.PP
> +.nf
> +site-A:# brctl addbr brvlan5
> +site-A:# brctl addif brvlan5 l2tpeth0.5
> +site-A:# brctl addif brvlan5 eth1.5
> +site-A:# ip link set brvlan5 up promisc on
The bridge manages promiscuous itself, setting it manually is not required.
If it is required, the the implementation of the device is buggy
and should be fixed.
^ permalink raw reply
* Re: [PATCH] unix_diag: use netlink attribute MAX convention
From: David Miller @ 2012-04-25 20:12 UTC (permalink / raw)
To: shemminger; +Cc: shanwei88, xemul, netdev
In-Reply-To: <20120425130906.7a090d22@nehalam.linuxnetplumber.net>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 25 Apr 2012 13:09:06 -0700
> That doesn't work, not asking original submitter to resubmit.
It works every single time for me.
If they don't resubmit, they don't really care about their work being
included, and therefore neither should you.
End of story.
^ permalink raw reply
* Re: [PATCH 1/2] iproute2: allow IPv6 addresses for l2tp local and remote parameters
From: Stephen Hemminger @ 2012-04-25 20:13 UTC (permalink / raw)
To: James Chapman; +Cc: netdev, Chris Elston
In-Reply-To: <1334921383-32109-2-git-send-email-jchapman@katalix.com>
On Fri, 20 Apr 2012 12:29:42 +0100
James Chapman <jchapman@katalix.com> wrote:
> From: Chris Elston <celston@katalix.com>
>
> Adds support for parsing IPv6 addresses to the parameters local and
> remote in the l2tp commands. Requires netlink attributes L2TP_ATTR_IP6_SADDR
> and L2TP_ATTR_IP6_DADDR, added in a required kernel patch already submitted
> to netdev.
>
> Also enables printing of IPv6 addresses returned by the L2TP_CMD_TUNNEL_GET
> request.
>
> Signed-off-by: Chris Elston <celston@katalix.com>
> Signed-off-by: James Chapman <jchapman@katalix.com>
Accepted.
^ permalink raw reply
* Re: [PATCH iproute2] pedit action: add mask for changing bits.
From: Stephen Hemminger @ 2012-04-25 20:15 UTC (permalink / raw)
To: jhs; +Cc: hadi, Anton 'EvilMan' Danilov, netdev
In-Reply-To: <1330524080.18226.21.camel@mojatatu>
On Wed, 29 Feb 2012 09:01:20 -0500
jamal <hadi@cyberus.ca> wrote:
> Hi Anton,
>
> On Wed, 2012-02-29 at 16:12 +0300, Anton 'EvilMan' Danilov wrote:
>
> >
> > You are right, mask option isn't needed. Retain option must be used instead it.
> >
>
> Thanks for verifying.
>
> > Action to work on Vlans is fine idea. I'm very interested in this
> > action. I'll be grateful for any help.
>
> Lets start by defining the interface to be seen by user space
> such as vlan editing/popping/pushing etc. Then i will help you
> build it slowly until you are comfortable with moving with it.
>
> As a matter of fact, lets talk offline so we dont add more noise
> to the list; you can always post the RFC to the list when you are
> ready.
>
> cheers,
> jamal
Did you come to a conclusion, should it be applied as is?
^ permalink raw reply
* Re: [patch v3, iproute2 version 3.2.0] Source mode for macvlan interface
From: Stephen Hemminger @ 2012-04-25 20:17 UTC (permalink / raw)
To: Stefan Gula; +Cc: netdev
In-Reply-To: <10839102.1251327929240954.JavaMail.root@5-MeO-DMT.ynet.sk>
On Mon, 30 Jan 2012 14:14:00 +0100 (CET)
Stefan Gula <steweg@ynet.sk> wrote:
> From: Stefan Gula <steweg@gmail.com>
>
> Adjusting iproute2 utility to support new macvlan link type mode
> called "source". Example of commands that can be applied:
> ip link add link eth0 name macvlan0 type macvlan mode source
> ip link set link macvlan0 type macvlan macaddr add 00:11:11:11:11:11
> ip link set link macvlan0 type macvlan macaddr del 00:11:11:11:11:11
> ip link set link macvlan0 type macvlan macaddr flush
>
> Signed-off-by: Stefan Gula <steweg@gmail.com>
>
Please resubmit with man page, after the kernel header changes are in
Linus's tree (ie. 3.5 merge window).
^ permalink raw reply
* Re: [PATCH 1/2] ss: fix the incorrect value of total UNIX_DIAG_* number
From: Stephen Hemminger @ 2012-04-25 20:21 UTC (permalink / raw)
To: Shan Wei; +Cc: xemul, NetDev
In-Reply-To: <4F97A484.2040300@gmail.com>
On Wed, 25 Apr 2012 15:15:16 +0800
Shan Wei <shanwei88@gmail.com> wrote:
> From: Shan Wei <davidshan@tencent.com>
>
> UNIX_DIAG_MAX is included in enum type.
> It is equal to the total number of enum element.
>
> But lots of enum MAX value is defined as the max enum element, e.g. INET_DIAG_MAX, XFRMA_MAX.
> The right fixing way seems to define UNIX_DIAG_MAX as UNIX_DIAG_MEMINFO,
> but this way will break other user application.
>
> So, just fix it on user application.
>
>
> Signed-off-by: Shan Wei <davidshan@tencent.com>
> ---
> misc/ss.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/misc/ss.c b/misc/ss.c
> index 4017918..5f70a26 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -2011,12 +2011,12 @@ void unix_list_print(struct unixstat *list, struct filter *f)
> static int unix_show_sock(struct nlmsghdr *nlh, struct filter *f)
> {
> struct unix_diag_msg *r = NLMSG_DATA(nlh);
> - struct rtattr *tb[UNIX_DIAG_MAX+1];
> + struct rtattr *tb[UNIX_DIAG_MAX];
> char name[128];
> int peer_ino;
> int rqlen;
>
> - parse_rtattr(tb, UNIX_DIAG_MAX, (struct rtattr*)(r+1),
> + parse_rtattr(tb, UNIX_DIAG_MAX-1, (struct rtattr*)(r+1),
> nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*r)));
>
> if (netid_width)
Ok, I'll put this in but with a big juicy comment so that nobody
else is surprised by the fact we got it wrong here.
^ permalink raw reply
* RE: [PATCH 00/14 v2] usb/net: rndis: first step toward consolidation
From: Haiyang Zhang @ 2012-04-25 20:36 UTC (permalink / raw)
To: Linus Walleij, netdev@vger.kernel.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman, David S. Miller, Felipe Balbi
Cc: Jussi Kivilinna, Wei Yongjun, Ben Hutchings, KY Srinivasan
In-Reply-To: <1335367783-4184-1-git-send-email-linus.walleij@linaro.org>
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: Wednesday, April 25, 2012 11:30 AM
> To: netdev@vger.kernel.org; linux-usb@vger.kernel.org; Greg Kroah-Hartman;
> David S. Miller; Felipe Balbi
> Cc: Jussi Kivilinna; Haiyang Zhang; Wei Yongjun; Ben Hutchings; Linus
> Walleij
> Subject: [PATCH 00/14 v2] usb/net: rndis: first step toward consolidation
>
> A second spin of the RNDIS unification patches.
> Jussi Kivilinna pointed out an error where I was joining
> "media" and "physical media" in patch 9, this was all wrong
> so now I've fixed it up.
>
> Please test!
>
> If this thing works I guess it should propagate through
> dmillers tree eventually.
>
> Linus Walleij (14):
> usb/net: rndis: inline the cpu_to_le32() macro
> usb/net: rndis: break out <linux/rndis.h> defines
> usb/net: rndis: remove duplicate definitions
> usb/net: rndis: remove ambigous status codes
> usb/net: rndis: eliminate first set of duplicate OIDs
> usb/net: rndis: merge duplicate 802_* OIDs
> usb/net: rndis: delete surplus defines
> usb/net: rndis: group all status codes together
> usb/net: rndis: merge media type definitions
> usb/net: rndis: delete duplicate packet types
> usb/net: rndis: move and namespace PnP defines
> usb/net: rndis: merge command codes
> usb/net: rndis: fixup a few name prefixes
> usb/net: rndis: move bus message definition
>
> drivers/net/hyperv/hyperv_net.h | 290 +---------------------------
> drivers/net/hyperv/rndis_filter.c | 46 +++---
> drivers/net/usb/rndis_host.c | 52 +++---
> drivers/net/wireless/rndis_wlan.c | 295 ++++++++++++----------------
> drivers/usb/gadget/f_rndis.c | 6 +-
> drivers/usb/gadget/ndis.h | 164 ----------------
> drivers/usb/gadget/rndis.c | 271 +++++++++++++-------------
> drivers/usb/gadget/rndis.h | 48 +-----
> include/linux/rndis.h | 390
> +++++++++++++++++++++++++++++++++++++
> include/linux/usb/rndis_host.h | 66 +------
> 10 files changed, 706 insertions(+), 922 deletions(-)
> create mode 100644 include/linux/rndis.h
>
> --
> 1.7.7.6
>
I tested Hyper-V netvsc driver, it works fine with the patches.
Thanks,
- Haiyang
^ permalink raw reply
* RE: [PATCH 02/14 v2] usb/net: rndis: break out <linux/rndis.h> defines
From: Haiyang Zhang @ 2012-04-25 20:38 UTC (permalink / raw)
To: Linus Walleij, netdev@vger.kernel.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman, David S. Miller, Felipe Balbi
Cc: Jussi Kivilinna, Wei Yongjun, Ben Hutchings
In-Reply-To: <1335367808-4254-1-git-send-email-linus.walleij@linaro.org>
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: Wednesday, April 25, 2012 11:30 AM
> To: netdev@vger.kernel.org; linux-usb@vger.kernel.org; Greg Kroah-Hartman;
> David S. Miller; Felipe Balbi
> Cc: Jussi Kivilinna; Haiyang Zhang; Wei Yongjun; Ben Hutchings; Linus
> Walleij
> Subject: [PATCH 02/14 v2] usb/net: rndis: break out <linux/rndis.h>
> defines
>
> As a first step to consolidate the RNDIS implementations, break out
> a common file with all the #defines and move it to <linux/rndis.h>.
> The compilation screams about double-defines all over the place
> (as could be expected, this is why we're consolidating) but it
> compiles cleanly still.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/net/hyperv/hyperv_net.h | 290 +-----------------
> drivers/net/wireless/rndis_wlan.c | 49 ---
> drivers/usb/gadget/ndis.h | 164 ----------
> drivers/usb/gadget/rndis.h | 48 +---
> include/linux/rndis.h | 615
> +++++++++++++++++++++++++++++++++++++
> include/linux/usb/rndis_host.h | 66 +----
> 6 files changed, 619 insertions(+), 613 deletions(-)
> create mode 100644 include/linux/rndis.h
>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
^ permalink raw reply
* RE: [PATCH 04/14 v2] usb/net: rndis: remove ambigous status codes
From: Haiyang Zhang @ 2012-04-25 20:39 UTC (permalink / raw)
To: Linus Walleij, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Greg Kroah-Hartman, David S. Miller, Felipe Balbi
Cc: Jussi Kivilinna, Wei Yongjun, Ben Hutchings
In-Reply-To: <1335367825-4324-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org]
> Sent: Wednesday, April 25, 2012 11:30 AM
> To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Greg Kroah-Hartman;
> David S. Miller; Felipe Balbi
> Cc: Jussi Kivilinna; Haiyang Zhang; Wei Yongjun; Ben Hutchings; Linus
> Walleij
> Subject: [PATCH 04/14 v2] usb/net: rndis: remove ambigous status codes
>
> The RNDIS status codes are redefined with much stranged ifdeffery
> and only one of these codes was used in the hyperv driver, and
> there it is very clearly referring to the RNDIS variant, not some
> other status. So clarify this by explictly using the RNDIS_*
> prefixed status code in the hyperv drivera and delete the
> duplicate defines.
>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> drivers/net/hyperv/rndis_filter.c | 4 ++--
> include/linux/rndis.h | 31 +++----------------------------
> 2 files changed, 5 insertions(+), 30 deletions(-)
>
Reviewed-by: Haiyang Zhang <haiyangz-0li6OtcxBFHby3iVrkZq2A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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 12/14 v2] usb/net: rndis: merge command codes
From: Haiyang Zhang @ 2012-04-25 20:39 UTC (permalink / raw)
To: Linus Walleij, netdev@vger.kernel.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman, David S. Miller, Felipe Balbi
Cc: Jussi Kivilinna, Wei Yongjun, Ben Hutchings
In-Reply-To: <1335368163-4792-1-git-send-email-linus.walleij@linaro.org>
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: Wednesday, April 25, 2012 11:36 AM
> To: netdev@vger.kernel.org; linux-usb@vger.kernel.org; Greg Kroah-Hartman;
> David S. Miller; Felipe Balbi
> Cc: Jussi Kivilinna; Haiyang Zhang; Wei Yongjun; Ben Hutchings; Linus
> Walleij
> Subject: [PATCH 12/14 v2] usb/net: rndis: merge command codes
>
> Switch the hyperv filter and rndis gadget driver to use the same command
> enumerators as the other drivers and delete the surplus command codes.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/net/hyperv/rndis_filter.c | 42 ++++++++++++++++++--------------
> ----
> drivers/usb/gadget/rndis.c | 37 +++++++++++++++----------------
> include/linux/rndis.h | 17 ---------------
> 3 files changed, 39 insertions(+), 57 deletions(-)
>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
^ permalink raw reply
* Re: pull request: wireless-next 2012-04-25
From: David Miller @ 2012-04-25 20:39 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20120425191418.GC16900@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 25 Apr 2012 15:14:19 -0400
> This is another batch of updates intended for 3.5...
...
> Please let me know if there are problems!
There are:
>From 792545c7bc5d6b922d3778dc602e557d64c83551 Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Date: Mon, 23 Apr 2012 19:55:48 -0700
Subject: [PATCH 88/88] libertas: include sched.h on firmware.c
Do not assume we have our subsystem including this for us,
at least for older kernels this is not true. Lets just be
explicit about this requirement for the usage of wake_up().
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This is bogus, wake_up() is defined in linux/wait.h, the whole
point of the linux/sched.h split up is so that linux/sched.h
includes could be removed and replaced with actual dependencies.
Also, please don't accept any patches from Luis that add those
#undef pr_fmt things to the atheros drivers.
He tried to add it an ethernet driver, and I asked him to explain
exactly why he's doing and that if it's appropriate then it's
appropriate everywhere not just in a few specific drivers. He failed
to respond to me, and therefore failed to explain the situation and
address my concerned. And then I saw just today that he's submitting
the same patch to wireless drivers. That's not acceptable.
Thanks.
^ permalink raw reply
* RE: wireless: mwifiex: initial commit for Marvell mwifiex driver
From: Bing Zhao @ 2012-04-25 22:08 UTC (permalink / raw)
To: Dan Carpenter; +Cc: netdev@vger.kernel.org
In-Reply-To: <20120425084445.GA12799@elgon.mountain>
Hi Dan,
> Hi Bing,
>
> The patch 5e6e3a92b9a4: "wireless: mwifiex: initial commit for
> Marvell mwifiex driver" from Mar 21, 2011, leads to the following
> static checker warning:
>
> drivers/net/wireless/mwifiex/sta_ioctl.c:1410
> mwifiex_set_gen_ie_helper()
> error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
Thanks for catching this error.
>
> 1390 mwifiex_set_gen_ie_helper(struct mwifiex_private *priv, u8 *ie_data_ptr,
> 1391 u16 ie_len)
> 1392 {
> 1393 int ret = 0;
> 1394 struct ieee_types_vendor_header *pvendor_ie;
> 1395 const u8 wpa_oui[] = { 0x00, 0x50, 0xf2, 0x01 };
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 byte array.
The last byte 0x01 is actually the oui_type.
...
u8 oui[3];
u8 oui_type;
...
>
> 1396 const u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 };
> 1397
> 1398 /* If the passed length is zero, reset the buffer */
> 1399 if (!ie_len) {
> 1400 priv->gen_ie_buf_len = 0;
> 1401 priv->wps.session_enable = false;
> 1402
> 1403 return 0;
> 1404 } else if (!ie_data_ptr) {
> 1405 return -1;
> 1406 }
> 1407 pvendor_ie = (struct ieee_types_vendor_header *) ie_data_ptr;
> 1408 /* Test to see if it is a WPA IE, if not, then it is a gen IE */
> 1409 if (((pvendor_ie->element_id == WLAN_EID_WPA) &&
> 1410 (!memcmp(pvendor_ie->oui, wpa_oui, sizeof(wpa_oui)))) ||
> ^^^^^^^^^^^^^^^
> ->oui is only a 3 byte array so we're reading past the end for this
> comparison.
I will fix the misuse of memcmp's.
By the way, could you please share with me how you check for this kind of errors?
Is it coccinelle? I tried with coccicheck but got "spatch.opt unknown option -D" error.
Thanks,
Bing
>
> 1411 (pvendor_ie->element_id == WLAN_EID_RSN)) {
>
>
> There are a couple other similar warnings as well:
>
> drivers/net/wireless/mwifiex/sta_ioctl.c:1435 mwifiex_set_gen_ie_helper()
> error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
> drivers/net/wireless/mwifiex/scan.c:1177 mwifiex_update_bss_desc_with_ie()
> error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
> drivers/net/wireless/mwifiex/scan.c:1185 mwifiex_update_bss_desc_with_ie()
> error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
>
> regards,
> dan carpenter
^ permalink raw reply
* Re: [PATCH] dl2k: Tighten ioctl permissions
From: Ben Hutchings @ 2012-04-25 22:26 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Network Development
In-Reply-To: <4F985197.1060607@suse.com>
On Wed, 2012-04-25 at 15:33 -0400, Jeff Mahoney wrote:
> dl2k's rio_ioctl function defines several ioctls that involve
> operations that should be denied to regular users.
>
> SIOCDEVPRIVATE + 2 is a renumbered SIOCSMIIREG.
There was an early convention that SIOCDEVPRIVATE + {0,1,2} were MDIO
operations. (This was a bad idea, because you can't safely send them to
an arbitrary driver... not that that stopped people doing it. Now it's
neither safe to send them from userland, nor to implement any other
semantics for these ioctl numbers in a driver.)
Please fix the numbering instead; it will make standard MII/MDIO
utilities work and the capability check (in dev_ioctl()) comes for free.
> SIOCDEVPRIVATE + 5 calls netif_stop_queue.
> SIOCDEVPRIVATE + 6 calls netif_wake_queue.
[...]
And SIOCDEVPRIVATE + {7,8} spam the kernel log, so they should perhaps
be considered privileged too.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH] dl2k: Tighten ioctl permissions
From: David Miller @ 2012-04-25 22:29 UTC (permalink / raw)
To: bhutchings; +Cc: jeffm, netdev
In-Reply-To: <1335392802.2602.33.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 25 Apr 2012 23:26:42 +0100
> On Wed, 2012-04-25 at 15:33 -0400, Jeff Mahoney wrote:
>> dl2k's rio_ioctl function defines several ioctls that involve
>> operations that should be denied to regular users.
>>
>> SIOCDEVPRIVATE + 2 is a renumbered SIOCSMIIREG.
>
> There was an early convention that SIOCDEVPRIVATE + {0,1,2} were MDIO
> operations. (This was a bad idea, because you can't safely send them to
> an arbitrary driver... not that that stopped people doing it. Now it's
> neither safe to send them from userland, nor to implement any other
> semantics for these ioctl numbers in a driver.)
>
> Please fix the numbering instead; it will make standard MII/MDIO
> utilities work and the capability check (in dev_ioctl()) comes for free.
>
>> SIOCDEVPRIVATE + 5 calls netif_stop_queue.
>> SIOCDEVPRIVATE + 6 calls netif_wake_queue.
> [...]
>
> And SIOCDEVPRIVATE + {7,8} spam the kernel log, so they should perhaps
> be considered privileged too.
And I would also say that the netif_{stop,wake}_queue ones should just
be deleted. There is no sane way, even as a debugging facility, we
can let useland trigger these conditions.
And if we could, it belongs in a generic facility no private ioctls
which are heavily discouraged anyways.
I seriously would suggest ditching all of these private ioctls from
the dl2k driver, I bet no binary in the world out there even exists
which handles these strange renumbered MII operations.
^ permalink raw reply
* Re: [PATCH] dl2k: Tighten ioctl permissions
From: Jeff Mahoney @ 2012-04-25 22:37 UTC (permalink / raw)
To: David Miller; +Cc: bhutchings, netdev
In-Reply-To: <20120425.182954.804210541527871356.davem@davemloft.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/25/2012 06:29 PM, David Miller wrote:
> From: Ben Hutchings <bhutchings@solarflare.com> Date: Wed, 25 Apr
> 2012 23:26:42 +0100
>
>> On Wed, 2012-04-25 at 15:33 -0400, Jeff Mahoney wrote:
>>> dl2k's rio_ioctl function defines several ioctls that involve
>>> operations that should be denied to regular users.
>>>
>>> SIOCDEVPRIVATE + 2 is a renumbered SIOCSMIIREG.
>>
>> There was an early convention that SIOCDEVPRIVATE + {0,1,2} were
>> MDIO operations. (This was a bad idea, because you can't safely
>> send them to an arbitrary driver... not that that stopped people
>> doing it. Now it's neither safe to send them from userland, nor
>> to implement any other semantics for these ioctl numbers in a
>> driver.)
>>
>> Please fix the numbering instead; it will make standard MII/MDIO
>> utilities work and the capability check (in dev_ioctl()) comes
>> for free.
>>
>>> SIOCDEVPRIVATE + 5 calls netif_stop_queue. SIOCDEVPRIVATE + 6
>>> calls netif_wake_queue.
>> [...]
>>
>> And SIOCDEVPRIVATE + {7,8} spam the kernel log, so they should
>> perhaps be considered privileged too.
>
> And I would also say that the netif_{stop,wake}_queue ones should
> just be deleted. There is no sane way, even as a debugging
> facility, we can let useland trigger these conditions.
>
> And if we could, it belongs in a generic facility no private
> ioctls which are heavily discouraged anyways.
>
> I seriously would suggest ditching all of these private ioctls
> from the dl2k driver, I bet no binary in the world out there even
> exists which handles these strange renumbered MII operations.
Ok. I expected this is what you'd say, but I don't usually play in the
network code or have one of these devices to do any testing with. I'll
kill off the private ioctls and switch the MDIO ones to the standard
interface.
- -Jeff
- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJPmHyMAAoJEB57S2MheeWyC2YQAIiUSuC3TTQkFW0sDdrGIJtB
BSfxeSJVYN6SOmKWK9G6/AsTciB/9z/d3lQ6duJQCFTZCnUcCWcKN81iIHRJVZ32
5f97MBnPnSbZvjGyaHT3QNodH6Jq0uNQRHAXm5py7RZpDGmYCFuEr/h5QRibbiH2
IoYG3QMSGUZysOsqYqzk1aHokSfp8CTkoUKHAAyvbo911M6eFO/V6vEQs2ujojDT
PZfXGYVqkegOvC3HyGjDuQaoMpUYQC1Uz343mNB6ZJVOM7SCVfN2R4cJGCD6K78s
dxbVl68jCfdI8cB5xv1vmWCsZroRlgjxmCnwyM/ecz0IAtmeGNjQXLoQF67WXcV+
hgUgVpcFK0bqCgrtkR1wxMdmloQHlXVf53FFxhIjkJc/KuSalhqdbMdMzKbcGtU/
aqx+1rl937sr8Ffg82qzpUqsunTDmQMV1EB87CdW5ma2ZkjekA3dn8za74OlhP3M
hYzytw7Z9rQQt0v5a2FAvYopLDMWgtl8bEgJf2Dnhyrnez0E4iDzIdQq6oYbtipQ
xndTUTmHJvIGbJfhtfiUZgG3LhKbFR6a+nz+P+Pk7TRqcuFUTaak0SkCjTBUdPGO
TIO2GqFJeAQR3s8F2na2AVzXHXeQrNoWaNlhU0EOt9GARSc+WjftApDbSrB+chKm
DP+N7odTX93FIzZ2/chy
=8eUd
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: [net 1/2] e1000e: MSI interrupt test failed, using legacy interrupt
From: Prasanna Panchamukhi @ 2012-04-25 22:46 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Jeff Kirsher, davem, netdev, gospo, sassmann
In-Reply-To: <1335369547.2602.3.camel@bwh-desktop.uk.solarflarecom.com>
On 04/25/2012 08:59 AM, Ben Hutchings wrote:
> On Tue, 2012-04-24 at 22:55 -0700, Jeff Kirsher wrote:
>> From: Prasanna S Panchamukhi<ppanchamukhi@riverbed.com>
>>
>> Following logs where seen on Systems with multiple NICs,
>> while using MSI interrupts as shown below:
> [...]
>> This patch fixes this problem by increasing the msleep from 50 to 100.
> [...]
>
> It probably doesn't, in general. The out-of-tree version of the sfc
> driver used to perform an interrupt test during probe, and after fixing
> it up repeatedly I eventually had to remove it completely as there are
> so many ways to get a false negative. Also see the related commit
> 93e5dfa59b0e26a145a8adce5c9edf50bdaef4c7 ('sfc: Raise self-test
> timeouts').
>
Thanks Ben for your review.
In general Ben's approach looks good fix to avoid false negatives. To
give a little
bit of background, this issues is seen mostly with Intel 82571 Dual/quad
port Gigabit ethernet controller add-on NICs and not seen with other
Intel ethernet controller NICs. If Ben suggested
approach is the best way to go, I will provide a patch soon.
Thanks,
Prasanna
> Ben.
>
^ permalink raw reply
* Re: kernel BUG at include/net/netns/generic.h:41
From: Dave Jones @ 2012-04-25 22:58 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: Myklebust, Trond, Linux Kernel, netdev@vger.kernel.org
In-Reply-To: <4F7DC4CC.9080502@parallels.com>
On Thu, Apr 05, 2012 at 08:14:04PM +0400, Stanislav Kinsbursky wrote:
> 05.04.2012 20:12, Dave Jones пишет:
> > On Thu, Apr 05, 2012 at 08:08:31PM +0400, Stanislav Kinsbursky wrote:
> >
> > > So, there are few questions to you, Dave:
> > > 1) can this happen (PipeFS mount attempt before SUNPRC module insertion has
> > > returned any value) in your case?
> >
> > I don't know enough of what systemd is doing to answer this.
> >
> > > 2) how often do you experience this problem? Not every boot, I suppose?
> > > 3) And is it easy for you to reproduce?
> >
> > It happens most the time, but not every time.
> >
>
> Ok, I'll send the patch soon.
> Hope, it will help.
>
> --
> Best regards,
> Stanislav Kinsbursky
I didn't see a follow-up patch on this, and I'm still seeing the BUG in rc4.
Dave
^ permalink raw reply
* [PATCH 1/8] isdn/gigaset: ratelimit CAPI message dumps
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20120425-patch-gigaset-00.tilman@imap.cc>
Introduce a global ratelimit for CAPI message dumps to protect
against possible log flood.
Drop the ratelimit for ignored messages which is now covered by the
global one.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
---
drivers/isdn/gigaset/capi.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 343b5c8..292ca2f 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -14,6 +14,7 @@
#include "gigaset.h"
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <linux/ratelimit.h>
#include <linux/isdn/capilli.h>
#include <linux/isdn/capicmd.h>
#include <linux/isdn/capiutil.h>
@@ -223,10 +224,14 @@ get_appl(struct gigaset_capi_ctr *iif, u16 appl)
static inline void dump_cmsg(enum debuglevel level, const char *tag, _cmsg *p)
{
#ifdef CONFIG_GIGASET_DEBUG
+ /* dump at most 20 messages in 20 secs */
+ static DEFINE_RATELIMIT_STATE(msg_dump_ratelimit, 20 * HZ, 20);
_cdebbuf *cdb;
if (!(gigaset_debuglevel & level))
return;
+ if (!___ratelimit(&msg_dump_ratelimit, tag))
+ return;
cdb = capi_cmsg2str(p);
if (cdb) {
@@ -2059,12 +2064,6 @@ static void do_reset_b3_req(struct gigaset_capi_ctr *iif,
}
/*
- * dump unsupported/ignored messages at most twice per minute,
- * some apps send those very frequently
- */
-static unsigned long ignored_msg_dump_time;
-
-/*
* unsupported CAPI message handler
*/
static void do_unsupported(struct gigaset_capi_ctr *iif,
@@ -2073,8 +2072,7 @@ static void do_unsupported(struct gigaset_capi_ctr *iif,
{
/* decode message */
capi_message2cmsg(&iif->acmsg, skb->data);
- if (printk_timed_ratelimit(&ignored_msg_dump_time, 30 * 1000))
- dump_cmsg(DEBUG_CMD, __func__, &iif->acmsg);
+ dump_cmsg(DEBUG_CMD, __func__, &iif->acmsg);
send_conf(iif, ap, skb, CapiMessageNotSupportedInCurrentState);
}
@@ -2085,11 +2083,9 @@ static void do_nothing(struct gigaset_capi_ctr *iif,
struct gigaset_capi_appl *ap,
struct sk_buff *skb)
{
- if (printk_timed_ratelimit(&ignored_msg_dump_time, 30 * 1000)) {
- /* decode message */
- capi_message2cmsg(&iif->acmsg, skb->data);
- dump_cmsg(DEBUG_CMD, __func__, &iif->acmsg);
- }
+ /* decode message */
+ capi_message2cmsg(&iif->acmsg, skb->data);
+ dump_cmsg(DEBUG_CMD, __func__, &iif->acmsg);
dev_kfree_skb_any(skb);
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH 3/8] isdn/gigaset: improve error handling querying firmware version
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20120425-patch-gigaset-00.tilman@imap.cc>
An out-of-place "OK" response to the "AT+GMR" (get firmware version)
command turns out to be, more often than not, a delayed response to
a previous command rather than an actual error, so continue waiting
for the version number in that case.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
---
drivers/isdn/gigaset/ev-layer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index 624a825..685638a 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -190,6 +190,7 @@ struct reply_t gigaset_tab_nocid[] =
ACT_INIT} },
{RSP_OK, 121, 121, -1, 0, 0, {ACT_GOTVER,
ACT_INIT} },
+ {RSP_NONE, 121, 121, -1, 120, 0, {ACT_GETSTRING} },
/* leave dle mode */
{RSP_INIT, 0, 0, SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"},
@@ -1314,8 +1315,9 @@ static void do_action(int action, struct cardstate *cs,
s = ev->ptr;
if (!strcmp(s, "OK")) {
+ /* OK without version string: assume old response */
*p_genresp = 1;
- *p_resp_code = RSP_ERROR;
+ *p_resp_code = RSP_NONE;
break;
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH 2/8] isdn/gigaset: fix CAPI disconnect B3 handling
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20120425-patch-gigaset-00.tilman@imap.cc>
If DISCONNECT_B3_IND was synthesized because of a DISCONNECT_REQ
with existing logical connections, the connection state wasn't
updated accordingly. Also the emitted DISCONNECT_B3_IND message
wasn't included in the debug log as requested.
This patch fixes both of these issues.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
---
drivers/isdn/gigaset/capi.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 292ca2f..579aa02 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1887,6 +1887,9 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,
/* check for active logical connection */
if (bcs->apconnstate >= APCONN_ACTIVE) {
+ /* clear it */
+ bcs->apconnstate = APCONN_SETUP;
+
/*
* emit DISCONNECT_B3_IND with cause 0x3301
* use separate cmsg structure, as the content of iif->acmsg
@@ -1911,6 +1914,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,
}
capi_cmsg2message(b3cmsg,
__skb_put(b3skb, CAPI_DISCONNECT_B3_IND_BASELEN));
+ dump_cmsg(DEBUG_CMD, __func__, b3cmsg);
kfree(b3cmsg);
capi_ctr_handle_message(&iif->ctr, ap->id, b3skb);
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH 8/8] isdn/capi: elliminate capincci_find() in non-middleware case
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20120425-patch-gigaset-00.tilman@imap.cc>
If Kernel CAPI is compiled without CONFIG_ISDN_CAPI_MIDDLEWARE,
the structure retrieved via capincci_find() is never actually
used, so don't compile that function in that case.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/capi/capi.c | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 9ee3991..38c4bd8 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -336,11 +336,6 @@ static inline void
capincci_alloc_minor(struct capidev *cdev, struct capincci *np) { }
static inline void capincci_free_minor(struct capincci *np) { }
-static inline unsigned int capincci_minor_opencount(struct capincci *np)
-{
- return 0;
-}
-
#endif /* !CONFIG_ISDN_CAPI_MIDDLEWARE */
static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci)
@@ -372,6 +367,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci)
}
}
+#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
static struct capincci *capincci_find(struct capidev *cdev, u32 ncci)
{
struct capincci *np;
@@ -382,7 +378,6 @@ static struct capincci *capincci_find(struct capidev *cdev, u32 ncci)
return NULL;
}
-#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
/* -------- handle data queue --------------------------------------- */
static struct sk_buff *
@@ -578,8 +573,8 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
struct tty_struct *tty;
struct capiminor *mp;
u16 datahandle;
-#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
struct capincci *np;
+#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
mutex_lock(&cdev->lock);
@@ -597,6 +592,12 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
goto unlock_out;
}
+#ifndef CONFIG_ISDN_CAPI_MIDDLEWARE
+ skb_queue_tail(&cdev->recvqueue, skb);
+ wake_up_interruptible(&cdev->recvwait);
+
+#else /* CONFIG_ISDN_CAPI_MIDDLEWARE */
+
np = capincci_find(cdev, CAPIMSG_CONTROL(skb->data));
if (!np) {
printk(KERN_ERR "BUG: capi_signal: ncci not found\n");
@@ -605,12 +606,6 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
goto unlock_out;
}
-#ifndef CONFIG_ISDN_CAPI_MIDDLEWARE
- skb_queue_tail(&cdev->recvqueue, skb);
- wake_up_interruptible(&cdev->recvwait);
-
-#else /* CONFIG_ISDN_CAPI_MIDDLEWARE */
-
mp = np->minorp;
if (!mp) {
skb_queue_tail(&cdev->recvqueue, skb);
@@ -893,6 +888,11 @@ register_out:
return -EFAULT;
return 0;
+#ifndef CONFIG_ISDN_CAPI_MIDDLEWARE
+ case CAPI_NCCI_OPENCOUNT:
+ return 0;
+
+#else /* CONFIG_ISDN_CAPI_MIDDLEWARE */
case CAPI_NCCI_OPENCOUNT: {
struct capincci *nccip;
unsigned ncci;
@@ -909,7 +909,6 @@ register_out:
return count;
}
-#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
case CAPI_NCCI_GETUNIT: {
struct capincci *nccip;
struct capiminor *mp;
--
1.7.3.4
^ permalink raw reply related
* [PATCH 5/8] isdn/gigaset: internal function name cleanup
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20120425-patch-gigaset-00.tilman@imap.cc>
Functions clear_at_state and free_strings did the same thing;
drop one of them, keeping the more descriptive name.
Drop a redundant call.
Rename function dealloc_at_states to dealloc_temp_at_states
to clarify its purpose.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/gigaset/common.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index 7679270..6c306d4 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -362,7 +362,7 @@ struct event_t *gigaset_add_event(struct cardstate *cs,
}
EXPORT_SYMBOL_GPL(gigaset_add_event);
-static void free_strings(struct at_state_t *at_state)
+static void clear_at_state(struct at_state_t *at_state)
{
int i;
@@ -372,18 +372,13 @@ static void free_strings(struct at_state_t *at_state)
}
}
-static void clear_at_state(struct at_state_t *at_state)
-{
- free_strings(at_state);
-}
-
-static void dealloc_at_states(struct cardstate *cs)
+static void dealloc_temp_at_states(struct cardstate *cs)
{
struct at_state_t *cur, *next;
list_for_each_entry_safe(cur, next, &cs->temp_at_states, list) {
list_del(&cur->list);
- free_strings(cur);
+ clear_at_state(cur);
kfree(cur);
}
}
@@ -512,7 +507,7 @@ void gigaset_freecs(struct cardstate *cs)
case 1: /* error when registering to LL */
gig_dbg(DEBUG_INIT, "clearing at_state");
clear_at_state(&cs->at_state);
- dealloc_at_states(cs);
+ dealloc_temp_at_states(cs);
/* fall through */
case 0: /* error in basic setup */
@@ -848,8 +843,7 @@ static void cleanup_cs(struct cardstate *cs)
cs->mstate = MS_UNINITIALIZED;
clear_at_state(&cs->at_state);
- dealloc_at_states(cs);
- free_strings(&cs->at_state);
+ dealloc_temp_at_states(cs);
gigaset_at_init(&cs->at_state, NULL, cs, 0);
cs->inbuf->inputstate = INS_command;
--
1.7.3.4
^ permalink raw reply related
* [PATCH 0/8] ISDN patches for net-next
From: Tilman Schmidt @ 2012-04-25 23:02 UTC (permalink / raw)
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
Karsten, David,
here's a series of eight patches to the Kernel CAPI subsystem and
the Gigaset driver. Please consider for application to net-next.
The first three should also go into -stable and are tagged accordingly.
Thanks,
Tilman
Tilman Schmidt (8):
isdn/gigaset: ratelimit CAPI message dumps
isdn/gigaset: fix CAPI disconnect B3 handling
isdn/gigaset: improve error handling querying firmware version
isdn/gigaset: fix readability damage
isdn/gigaset: internal function name cleanup
isdn/gigaset: unify function return values
isdn/capi: fix readability damage
isdn/capi: elliminate capincci_find() in non-middleware case
drivers/isdn/capi/capi.c | 50 ++---
drivers/isdn/capi/capidrv.c | 8
drivers/isdn/gigaset/bas-gigaset.c | 44 ++---
drivers/isdn/gigaset/capi.c | 118 ++++++-------
drivers/isdn/gigaset/common.c | 59 ++----
drivers/isdn/gigaset/dummyll.c | 2
drivers/isdn/gigaset/ev-layer.c | 321 ++++++++++++++++++-------------------
drivers/isdn/gigaset/gigaset.h | 30 +--
drivers/isdn/gigaset/i4l.c | 12 -
drivers/isdn/gigaset/isocdata.c | 12 -
drivers/isdn/gigaset/ser-gigaset.c | 21 +-
drivers/isdn/gigaset/usb-gigaset.c | 19 +-
12 files changed, 341 insertions(+), 355 deletions(-)
^ 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