* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:14 UTC (permalink / raw)
To: Johannes Berg; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375816128.8219.28.camel@jlt4.sipsolutions.net>
On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>
>> Attached is a diff comparing all new commits in next-20130805.
>> If one of the commits smells bad to you, please let me know.
>
> Out of that list, only the af_packet changes would seem to have any
> impact on wireless at all.
>
git-bisecting... 2 steps to go...
This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
- Sedat -
^ permalink raw reply
* [PATCH net-next 1/2] net: sctp: convert sctp_checksum_disable module param into sctp sysctl
From: Daniel Borkmann @ 2013-08-06 19:18 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-sctp
Get rid of the last module parameter for SCTP and make this
configurable via sysctl for SCTP like all the rest of SCTP's
configuration knobs.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
Documentation/networking/ip-sysctl.txt | 8 ++++++++
include/net/netns/sctp.h | 3 +++
include/net/sctp/structs.h | 5 -----
net/sctp/input.c | 4 ++--
net/sctp/output.c | 5 ++++-
net/sctp/protocol.c | 5 +++--
net/sctp/sysctl.c | 10 +++++++++-
7 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 36be26b..6f5b813 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1507,6 +1507,14 @@ sack_timeout - INTEGER
Default: 200
+checksum_disable - BOOLEAN
+ Disable SCTP checksum computing and verification for debugging purpose.
+
+ 1: Disable checksumming
+ 0: Enable checksumming
+
+ Default: 0
+
valid_cookie_life - INTEGER
The default lifetime of the SCTP cookie (in milliseconds). The cookie
is used during association establishment.
diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
index 3573a81..ebfdf1e 100644
--- a/include/net/netns/sctp.h
+++ b/include/net/netns/sctp.h
@@ -129,6 +129,9 @@ struct netns_sctp {
/* Threshold for autoclose timeout, in seconds. */
unsigned long max_autoclose;
+
+ /* Flag to disable SCTP checksumming. */
+ int checksum_disable;
};
#endif /* __NETNS_SCTP_H__ */
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index d9c93a7..06ebeaa 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -141,10 +141,6 @@ extern struct sctp_globals {
/* This is the sctp port control hash. */
int port_hashsize;
struct sctp_bind_hashbucket *port_hashtable;
-
- /* Flag to indicate whether computing and verifying checksum
- * is disabled. */
- bool checksum_disable;
} sctp_globals;
#define sctp_max_instreams (sctp_globals.max_instreams)
@@ -156,7 +152,6 @@ extern struct sctp_globals {
#define sctp_assoc_hashtable (sctp_globals.assoc_hashtable)
#define sctp_port_hashsize (sctp_globals.port_hashsize)
#define sctp_port_hashtable (sctp_globals.port_hashtable)
-#define sctp_checksum_disable (sctp_globals.checksum_disable)
/* SCTP Socket type: UDP or TCP style. */
typedef enum {
diff --git a/net/sctp/input.c b/net/sctp/input.c
index fa91aff..b9a25e1 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -140,8 +140,8 @@ int sctp_rcv(struct sk_buff *skb)
__skb_pull(skb, skb_transport_offset(skb));
if (skb->len < sizeof(struct sctphdr))
goto discard_it;
- if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
- sctp_rcv_checksum(net, skb) < 0)
+ if (!net->sctp.checksum_disable && !skb_csum_unnecessary(skb) &&
+ sctp_rcv_checksum(net, skb) < 0)
goto discard_it;
skb_pull(skb, sizeof(struct sctphdr));
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 5a55c55d..cdb5f49 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -395,6 +395,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
int padding; /* How much padding do we need? */
__u8 has_data = 0;
struct dst_entry *dst = tp->dst;
+ struct net *net;
unsigned char *auth = NULL; /* pointer to auth in skb data */
__u32 cksum_buf_len = sizeof(struct sctphdr);
@@ -541,7 +542,9 @@ int sctp_packet_transmit(struct sctp_packet *packet)
* Note: Adler-32 is no longer applicable, as has been replaced
* by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
*/
- if (!sctp_checksum_disable) {
+ net = dev_net(dst->dev);
+
+ if (!net->sctp.checksum_disable) {
if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {
__u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index b52ec25..a570a63 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1193,6 +1193,9 @@ static int __net_init sctp_net_init(struct net *net)
/* Whether Cookie Preservative is enabled(1) or not(0) */
net->sctp.cookie_preserve_enable = 1;
+ /* Whether SCTP checksumming is disabled(1) or not(0) */
+ net->sctp.checksum_disable = 0;
+
/* Default sctp sockets to use md5 as their hmac alg */
#if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
net->sctp.sctp_hmac_alg = "md5";
@@ -1549,6 +1552,4 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132");
MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132");
MODULE_AUTHOR("Linux Kernel SCTP developers <linux-sctp@vger.kernel.org>");
MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
-module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
-MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
MODULE_LICENSE("GPL");
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 1906747..754809a 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -296,7 +296,15 @@ static struct ctl_table sctp_net_table[] = {
.extra1 = &max_autoclose_min,
.extra2 = &max_autoclose_max,
},
-
+ {
+ .procname = "checksum_disable",
+ .data = &init_net.sctp.checksum_disable,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = &zero,
+ .extra2 = &one,
+ },
{ /* sentinel */ }
};
--
1.7.11.7
^ permalink raw reply related
* [PATCH net-next 2/2] net: sctp: trivial: update bug report in header comment
From: Daniel Borkmann @ 2013-08-06 19:18 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-sctp
In-Reply-To: <1375816693-7697-1-git-send-email-dborkman@redhat.com>
With the restructuring of the lksctp.org site, we only allow bug
reports through the SCTP mailing list linux-sctp@vger.kernel.org,
not via SF, as SF is only used for web hosting and nothing more.
While at it, also remove the obvious statement that bugs will be
fixed and incooperated into the kernel.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
include/net/sctp/auth.h | 6 ------
include/net/sctp/checksum.h | 6 ------
include/net/sctp/command.h | 18 ++++++++----------
include/net/sctp/constants.h | 6 ------
include/net/sctp/sctp.h | 6 ------
include/net/sctp/sm.h | 6 ------
include/net/sctp/structs.h | 6 ------
include/net/sctp/tsnmap.h | 6 ------
include/net/sctp/ulpevent.h | 6 ------
include/net/sctp/ulpqueue.h | 6 ------
net/sctp/associola.c | 6 ------
net/sctp/auth.c | 6 ------
net/sctp/bind_addr.c | 6 ------
net/sctp/chunk.c | 6 ------
net/sctp/command.c | 6 ------
net/sctp/debug.c | 6 ------
net/sctp/endpointola.c | 6 ------
net/sctp/input.c | 6 ------
net/sctp/inqueue.c | 6 ------
net/sctp/ipv6.c | 6 ------
net/sctp/objcnt.c | 6 ------
net/sctp/output.c | 6 ------
net/sctp/outqueue.c | 6 ------
net/sctp/primitive.c | 6 ------
net/sctp/proc.c | 6 ------
net/sctp/protocol.c | 6 ------
net/sctp/sm_make_chunk.c | 6 ------
net/sctp/sm_sideeffect.c | 6 ------
net/sctp/sm_statefuns.c | 6 ------
net/sctp/sm_statetable.c | 6 ------
net/sctp/socket.c | 6 ------
net/sctp/ssnmap.c | 6 ------
net/sctp/sysctl.c | 6 ------
net/sctp/transport.c | 6 ------
net/sctp/tsnmap.c | 6 ------
net/sctp/ulpevent.c | 6 ------
net/sctp/ulpqueue.c | 6 ------
37 files changed, 8 insertions(+), 226 deletions(-)
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h
index 754c511..aa80bef 100644
--- a/include/net/sctp/auth.h
+++ b/include/net/sctp/auth.h
@@ -24,14 +24,8 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Vlad Yasevich <vladislav.yasevich@hp.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_auth_h__
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h
index 483e630..259924d 100644
--- a/include/net/sctp/checksum.h
+++ b/include/net/sctp/checksum.h
@@ -27,9 +27,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Dinakaran Joseph
* Jon Grimm <jgrimm@us.ibm.com>
@@ -37,9 +34,6 @@
*
* Rewritten to use libcrc32c by:
* Vlad Yasevich <vladislav.yasevich@hp.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_checksum_h__
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 3524727..832f219 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -23,19 +23,17 @@
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
- * Please send any bug reports or fixes you make to one of the
- * following email addresses:
+ * Please send any bug reports or fixes you make to the
+ * email address(es):
+ * lksctp developers <linux-sctp@vger.kernel.org>
*
- * La Monte H.P. Yarroll <piggy@acm.org>
- * Karl Knutson <karl@athena.chicago.il.us>
- * Ardelle Fan <ardelle.fan@intel.com>
- * Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
+ * Written or modified by:
+ * La Monte H.P. Yarroll <piggy@acm.org>
+ * Karl Knutson <karl@athena.chicago.il.us>
+ * Ardelle Fan <ardelle.fan@intel.com>
+ * Sridhar Samudrala <sri@us.ibm.com>
*/
-
#ifndef __net_sctp_command_h__
#define __net_sctp_command_h__
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index a1e7aa5..2f0a565 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -27,9 +27,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -39,9 +36,6 @@
* Xingang Guo <xingang.guo@intel.com>
* Sridhar Samudrala <samudrala@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_constants_h__
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index cb28df9..3794c5a 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -29,9 +29,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Xingang Guo <xingang.guo@intel.com>
@@ -41,9 +38,6 @@
* Ardelle Fan <ardelle.fan@intel.com>
* Ryan Layer <rmlayer@us.ibm.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __net_sctp_h__
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 2aa66dd..4ef75af 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -29,9 +29,6 @@
* email addresses:
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -42,9 +39,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 06ebeaa..78eedf0 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -27,9 +27,6 @@
* email addresses:
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Randall Stewart <randall@sctp.chicago.il.us>
* Ken Morneau <kmorneau@cisco.com>
@@ -46,9 +43,6 @@
* Ryan Layer <rmlayer@us.ibm.com>
* Anup Pemmaiah <pemmaiah@cc.usu.edu>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_structs_h__
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
index c361d6f..54bbbe5 100644
--- a/include/net/sctp/tsnmap.h
+++ b/include/net/sctp/tsnmap.h
@@ -30,17 +30,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <net/sctp/constants.h>
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h
index 34f0d34..27b9f5c 100644
--- a/include/net/sctp/ulpevent.h
+++ b/include/net/sctp/ulpevent.h
@@ -33,17 +33,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_ulpevent_h__
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h
index add3237..b0cf5d5 100644
--- a/include/net/sctp/ulpqueue.h
+++ b/include/net/sctp/ulpqueue.h
@@ -32,16 +32,10 @@
* email addresses:
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#ifndef __sctp_ulpqueue_h__
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index e425ba0..e051920 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -43,9 +40,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Ryan Layer <rmlayer@us.ibm.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index 3aab967..8c4fa5d 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -24,14 +24,8 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Vlad Yasevich <vladislav.yasevich@hp.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/slab.h>
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index f34ce8b..077bb07 100644
--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -29,17 +29,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Jon Grimm <jgrimm@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index b50b90c..bd0bdd0 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -26,15 +26,9 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/command.c b/net/sctp/command.c
index f4bebda..3d9a9ff 100644
--- a/net/sctp/command.c
+++ b/net/sctp/command.c
@@ -27,15 +27,9 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/debug.c b/net/sctp/debug.c
index 44aa4e7..e89015d 100644
--- a/net/sctp/debug.c
+++ b/net/sctp/debug.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -40,9 +37,6 @@
* Jon Grimm <jgrimm@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <net/sctp/sctp.h>
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 825b754..09b8daa 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -31,18 +31,12 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Jon Grimm <jgrimm@austin.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
* Dajiang Zhang <dajiang.zhang@nokia.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/input.c b/net/sctp/input.c
index b9a25e1..2873e22 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -31,9 +31,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -43,9 +40,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index e70f60a..5856932 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -32,15 +32,9 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 5a9402e..da613ce 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -29,9 +29,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Le Yanqun <yanqun.le@nokia.com>
* Hui Huang <hui.huang@nokia.com>
@@ -42,9 +39,6 @@
*
* Based on:
* linux/net/ipv6/tcp_ipv6.c
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
index aec346c..5ea573b 100644
--- a/net/sctp/objcnt.c
+++ b/net/sctp/objcnt.c
@@ -28,14 +28,8 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/output.c b/net/sctp/output.c
index cdb5f49..e35b84c 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -28,17 +28,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Jon Grimm <jgrimm@austin.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 5131323..94df758 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -41,9 +38,6 @@
* Hui Huang <hui.huang@nokia.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Jon Grimm <jgrimm@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/primitive.c b/net/sctp/primitive.c
index 31fa437..ce1ffd8 100644
--- a/net/sctp/primitive.c
+++ b/net/sctp/primitive.c
@@ -31,18 +31,12 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Narasimha Budihal <narasimha@refcode.org>
* Karl Knutson <karl@athena.chicago.il.us>
* Ardelle Fan <ardelle.fan@intel.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index aff0cac..82432bf 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -24,14 +24,8 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index a570a63..5448297 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -31,9 +31,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -41,9 +38,6 @@
* Sridhar Samudrala <sri@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 780a2d4..9c13133 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -31,9 +31,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -45,9 +42,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index f1f3aac..666c668 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -42,9 +39,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 93271f0..dfe3f36 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -45,9 +42,6 @@
* Ardelle Fan <ardelle.fan@intel.com>
* Ryan Layer <rmlayer@us.ibm.com>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index 64ea5fd..c5999b2 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -30,9 +30,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -41,9 +38,6 @@
* Daisy Chang <daisyc@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0245712..d5d5882 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -36,9 +36,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Narasimha Budihal <narsi@refcode.org>
@@ -52,9 +49,6 @@
* Ryan Layer <rmlayer@us.ibm.com>
* Anup Pemmaiah <pemmaiah@cc.usu.edu>
* Kevin Gao <kevin.gao@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/ssnmap.c b/net/sctp/ssnmap.c
index 72b5939..6007124 100644
--- a/net/sctp/ssnmap.c
+++ b/net/sctp/ssnmap.c
@@ -26,14 +26,8 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/types.h>
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 754809a..1b1ee76 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -27,18 +27,12 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Mingqin Liu <liuming@us.ibm.com>
* Jon Grimm <jgrimm@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
* Ryan Layer <rmlayer@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <net/sctp/structs.h>
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 9602c52..6836ead 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -32,9 +32,6 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
@@ -43,9 +40,6 @@
* Hui Huang <hui.huang@nokia.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
index 0eff866..fbda200 100644
--- a/net/sctp/tsnmap.c
+++ b/net/sctp/tsnmap.c
@@ -29,17 +29,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Jon Grimm <jgrimm@us.ibm.com>
* Karl Knutson <karl@athena.chicago.il.us>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/slab.h>
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
index c07624f..81089ed 100644
--- a/net/sctp/ulpevent.c
+++ b/net/sctp/ulpevent.c
@@ -30,17 +30,11 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Ardelle Fan <ardelle.fan@intel.com>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/slab.h>
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 2cdb301..1c1484e 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -29,16 +29,10 @@
* email address(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
- * Or submit a bug report through the following website:
- * http://www.sf.net/projects/lksctp
- *
* Written or modified by:
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Sridhar Samudrala <sri@us.ibm.com>
- *
- * Any bugs reported given to us we will try to fix... any fixes shared will
- * be incorporated into the next SCTP release.
*/
#include <linux/slab.h>
--
1.7.11.7
^ permalink raw reply related
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 19:18 UTC (permalink / raw)
To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUXaTYVc_iv3hny6Je9mVdX8KCVpFSNBeukS+Fh-347Wvw@mail.gmail.com>
On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
> >
> >> Attached is a diff comparing all new commits in next-20130805.
> >> If one of the commits smells bad to you, please let me know.
> >
> > Out of that list, only the af_packet changes would seem to have any
> > impact on wireless at all.
> >
>
> git-bisecting... 2 steps to go...
>
> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
That seems weird, does reverting it fix it?
johannes
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: sctp: convert sctp_checksum_disable module param into sctp sysctl
From: Vlad Yasevich @ 2013-08-06 19:31 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: davem, netdev, linux-sctp
In-Reply-To: <1375816693-7697-1-git-send-email-dborkman@redhat.com>
On 08/06/2013 03:18 PM, Daniel Borkmann wrote:
> Get rid of the last module parameter for SCTP and make this
> configurable via sysctl for SCTP like all the rest of SCTP's
> configuration knobs.
>
But this isn't like the rest of the sctp knobs. Disabling this violates
the base protocol and we don't really want to encourage
people to do this.
There was a long discussion about it back in 2009 when the original
patch was submitted that proposed a sysctl. Nothing has changed since
then to convince me that this sysctl would be a good idea.
-vlad
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
> Documentation/networking/ip-sysctl.txt | 8 ++++++++
> include/net/netns/sctp.h | 3 +++
> include/net/sctp/structs.h | 5 -----
> net/sctp/input.c | 4 ++--
> net/sctp/output.c | 5 ++++-
> net/sctp/protocol.c | 5 +++--
> net/sctp/sysctl.c | 10 +++++++++-
> 7 files changed, 29 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> index 36be26b..6f5b813 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1507,6 +1507,14 @@ sack_timeout - INTEGER
>
> Default: 200
>
> +checksum_disable - BOOLEAN
> + Disable SCTP checksum computing and verification for debugging purpose.
> +
> + 1: Disable checksumming
> + 0: Enable checksumming
> +
> + Default: 0
> +
> valid_cookie_life - INTEGER
> The default lifetime of the SCTP cookie (in milliseconds). The cookie
> is used during association establishment.
> diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
> index 3573a81..ebfdf1e 100644
> --- a/include/net/netns/sctp.h
> +++ b/include/net/netns/sctp.h
> @@ -129,6 +129,9 @@ struct netns_sctp {
>
> /* Threshold for autoclose timeout, in seconds. */
> unsigned long max_autoclose;
> +
> + /* Flag to disable SCTP checksumming. */
> + int checksum_disable;
> };
>
> #endif /* __NETNS_SCTP_H__ */
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index d9c93a7..06ebeaa 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -141,10 +141,6 @@ extern struct sctp_globals {
> /* This is the sctp port control hash. */
> int port_hashsize;
> struct sctp_bind_hashbucket *port_hashtable;
> -
> - /* Flag to indicate whether computing and verifying checksum
> - * is disabled. */
> - bool checksum_disable;
> } sctp_globals;
>
> #define sctp_max_instreams (sctp_globals.max_instreams)
> @@ -156,7 +152,6 @@ extern struct sctp_globals {
> #define sctp_assoc_hashtable (sctp_globals.assoc_hashtable)
> #define sctp_port_hashsize (sctp_globals.port_hashsize)
> #define sctp_port_hashtable (sctp_globals.port_hashtable)
> -#define sctp_checksum_disable (sctp_globals.checksum_disable)
>
> /* SCTP Socket type: UDP or TCP style. */
> typedef enum {
> diff --git a/net/sctp/input.c b/net/sctp/input.c
> index fa91aff..b9a25e1 100644
> --- a/net/sctp/input.c
> +++ b/net/sctp/input.c
> @@ -140,8 +140,8 @@ int sctp_rcv(struct sk_buff *skb)
> __skb_pull(skb, skb_transport_offset(skb));
> if (skb->len < sizeof(struct sctphdr))
> goto discard_it;
> - if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
> - sctp_rcv_checksum(net, skb) < 0)
> + if (!net->sctp.checksum_disable && !skb_csum_unnecessary(skb) &&
> + sctp_rcv_checksum(net, skb) < 0)
> goto discard_it;
>
> skb_pull(skb, sizeof(struct sctphdr));
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index 5a55c55d..cdb5f49 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -395,6 +395,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
> int padding; /* How much padding do we need? */
> __u8 has_data = 0;
> struct dst_entry *dst = tp->dst;
> + struct net *net;
> unsigned char *auth = NULL; /* pointer to auth in skb data */
> __u32 cksum_buf_len = sizeof(struct sctphdr);
>
> @@ -541,7 +542,9 @@ int sctp_packet_transmit(struct sctp_packet *packet)
> * Note: Adler-32 is no longer applicable, as has been replaced
> * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
> */
> - if (!sctp_checksum_disable) {
> + net = dev_net(dst->dev);
> +
> + if (!net->sctp.checksum_disable) {
> if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {
> __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
>
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index b52ec25..a570a63 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1193,6 +1193,9 @@ static int __net_init sctp_net_init(struct net *net)
> /* Whether Cookie Preservative is enabled(1) or not(0) */
> net->sctp.cookie_preserve_enable = 1;
>
> + /* Whether SCTP checksumming is disabled(1) or not(0) */
> + net->sctp.checksum_disable = 0;
> +
> /* Default sctp sockets to use md5 as their hmac alg */
> #if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
> net->sctp.sctp_hmac_alg = "md5";
> @@ -1549,6 +1552,4 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132");
> MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132");
> MODULE_AUTHOR("Linux Kernel SCTP developers <linux-sctp@vger.kernel.org>");
> MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
> -module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
> -MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
> MODULE_LICENSE("GPL");
> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
> index 1906747..754809a 100644
> --- a/net/sctp/sysctl.c
> +++ b/net/sctp/sysctl.c
> @@ -296,7 +296,15 @@ static struct ctl_table sctp_net_table[] = {
> .extra1 = &max_autoclose_min,
> .extra2 = &max_autoclose_max,
> },
> -
> + {
> + .procname = "checksum_disable",
> + .data = &init_net.sctp.checksum_disable,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = proc_dointvec_minmax,
> + .extra1 = &zero,
> + .extra2 = &one,
> + },
> { /* sentinel */ }
> };
>
>
^ permalink raw reply
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:32 UTC (permalink / raw)
To: Johannes Berg, Phil Sutter
Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375816715.8219.29.camel@jlt4.sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]
On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>> >
>> >> Attached is a diff comparing all new commits in next-20130805.
>> >> If one of the commits smells bad to you, please let me know.
>> >
>> > Out of that list, only the af_packet changes would seem to have any
>> > impact on wireless at all.
>> >
>>
>> git-bisecting... 2 steps to go...
>>
>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>>
>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>
> That seems weird, does reverting it fix it?
>
[ TO Phil Sutter ]
This was 3/3 of af_packet patches :-).
So, the culprit commit is...
0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
Author: Phil Sutter <phil@nwl.cc>
Date: Fri Aug 2 11:37:39 2013 +0200
af_packet: when sending ethernet frames, parse header for skb->protocol
This may be necessary when the SKB is passed to other layers on the go,
which check the protocol field on their own. An example is a VLAN packet
sent out using AF_PACKET on a bridge interface. The bridging code checks
the SKB size, accounting for any VLAN header only if the protocol field
is set accordingly.
Note that eth_type_trans() sets skb->dev to the passed argument, so this
can be skipped in packet_snd() for ethernet frames, as well.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
:040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
1f302ebd62a87b9e874a3e61203499e17d6fce3c M net
- Sedat -
[-- Attachment #2: git-bisect-log.txt --]
[-- Type: text/plain, Size: 1834 bytes --]
git bisect start
# good: [88825c70d47953e7f38b86fb2ef00623439217d0] Merge remote-tracking branch 'wireless/master'
git bisect good 88825c70d47953e7f38b86fb2ef00623439217d0
# good: [3580d2439702fa29efcbce9e2bb1bceb2688d352] Merge remote-tracking branch 'slave-dma/next'
git bisect good 3580d2439702fa29efcbce9e2bb1bceb2688d352
# good: [88825c70d47953e7f38b86fb2ef00623439217d0] Merge remote-tracking branch 'wireless/master'
git bisect good 88825c70d47953e7f38b86fb2ef00623439217d0
# good: [3580d2439702fa29efcbce9e2bb1bceb2688d352] Merge remote-tracking branch 'slave-dma/next'
git bisect good 3580d2439702fa29efcbce9e2bb1bceb2688d352
# good: [a594e4f8c31c400024293b2e97fc7d3faaae74da] Merge branch 'bond_rcu'
git bisect good a594e4f8c31c400024293b2e97fc7d3faaae74da
# bad: [7f84622b9ac741614e7d066f7e8511d054f513ec] Merge remote-tracking branch 'net-next/master'
git bisect bad 7f84622b9ac741614e7d066f7e8511d054f513ec
# bad: [c483e02614551e44ced3fe6eedda8e36d3277ccc] af_packet: simplify VLAN frame check in packet_snd
git bisect bad c483e02614551e44ced3fe6eedda8e36d3277ccc
# good: [e216975ad97cfcfc436789aa66d59a0e93f337f7] uapi: Convert some uses of 6 to ETH_ALEN
git bisect good e216975ad97cfcfc436789aa66d59a0e93f337f7
# good: [ba5082c71476891623757956ebfc36040ac317e2] Merge branch 'eth_alen'
git bisect good ba5082c71476891623757956ebfc36040ac317e2
# bad: [0f75b09c798ed00c30d7d5551b896be883bc2aeb] af_packet: when sending ethernet frames, parse header for skb->protocol
git bisect bad 0f75b09c798ed00c30d7d5551b896be883bc2aeb
# good: [d27fc78208b53ccdfd6a57d4ac44a459ca66806f] sctp: Don't lookup dst if transport dst is still valid
git bisect good d27fc78208b53ccdfd6a57d4ac44a459ca66806f
# first bad commit: [0f75b09c798ed00c30d7d5551b896be883bc2aeb] af_packet: when sending ethernet frames, parse header for skb->protocol
[-- Attachment #3: git-bisect-visualize.txt --]
[-- Type: text/plain, Size: 786 bytes --]
commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
Author: Phil Sutter <phil@nwl.cc>
Date: Fri Aug 2 11:37:39 2013 +0200
af_packet: when sending ethernet frames, parse header for skb->protocol
This may be necessary when the SKB is passed to other layers on the go,
which check the protocol field on their own. An example is a VLAN packet
sent out using AF_PACKET on a bridge interface. The bridging code checks
the SKB size, accounting for any VLAN header only if the protocol field
is set accordingly.
Note that eth_type_trans() sets skb->dev to the passed argument, so this
can be skipped in packet_snd() for ethernet frames, as well.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH net-next 2/2] net: sctp: trivial: update bug report in header comment
From: Vlad Yasevich @ 2013-08-06 19:33 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: davem, netdev, linux-sctp
In-Reply-To: <1375816693-7697-2-git-send-email-dborkman@redhat.com>
On 08/06/2013 03:18 PM, Daniel Borkmann wrote:
> With the restructuring of the lksctp.org site, we only allow bug
> reports through the SCTP mailing list linux-sctp@vger.kernel.org,
> not via SF, as SF is only used for web hosting and nothing more.
> While at it, also remove the obvious statement that bugs will be
> fixed and incooperated into the kernel.
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
^ permalink raw reply
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:47 UTC (permalink / raw)
To: Johannes Berg, Phil Sutter
Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUXdAjEDgu2XrA4Dg2hsLDJYdFTCpJwiW6=ZUgULe2noyw@mail.gmail.com>
On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>>> >
>>> >> Attached is a diff comparing all new commits in next-20130805.
>>> >> If one of the commits smells bad to you, please let me know.
>>> >
>>> > Out of that list, only the af_packet changes would seem to have any
>>> > impact on wireless at all.
>>> >
>>>
>>> git-bisecting... 2 steps to go...
>>>
>>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>>>
>>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>>
>> That seems weird, does reverting it fix it?
>>
>
> [ TO Phil Sutter ]
>
> This was 3/3 of af_packet patches :-).
>
> So, the culprit commit is...
>
> 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
> commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
> Author: Phil Sutter <phil@nwl.cc>
> Date: Fri Aug 2 11:37:39 2013 +0200
>
> af_packet: when sending ethernet frames, parse header for skb->protocol
>
> This may be necessary when the SKB is passed to other layers on the go,
> which check the protocol field on their own. An example is a VLAN packet
> sent out using AF_PACKET on a bridge interface. The bridging code checks
> the SKB size, accounting for any VLAN header only if the protocol field
> is set accordingly.
>
> Note that eth_type_trans() sets skb->dev to the passed argument, so this
> can be skipped in packet_snd() for ethernet frames, as well.
>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
> 1f302ebd62a87b9e874a3e61203499e17d6fce3c M net
>
> - Sedat -
[ net/packet/af_packet.c ]
...
#include <linux/if_arp.h>
$ find include/ -name if_arp.h
include/uapi/linux/if_arp.h
include/linux/if_arp.h
$ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
-rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
-rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h
$ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
include/uapi/linux/if_arp.h:#define ARPHRD_ETHER 1
/* Ethernet 10Mbps */
Wrong include?
- Sedat -
^ permalink raw reply
* [PATCH v2 net-next] net: Add low-latency/polling support for UDP multicast
From: Shawn Bohrer @ 2013-08-06 19:51 UTC (permalink / raw)
To: davem; +Cc: eliezer.tamir, netdev, Amir Vadai, tomk, Shawn Bohrer
In-Reply-To: <5200A203.2090306@linux.intel.com>
Set the napi id for each socket in the multicast path to enable
low-latency/polling support.
Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
v2 include ipv6 support
net/ipv4/udp.c | 1 +
net/ipv6/udp.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 766e6ba..0d0da17 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1596,6 +1596,7 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
dif = skb->dev->ifindex;
sk = udp_v4_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif);
while (sk) {
+ sk_mark_napi_id(sk, skb);
stack[count++] = sk;
sk = udp_v4_mcast_next(net, sk_nulls_next(sk), uh->dest,
daddr, uh->source, saddr, dif);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index f405815..82be372 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -756,6 +756,7 @@ static int __udp6_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
dif = inet6_iif(skb);
sk = udp_v6_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif);
while (sk) {
+ sk_mark_napi_id(sk, skb);
stack[count++] = sk;
sk = udp_v6_mcast_next(net, sk_nulls_next(sk), uh->dest, daddr,
uh->source, saddr, dif);
--
1.7.7.6
--
---------------------------------------------------------------
This email, along with any attachments, is confidential. If you
believe you received this message in error, please contact the
sender immediately and delete all copies of the message.
Thank you.
^ permalink raw reply related
* Re: [PATCH net-next 1/2] net: sctp: convert sctp_checksum_disable module param into sctp sysctl
From: Daniel Borkmann @ 2013-08-06 20:19 UTC (permalink / raw)
To: Vlad Yasevich; +Cc: davem, netdev, linux-sctp
In-Reply-To: <52014F0E.6040101@gmail.com>
On 08/06/2013 09:31 PM, Vlad Yasevich wrote:
> On 08/06/2013 03:18 PM, Daniel Borkmann wrote:
>> Get rid of the last module parameter for SCTP and make this
>> configurable via sysctl for SCTP like all the rest of SCTP's
>> configuration knobs.
>>
>
> But this isn't like the rest of the sctp knobs. Disabling this violates the base protocol and we don't really want to encourage
> people to do this.
>
> There was a long discussion about it back in 2009 when the original
> patch was submitted that proposed a sysctl. Nothing has changed since
> then to convince me that this sysctl would be a good idea.
Ah, okay. I didn't follow that discussion. Actually both can easily be
set or unset as it's just /sys/module/sctp/parameters/no_checksums, but
I understand your reasoning that sysctl is something more "official".
> -vlad
>
>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>> ---
>> Documentation/networking/ip-sysctl.txt | 8 ++++++++
>> include/net/netns/sctp.h | 3 +++
>> include/net/sctp/structs.h | 5 -----
>> net/sctp/input.c | 4 ++--
>> net/sctp/output.c | 5 ++++-
>> net/sctp/protocol.c | 5 +++--
>> net/sctp/sysctl.c | 10 +++++++++-
>> 7 files changed, 29 insertions(+), 11 deletions(-)
>>
>> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
>> index 36be26b..6f5b813 100644
>> --- a/Documentation/networking/ip-sysctl.txt
>> +++ b/Documentation/networking/ip-sysctl.txt
>> @@ -1507,6 +1507,14 @@ sack_timeout - INTEGER
>>
>> Default: 200
>>
>> +checksum_disable - BOOLEAN
>> + Disable SCTP checksum computing and verification for debugging purpose.
>> +
>> + 1: Disable checksumming
>> + 0: Enable checksumming
>> +
>> + Default: 0
>> +
>> valid_cookie_life - INTEGER
>> The default lifetime of the SCTP cookie (in milliseconds). The cookie
>> is used during association establishment.
>> diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
>> index 3573a81..ebfdf1e 100644
>> --- a/include/net/netns/sctp.h
>> +++ b/include/net/netns/sctp.h
>> @@ -129,6 +129,9 @@ struct netns_sctp {
>>
>> /* Threshold for autoclose timeout, in seconds. */
>> unsigned long max_autoclose;
>> +
>> + /* Flag to disable SCTP checksumming. */
>> + int checksum_disable;
>> };
>>
>> #endif /* __NETNS_SCTP_H__ */
>> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
>> index d9c93a7..06ebeaa 100644
>> --- a/include/net/sctp/structs.h
>> +++ b/include/net/sctp/structs.h
>> @@ -141,10 +141,6 @@ extern struct sctp_globals {
>> /* This is the sctp port control hash. */
>> int port_hashsize;
>> struct sctp_bind_hashbucket *port_hashtable;
>> -
>> - /* Flag to indicate whether computing and verifying checksum
>> - * is disabled. */
>> - bool checksum_disable;
>> } sctp_globals;
>>
>> #define sctp_max_instreams (sctp_globals.max_instreams)
>> @@ -156,7 +152,6 @@ extern struct sctp_globals {
>> #define sctp_assoc_hashtable (sctp_globals.assoc_hashtable)
>> #define sctp_port_hashsize (sctp_globals.port_hashsize)
>> #define sctp_port_hashtable (sctp_globals.port_hashtable)
>> -#define sctp_checksum_disable (sctp_globals.checksum_disable)
>>
>> /* SCTP Socket type: UDP or TCP style. */
>> typedef enum {
>> diff --git a/net/sctp/input.c b/net/sctp/input.c
>> index fa91aff..b9a25e1 100644
>> --- a/net/sctp/input.c
>> +++ b/net/sctp/input.c
>> @@ -140,8 +140,8 @@ int sctp_rcv(struct sk_buff *skb)
>> __skb_pull(skb, skb_transport_offset(skb));
>> if (skb->len < sizeof(struct sctphdr))
>> goto discard_it;
>> - if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
>> - sctp_rcv_checksum(net, skb) < 0)
>> + if (!net->sctp.checksum_disable && !skb_csum_unnecessary(skb) &&
>> + sctp_rcv_checksum(net, skb) < 0)
>> goto discard_it;
>>
>> skb_pull(skb, sizeof(struct sctphdr));
>> diff --git a/net/sctp/output.c b/net/sctp/output.c
>> index 5a55c55d..cdb5f49 100644
>> --- a/net/sctp/output.c
>> +++ b/net/sctp/output.c
>> @@ -395,6 +395,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
>> int padding; /* How much padding do we need? */
>> __u8 has_data = 0;
>> struct dst_entry *dst = tp->dst;
>> + struct net *net;
>> unsigned char *auth = NULL; /* pointer to auth in skb data */
>> __u32 cksum_buf_len = sizeof(struct sctphdr);
>>
>> @@ -541,7 +542,9 @@ int sctp_packet_transmit(struct sctp_packet *packet)
>> * Note: Adler-32 is no longer applicable, as has been replaced
>> * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
>> */
>> - if (!sctp_checksum_disable) {
>> + net = dev_net(dst->dev);
>> +
>> + if (!net->sctp.checksum_disable) {
>> if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {
>> __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
>>
>> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
>> index b52ec25..a570a63 100644
>> --- a/net/sctp/protocol.c
>> +++ b/net/sctp/protocol.c
>> @@ -1193,6 +1193,9 @@ static int __net_init sctp_net_init(struct net *net)
>> /* Whether Cookie Preservative is enabled(1) or not(0) */
>> net->sctp.cookie_preserve_enable = 1;
>>
>> + /* Whether SCTP checksumming is disabled(1) or not(0) */
>> + net->sctp.checksum_disable = 0;
>> +
>> /* Default sctp sockets to use md5 as their hmac alg */
>> #if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
>> net->sctp.sctp_hmac_alg = "md5";
>> @@ -1549,6 +1552,4 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132");
>> MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132");
>> MODULE_AUTHOR("Linux Kernel SCTP developers <linux-sctp@vger.kernel.org>");
>> MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
>> -module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
>> -MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
>> MODULE_LICENSE("GPL");
>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>> index 1906747..754809a 100644
>> --- a/net/sctp/sysctl.c
>> +++ b/net/sctp/sysctl.c
>> @@ -296,7 +296,15 @@ static struct ctl_table sctp_net_table[] = {
>> .extra1 = &max_autoclose_min,
>> .extra2 = &max_autoclose_max,
>> },
>> -
>> + {
>> + .procname = "checksum_disable",
>> + .data = &init_net.sctp.checksum_disable,
>> + .maxlen = sizeof(int),
>> + .mode = 0644,
>> + .proc_handler = proc_dointvec_minmax,
>> + .extra1 = &zero,
>> + .extra2 = &one,
>> + },
>> { /* sentinel */ }
>> };
>>
>>
>
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: sctp: convert sctp_checksum_disable module param into sctp sysctl
From: Michael Tuexen @ 2013-08-06 19:56 UTC (permalink / raw)
To: Vlad Yasevich; +Cc: Daniel Borkmann, davem, netdev, linux-sctp
In-Reply-To: <52014F0E.6040101@gmail.com>
On Aug 6, 2013, at 9:31 PM, Vlad Yasevich <vyasevich@gmail.com> wrote:
> On 08/06/2013 03:18 PM, Daniel Borkmann wrote:
>> Get rid of the last module parameter for SCTP and make this
>> configurable via sysctl for SCTP like all the rest of SCTP's
>> configuration knobs.
>>
>
> But this isn't like the rest of the sctp knobs. Disabling this violates the base protocol and we don't really want to encourage
> people to do this.
>
> There was a long discussion about it back in 2009 when the original
> patch was submitted that proposed a sysctl. Nothing has changed since
> then to convince me that this sysctl would be a good idea.
I agree with Vlad. In FreeBSD this is only a compile time flag
used at the time where no checksum offloading was available
and during research work people wanted to know how the
performance would be when it is available.
Since we have now these nics, not sure if it makes sense
to keep it configurable at all...
Best regards
Michael
>
> -vlad
>
>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>> ---
>> Documentation/networking/ip-sysctl.txt | 8 ++++++++
>> include/net/netns/sctp.h | 3 +++
>> include/net/sctp/structs.h | 5 -----
>> net/sctp/input.c | 4 ++--
>> net/sctp/output.c | 5 ++++-
>> net/sctp/protocol.c | 5 +++--
>> net/sctp/sysctl.c | 10 +++++++++-
>> 7 files changed, 29 insertions(+), 11 deletions(-)
>>
>> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
>> index 36be26b..6f5b813 100644
>> --- a/Documentation/networking/ip-sysctl.txt
>> +++ b/Documentation/networking/ip-sysctl.txt
>> @@ -1507,6 +1507,14 @@ sack_timeout - INTEGER
>>
>> Default: 200
>>
>> +checksum_disable - BOOLEAN
>> + Disable SCTP checksum computing and verification for debugging purpose.
>> +
>> + 1: Disable checksumming
>> + 0: Enable checksumming
>> +
>> + Default: 0
>> +
>> valid_cookie_life - INTEGER
>> The default lifetime of the SCTP cookie (in milliseconds). The cookie
>> is used during association establishment.
>> diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
>> index 3573a81..ebfdf1e 100644
>> --- a/include/net/netns/sctp.h
>> +++ b/include/net/netns/sctp.h
>> @@ -129,6 +129,9 @@ struct netns_sctp {
>>
>> /* Threshold for autoclose timeout, in seconds. */
>> unsigned long max_autoclose;
>> +
>> + /* Flag to disable SCTP checksumming. */
>> + int checksum_disable;
>> };
>>
>> #endif /* __NETNS_SCTP_H__ */
>> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
>> index d9c93a7..06ebeaa 100644
>> --- a/include/net/sctp/structs.h
>> +++ b/include/net/sctp/structs.h
>> @@ -141,10 +141,6 @@ extern struct sctp_globals {
>> /* This is the sctp port control hash. */
>> int port_hashsize;
>> struct sctp_bind_hashbucket *port_hashtable;
>> -
>> - /* Flag to indicate whether computing and verifying checksum
>> - * is disabled. */
>> - bool checksum_disable;
>> } sctp_globals;
>>
>> #define sctp_max_instreams (sctp_globals.max_instreams)
>> @@ -156,7 +152,6 @@ extern struct sctp_globals {
>> #define sctp_assoc_hashtable (sctp_globals.assoc_hashtable)
>> #define sctp_port_hashsize (sctp_globals.port_hashsize)
>> #define sctp_port_hashtable (sctp_globals.port_hashtable)
>> -#define sctp_checksum_disable (sctp_globals.checksum_disable)
>>
>> /* SCTP Socket type: UDP or TCP style. */
>> typedef enum {
>> diff --git a/net/sctp/input.c b/net/sctp/input.c
>> index fa91aff..b9a25e1 100644
>> --- a/net/sctp/input.c
>> +++ b/net/sctp/input.c
>> @@ -140,8 +140,8 @@ int sctp_rcv(struct sk_buff *skb)
>> __skb_pull(skb, skb_transport_offset(skb));
>> if (skb->len < sizeof(struct sctphdr))
>> goto discard_it;
>> - if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
>> - sctp_rcv_checksum(net, skb) < 0)
>> + if (!net->sctp.checksum_disable && !skb_csum_unnecessary(skb) &&
>> + sctp_rcv_checksum(net, skb) < 0)
>> goto discard_it;
>>
>> skb_pull(skb, sizeof(struct sctphdr));
>> diff --git a/net/sctp/output.c b/net/sctp/output.c
>> index 5a55c55d..cdb5f49 100644
>> --- a/net/sctp/output.c
>> +++ b/net/sctp/output.c
>> @@ -395,6 +395,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
>> int padding; /* How much padding do we need? */
>> __u8 has_data = 0;
>> struct dst_entry *dst = tp->dst;
>> + struct net *net;
>> unsigned char *auth = NULL; /* pointer to auth in skb data */
>> __u32 cksum_buf_len = sizeof(struct sctphdr);
>>
>> @@ -541,7 +542,9 @@ int sctp_packet_transmit(struct sctp_packet *packet)
>> * Note: Adler-32 is no longer applicable, as has been replaced
>> * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
>> */
>> - if (!sctp_checksum_disable) {
>> + net = dev_net(dst->dev);
>> +
>> + if (!net->sctp.checksum_disable) {
>> if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {
>> __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
>>
>> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
>> index b52ec25..a570a63 100644
>> --- a/net/sctp/protocol.c
>> +++ b/net/sctp/protocol.c
>> @@ -1193,6 +1193,9 @@ static int __net_init sctp_net_init(struct net *net)
>> /* Whether Cookie Preservative is enabled(1) or not(0) */
>> net->sctp.cookie_preserve_enable = 1;
>>
>> + /* Whether SCTP checksumming is disabled(1) or not(0) */
>> + net->sctp.checksum_disable = 0;
>> +
>> /* Default sctp sockets to use md5 as their hmac alg */
>> #if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
>> net->sctp.sctp_hmac_alg = "md5";
>> @@ -1549,6 +1552,4 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132");
>> MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132");
>> MODULE_AUTHOR("Linux Kernel SCTP developers <linux-sctp@vger.kernel.org>");
>> MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
>> -module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
>> -MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
>> MODULE_LICENSE("GPL");
>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>> index 1906747..754809a 100644
>> --- a/net/sctp/sysctl.c
>> +++ b/net/sctp/sysctl.c
>> @@ -296,7 +296,15 @@ static struct ctl_table sctp_net_table[] = {
>> .extra1 = &max_autoclose_min,
>> .extra2 = &max_autoclose_max,
>> },
>> -
>> + {
>> + .procname = "checksum_disable",
>> + .data = &init_net.sctp.checksum_disable,
>> + .maxlen = sizeof(int),
>> + .mode = 0644,
>> + .proc_handler = proc_dointvec_minmax,
>> + .extra1 = &zero,
>> + .extra2 = &one,
>> + },
>> { /* sentinel */ }
>> };
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: low latency/busy poll feedback and bugs
From: Or Gerlitz @ 2013-08-06 20:39 UTC (permalink / raw)
To: Eliezer Tamir
Cc: Shawn Bohrer, Amir Vadai, netdev, Kirsher, Jeffrey T,
Alexander Duyck, John Fastabend, Rose, Gregory V
In-Reply-To: <5200A8BC.4010402@linux.intel.com>
On Tue, Aug 6, 2013 at 10:41 AM, Eliezer Tamir
<eliezer.tamir@linux.intel.com> wrote:
> On 06/08/2013 00:22, Shawn Bohrer wrote:
>> 1) I'm testing with a Mellanox ConnectX-3 card.
>
> There's your problem ;)
Can you be more specific? I love testing with Intel Niantic, do code
inspetion of the ixgbe driver and interact with Jeff/Greg/Alex/John
and all the other great folks from the Intel Linux networking team,
actually that (happily working with your competitors) is crucial part
of the fun in open source / upstream work. What's wrong with using
NICs which don't have intel.com on their paper cover?
Or.
^ permalink raw reply
* Re: [PATCH net-next 3/3] net: core: fix wrong linkage for ptype_base and ptype_all symbols
From: Jean Sacren @ 2013-08-06 20:45 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: netdev
In-Reply-To: <5200B01B.9080705@redhat.com>
From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 06 Aug 2013 10:13:15 +0200
>
> On 08/06/2013 09:32 AM, Jean Sacren wrote:
> > In commit 900ff8c6 ("net: move procfs code to net/core/net-procfs.c"),
> > it changed the correct linkage of ptype_base and ptype_all symbols to
> > the wrong one in net/core/dev.c, yet failed to change to the correct
> > linkage of those two in net/core/net-procfs.c.
> >
> > Fix the wrong linkage by setting static specifier to both sets of the
> > symbols so that they could have coherent internal linkage by themselves
> > to avoid interference with each other.
>
> Ho? I do not think this is correct, what makes you think so?
Thank you for the awesome comment.
I'm sorry to tell you but the patch is correct. Both symbols of
ptype_{base,all} were wrongly declared as extern in net-procfs.c in the
first place.
> The net-procfs.c usage of ptype_* is there to show current pf_packet users
> via seq_files in procfs. Your patch will just break this.
I validated it before I submitted the patch that all the symbols of
ptype_{base,all} are used exclusively in net/core/net-procfs.c and
net/core/dev.c but not outside of those two places. Therefore, your
assumption for breakage is groundless.
As a kernel networking guru as you are, you shall have the lab and all
sorts of test cases to validate patches. I'd love to run this type of
testing by myself, but I don't have such resources. If you could test
this patch in any of your setup and prove that I'm wrong, I'd extremely
appreciate it. Thank you in advance.
I'm looking forward to being taught more.
--
Jean Sacren
^ permalink raw reply
* Re: low latency/busy poll feedback and bugs
From: Eric Dumazet @ 2013-08-06 21:02 UTC (permalink / raw)
To: Or Gerlitz
Cc: Eliezer Tamir, Shawn Bohrer, Amir Vadai, netdev,
Kirsher, Jeffrey T, Alexander Duyck, John Fastabend,
Rose, Gregory V
In-Reply-To: <CAJZOPZKByh7LzH0w25dDG_5jOvg7wPrmiVcMJ0xBhOJxaE0Zcw@mail.gmail.com>
On Tue, 2013-08-06 at 23:39 +0300, Or Gerlitz wrote:
> On Tue, Aug 6, 2013 at 10:41 AM, Eliezer Tamir
> <eliezer.tamir@linux.intel.com> wrote:
> > On 06/08/2013 00:22, Shawn Bohrer wrote:
> >> 1) I'm testing with a Mellanox ConnectX-3 card.
> >
> > There's your problem ;)
>
> Can you be more specific? I love testing with Intel Niantic, do code
> inspetion of the ixgbe driver and interact with Jeff/Greg/Alex/John
> and all the other great folks from the Intel Linux networking team,
> actually that (happily working with your competitors) is crucial part
> of the fun in open source / upstream work. What's wrong with using
> NICs which don't have intel.com on their paper cover?
I don't think there is something wrong.
Eliezer tone was quite clear ;)
BTW, I do not have a Niantic cards to play with, Intel guys feel free to
send me samples ;)
Thanks
^ permalink raw reply
* Re: [PATCH net-next 3/3] net: core: fix wrong linkage for ptype_base and ptype_all symbols
From: Eric Dumazet @ 2013-08-06 21:06 UTC (permalink / raw)
To: Jean Sacren; +Cc: Daniel Borkmann, netdev
In-Reply-To: <20130806204508.GA2274@mail.gmail.com>
On Tue, 2013-08-06 at 14:45 -0600, Jean Sacren wrote:
> I'm sorry to tell you but the patch is correct. Both symbols of
> ptype_{base,all} were wrongly declared as extern in net-procfs.c in the
> first place.
You are mistaken.
> > The net-procfs.c usage of ptype_* is there to show current pf_packet users
> > via seq_files in procfs. Your patch will just break this.
>
> I validated it before I submitted the patch that all the symbols of
> ptype_{base,all} are used exclusively in net/core/net-procfs.c and
> net/core/dev.c but not outside of those two places. Therefore, your
> assumption for breakage is groundless.
>
> As a kernel networking guru as you are, you shall have the lab and all
> sorts of test cases to validate patches. I'd love to run this type of
> testing by myself, but I don't have such resources. If you could test
> this patch in any of your setup and prove that I'm wrong, I'd extremely
> appreciate it. Thank you in advance.
>
> I'm looking forward to being taught more.
>
Well, the patch is wrong, for sure, and you cannot ask us to test your
patches.
Do not send patches that you cannot test yourself, please.
Try this before/after your patch
cat /proc/net/ptype
^ permalink raw reply
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Phil Sutter @ 2013-08-06 21:29 UTC (permalink / raw)
To: Sedat Dilek
Cc: Johannes Berg, David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUVmokQ1fKmtbuPyp7f5Z2wdFYfjG5HCAm4Kue7efyKV8w@mail.gmail.com>
On Tue, Aug 06, 2013 at 09:47:01PM +0200, Sedat Dilek wrote:
> On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> > On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
> >>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
> >>> >
> >>> >> Attached is a diff comparing all new commits in next-20130805.
> >>> >> If one of the commits smells bad to you, please let me know.
> >>> >
> >>> > Out of that list, only the af_packet changes would seem to have any
> >>> > impact on wireless at all.
> >>> >
> >>>
> >>> git-bisecting... 2 steps to go...
> >>>
> >>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
> >>>
> >>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
> >>
> >> That seems weird, does reverting it fix it?
> >>
> >
> > [ TO Phil Sutter ]
> >
> > This was 3/3 of af_packet patches :-).
> >
> > So, the culprit commit is...
> >
> > 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
> > commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
> > Author: Phil Sutter <phil@nwl.cc>
> > Date: Fri Aug 2 11:37:39 2013 +0200
> >
> > af_packet: when sending ethernet frames, parse header for skb->protocol
> >
> > This may be necessary when the SKB is passed to other layers on the go,
> > which check the protocol field on their own. An example is a VLAN packet
> > sent out using AF_PACKET on a bridge interface. The bridging code checks
> > the SKB size, accounting for any VLAN header only if the protocol field
> > is set accordingly.
> >
> > Note that eth_type_trans() sets skb->dev to the passed argument, so this
> > can be skipped in packet_snd() for ethernet frames, as well.
> >
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> > :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
> > 1f302ebd62a87b9e874a3e61203499e17d6fce3c M net
> >
> > - Sedat -
>
> [ net/packet/af_packet.c ]
> ...
> #include <linux/if_arp.h>
>
> $ find include/ -name if_arp.h
> include/uapi/linux/if_arp.h
> include/linux/if_arp.h
>
> $ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
> -rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
> -rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h
>
> $ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
> include/uapi/linux/if_arp.h:#define ARPHRD_ETHER 1
> /* Ethernet 10Mbps */
>
> Wrong include?
Nope, <linux/if_arp.h> includes <uapi/linux/if_arp.h>. I suppose there
is a semantical problem here.
Did you verify your bisect by reverting just the three patches?
Does the problem occur on client or server side? AFAICT, hostapd as well
as wpa_supplicant use AF_PACKET.
The tricky thing is, these patches are meant to *loosen* the
restrictions in af_packet.c, so *should* not be harmful. So either my
patches create a side effect I did not foresee, or it's something nasty
(too much delay introduced by calling eth_type_trans() or so).
Could you please provide steps on how to reproduce the faulty behaviour?
Best wishes, Phil
^ permalink raw reply
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 21:40 UTC (permalink / raw)
To: Sedat Dilek, Johannes Berg, David Miller, Stephen Rothwell,
wireless, netdev
In-Reply-To: <20130806213006.078C72210F@mail.nwl.cc>
[-- Attachment #1: Type: text/plain, Size: 3648 bytes --]
On Tue, Aug 6, 2013 at 11:29 PM, Phil Sutter <phil@nwl.cc> wrote:
> On Tue, Aug 06, 2013 at 09:47:01PM +0200, Sedat Dilek wrote:
>> On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> > On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> >> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>> >>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> >>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>> >>> >
>> >>> >> Attached is a diff comparing all new commits in next-20130805.
>> >>> >> If one of the commits smells bad to you, please let me know.
>> >>> >
>> >>> > Out of that list, only the af_packet changes would seem to have any
>> >>> > impact on wireless at all.
>> >>> >
>> >>>
>> >>> git-bisecting... 2 steps to go...
>> >>>
>> >>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>> >>>
>> >>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>> >>
>> >> That seems weird, does reverting it fix it?
>> >>
>> >
>> > [ TO Phil Sutter ]
>> >
>> > This was 3/3 of af_packet patches :-).
>> >
>> > So, the culprit commit is...
>> >
>> > 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
>> > commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
>> > Author: Phil Sutter <phil@nwl.cc>
>> > Date: Fri Aug 2 11:37:39 2013 +0200
>> >
>> > af_packet: when sending ethernet frames, parse header for skb->protocol
>> >
>> > This may be necessary when the SKB is passed to other layers on the go,
>> > which check the protocol field on their own. An example is a VLAN packet
>> > sent out using AF_PACKET on a bridge interface. The bridging code checks
>> > the SKB size, accounting for any VLAN header only if the protocol field
>> > is set accordingly.
>> >
>> > Note that eth_type_trans() sets skb->dev to the passed argument, so this
>> > can be skipped in packet_snd() for ethernet frames, as well.
>> >
>> > Signed-off-by: Phil Sutter <phil@nwl.cc>
>> > Signed-off-by: David S. Miller <davem@davemloft.net>
>> >
>> > :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
>> > 1f302ebd62a87b9e874a3e61203499e17d6fce3c M net
>> >
>> > - Sedat -
>>
>> [ net/packet/af_packet.c ]
>> ...
>> #include <linux/if_arp.h>
>>
>> $ find include/ -name if_arp.h
>> include/uapi/linux/if_arp.h
>> include/linux/if_arp.h
>>
>> $ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
>> -rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
>> -rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h
>>
>> $ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
>> include/uapi/linux/if_arp.h:#define ARPHRD_ETHER 1
>> /* Ethernet 10Mbps */
>>
>> Wrong include?
>
> Nope, <linux/if_arp.h> includes <uapi/linux/if_arp.h>. I suppose there
> is a semantical problem here.
>
> Did you verify your bisect by reverting just the three patches?
>
> Does the problem occur on client or server side? AFAICT, hostapd as well
> as wpa_supplicant use AF_PACKET.
>
> The tricky thing is, these patches are meant to *loosen* the
> restrictions in af_packet.c, so *should* not be harmful. So either my
> patches create a side effect I did not foresee, or it's something nasty
> (too much delay introduced by calling eth_type_trans() or so).
>
> Could you please provide steps on how to reproduce the faulty behaviour?
>
By reverting the culprit commit my network/wifi is fine, again.
See also attached patch with changelog.
- Sedat -
[-- Attachment #2: 0001-Revert-af_packet-when-sending-ethernet-frames-parse-.patch --]
[-- Type: application/octet-stream, Size: 2301 bytes --]
From 82d8f55ceab00c9ef829195e454a9cd74fded166 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 6 Aug 2013 23:03:57 +0200
Subject: [PATCH next-20130805] Revert "af_packet: when sending ethernet
frames, parse header for skb->protocol"
This reverts commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
("af_packet: when sending ethernet frames, parse header for skb->protocol").
I noticed with next-20130806 that I cannot connect to my WLAN-AP anymore.
next-20130802 was the last GOOD and next-20130805 the first BAD Linux-next
release.
Debugging with wpasupplicant did not show any inconsistency.
To ensure it is not a problem of wireless, I tried wireless-testing
(master-2013-08-05), which did not show the symptoms.
Thanks Johannes Berg for the vital help.
After a git-bisect session it turned out that the above commit is the
culprit.
Reverting it fixes the issue for me.
Adapted and tested against Linux-next (next-20130805).
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
net/packet/af_packet.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 0c0f6c9..9343ea7 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -88,7 +88,6 @@
#include <linux/virtio_net.h>
#include <linux/errqueue.h>
#include <linux/net_tstamp.h>
-#include <linux/if_arp.h>
#ifdef CONFIG_INET
#include <net/inet_common.h>
@@ -2002,9 +2001,6 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
if (unlikely(err))
return err;
- if (dev->type == ARPHRD_ETHER)
- skb->protocol = eth_type_trans(skb, dev);
-
data += dev->hard_header_len;
to_write -= dev->hard_header_len;
}
@@ -2331,20 +2327,13 @@ static int packet_snd(struct socket *sock,
sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
- if (dev->type == ARPHRD_ETHER) {
- skb->protocol = eth_type_trans(skb, dev);
- if (skb->protocol == htons(ETH_P_8021Q))
- reserve += VLAN_HLEN;
- } else {
- skb->protocol = proto;
- skb->dev = dev;
- }
-
if (!gso_type && (len > dev->mtu + reserve + extra_len)) {
err = -EMSGSIZE;
goto out_free;
}
+ skb->protocol = proto;
+ skb->dev = dev;
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
--
1.8.3.4
^ permalink raw reply related
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 21:45 UTC (permalink / raw)
To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUVk1HM-VVYcARvY7p5KBYz0YcY9+rW8s-nKPTeVYh4tgw@mail.gmail.com>
On Tue, 2013-08-06 at 23:40 +0200, Sedat Dilek wrote:
> > Does the problem occur on client or server side? AFAICT, hostapd as well
> > as wpa_supplicant use AF_PACKET.
> >
> > The tricky thing is, these patches are meant to *loosen* the
> > restrictions in af_packet.c, so *should* not be harmful. So either my
> > patches create a side effect I did not foresee, or it's something nasty
> > (too much delay introduced by calling eth_type_trans() or so).
> By reverting the culprit commit my network/wifi is fine, again.
> See also attached patch with changelog.
I think skb->protocol is probably getting set up wrong, and just putting
back the last two lines
skb->protocol = proto;
skb->dev = dev;
is probably sufficient to fix wifi. If skb->protocol isn't set to
ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
printing out what it's set to at the point where the skb->protocol
assignment above was removed.
I'm trying to wrap my head around all this right now but I don't yet see
how the code after the patch would not get skb->protocol correct.
johannes
^ permalink raw reply
* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Hannes Frederic Sowa @ 2013-08-06 21:56 UTC (permalink / raw)
To: Johannes Berg
Cc: sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w, David Miller,
Stephen Rothwell, wireless, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1375825538.10459.1.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
On Tue, Aug 06, 2013 at 11:45:38PM +0200, Johannes Berg wrote:
> On Tue, 2013-08-06 at 23:40 +0200, Sedat Dilek wrote:
>
> > > Does the problem occur on client or server side? AFAICT, hostapd as well
> > > as wpa_supplicant use AF_PACKET.
> > >
> > > The tricky thing is, these patches are meant to *loosen* the
> > > restrictions in af_packet.c, so *should* not be harmful. So either my
> > > patches create a side effect I did not foresee, or it's something nasty
> > > (too much delay introduced by calling eth_type_trans() or so).
>
> > By reverting the culprit commit my network/wifi is fine, again.
> > See also attached patch with changelog.
>
> I think skb->protocol is probably getting set up wrong, and just putting
> back the last two lines
>
> skb->protocol = proto;
> skb->dev = dev;
>
> is probably sufficient to fix wifi. If skb->protocol isn't set to
> ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
> printing out what it's set to at the point where the skb->protocol
> assignment above was removed.
>
> I'm trying to wrap my head around all this right now but I don't yet see
> how the code after the patch would not get skb->protocol correct.
Has anybody tested plain ethernet? I have a malfunctioning dhclient on
ethernet since the weekend(it seems to not receive any packet). I did not
look after it because have other patches on my todo list currently. Maybe
it is the same error?
Greetings,
Hannes
--
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: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 21:58 UTC (permalink / raw)
To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375825538.10459.1.camel@jlt4.sipsolutions.net>
On Tue, 2013-08-06 at 23:45 +0200, Johannes Berg wrote:
> I think skb->protocol is probably getting set up wrong, and just putting
> back the last two lines
>
> skb->protocol = proto;
> skb->dev = dev;
>
> is probably sufficient to fix wifi. If skb->protocol isn't set to
> ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
> printing out what it's set to at the point where the skb->protocol
> assignment above was removed.
>
> I'm trying to wrap my head around all this right now but I don't yet see
> how the code after the patch would not get skb->protocol correct.
Actually, I think that's not it, but the code now behaves totally
differently?
Say this is the frame data with two points marked:
(1) (2)
| dst | src | ethtype | ... |
As I understand it (in my admittedly rather tired state), previously we
had
skb_network_header() == (1)
skb_mac_header() == (1)
skb->data == (1)
After calling eth_type_trans(), we get
skb_network_header() == (1)
skb_mac_header() == (1)
skb->data == (2)
I think? Maybe I'm totally confused though.
johannes
^ permalink raw reply
* [PATCH 4/6 net-next] bnx2: Use SIMPLE_DEV_PM_OPS.
From: Michael Chan @ 2013-08-06 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1375829412-26425-4-git-send-email-mchan@broadcom.com>
This simplifies the suspend/resume code.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 45 +++++++++++++++++++---------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 0b54ca0..27a128c 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -8602,46 +8602,52 @@ bnx2_remove_one(struct pci_dev *pdev)
}
static int
-bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
+bnx2_suspend(struct device *device)
{
+ struct pci_dev *pdev = to_pci_dev(device);
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = netdev_priv(dev);
- /* PCI register 4 needs to be saved whether netif_running() or not.
- * MSI address and data need to be saved if using MSI and
- * netif_running().
- */
- pci_save_state(pdev);
- if (!netif_running(dev))
- return 0;
-
- cancel_work_sync(&bp->reset_task);
- bnx2_netif_stop(bp, true);
- netif_device_detach(dev);
- del_timer_sync(&bp->timer);
- bnx2_shutdown_chip(bp);
- bnx2_free_skbs(bp);
- bnx2_set_power_state(bp, pci_choose_state(pdev, state));
+ if (netif_running(dev)) {
+ cancel_work_sync(&bp->reset_task);
+ bnx2_netif_stop(bp, true);
+ netif_device_detach(dev);
+ del_timer_sync(&bp->timer);
+ bnx2_shutdown_chip(bp);
+ __bnx2_free_irq(bp);
+ bnx2_free_skbs(bp);
+ }
+ bnx2_setup_wol(bp);
return 0;
}
static int
-bnx2_resume(struct pci_dev *pdev)
+bnx2_resume(struct device *device)
{
+ struct pci_dev *pdev = to_pci_dev(device);
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = netdev_priv(dev);
- pci_restore_state(pdev);
if (!netif_running(dev))
return 0;
bnx2_set_power_state(bp, PCI_D0);
netif_device_attach(dev);
+ bnx2_request_irq(bp);
bnx2_init_nic(bp, 1);
bnx2_netif_start(bp, true);
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static SIMPLE_DEV_PM_OPS(bnx2_pm_ops, bnx2_suspend, bnx2_resume);
+#define BNX2_PM_OPS (&bnx2_pm_ops)
+
+#else
+
+#define BNX2_PM_OPS NULL
+
+#endif /* CONFIG_PM_SLEEP */
/**
* bnx2_io_error_detected - called when PCI error is detected
* @pdev: Pointer to PCI device
@@ -8757,8 +8763,7 @@ static struct pci_driver bnx2_pci_driver = {
.id_table = bnx2_pci_tbl,
.probe = bnx2_init_one,
.remove = bnx2_remove_one,
- .suspend = bnx2_suspend,
- .resume = bnx2_resume,
+ .driver.pm = BNX2_PM_OPS,
.err_handler = &bnx2_err_handler,
};
--
1.7.1
^ permalink raw reply related
* [PATCH 1/6 net-next] bnx2: Handle error condition in ->slot_reset()
From: Michael Chan @ 2013-08-06 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1375829412-26425-1-git-send-email-mchan@broadcom.com>
by closing the device if necessary. Otherwise, since NAPI state is
already disabled, a subsequent close will hang the system.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 6a2de1d..3baf8b5 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -8694,14 +8694,13 @@ static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = netdev_priv(dev);
- pci_ers_result_t result;
- int err;
+ pci_ers_result_t result = PCI_ERS_RESULT_DISCONNECT;
+ int err = 0;
rtnl_lock();
if (pci_enable_device(pdev)) {
dev_err(&pdev->dev,
"Cannot re-enable PCI device after reset\n");
- result = PCI_ERS_RESULT_DISCONNECT;
} else {
pci_set_master(pdev);
pci_restore_state(pdev);
@@ -8709,9 +8708,15 @@ static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
if (netif_running(dev)) {
bnx2_set_power_state(bp, PCI_D0);
- bnx2_init_nic(bp, 1);
+ err = bnx2_init_nic(bp, 1);
}
- result = PCI_ERS_RESULT_RECOVERED;
+ if (!err)
+ result = PCI_ERS_RESULT_RECOVERED;
+ }
+
+ if (result != PCI_ERS_RESULT_RECOVERED && netif_running(dev)) {
+ bnx2_napi_enable(bp);
+ dev_close(dev);
}
rtnl_unlock();
--
1.7.1
^ permalink raw reply related
* [PATCH 5/6 net-next] bnx2: Add pci shutdown handler.
From: Michael Chan @ 2013-08-06 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1375829412-26425-5-git-send-email-mchan@broadcom.com>
WoL and power state changes will now be done in the shutdown handler.
open/close/ethtool will no longer change the power state. NVRAM
operations can now be permitted whether the device is up or down.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 47 ++++++++++++++++++----------------
1 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 27a128c..88f5ab1 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -6302,7 +6302,6 @@ bnx2_open(struct net_device *dev)
netif_carrier_off(dev);
- bnx2_set_power_state(bp, PCI_D0);
bnx2_disable_int(bp);
rc = bnx2_setup_int_mode(bp, disable_msi);
@@ -6709,7 +6708,6 @@ bnx2_close(struct net_device *dev)
bnx2_del_napi(bp);
bp->link_up = 0;
netif_carrier_off(bp->dev);
- bnx2_set_power_state(bp, PCI_D3hot);
return 0;
}
@@ -7144,9 +7142,6 @@ bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
struct bnx2 *bp = netdev_priv(dev);
int rc;
- if (!netif_running(dev))
- return -EAGAIN;
-
/* parameters already validated in ethtool_get_eeprom */
rc = bnx2_nvram_read(bp, eeprom->offset, eebuf, eeprom->len);
@@ -7161,9 +7156,6 @@ bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
struct bnx2 *bp = netdev_priv(dev);
int rc;
- if (!netif_running(dev))
- return -EAGAIN;
-
/* parameters already validated in ethtool_set_eeprom */
rc = bnx2_nvram_write(bp, eeprom->offset, eebuf, eeprom->len);
@@ -7523,8 +7515,6 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
{
struct bnx2 *bp = netdev_priv(dev);
- bnx2_set_power_state(bp, PCI_D0);
-
memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS);
if (etest->flags & ETH_TEST_FL_OFFLINE) {
int i;
@@ -7573,8 +7563,6 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
etest->flags |= ETH_TEST_FL_FAILED;
}
- if (!netif_running(bp->dev))
- bnx2_set_power_state(bp, PCI_D3hot);
}
static void
@@ -7646,8 +7634,6 @@ bnx2_set_phys_id(struct net_device *dev, enum ethtool_phys_id_state state)
switch (state) {
case ETHTOOL_ID_ACTIVE:
- bnx2_set_power_state(bp, PCI_D0);
-
bp->leds_save = BNX2_RD(bp, BNX2_MISC_CFG);
BNX2_WR(bp, BNX2_MISC_CFG, BNX2_MISC_CFG_LEDMODE_MAC);
return 1; /* cycle on/off once per second */
@@ -7668,9 +7654,6 @@ bnx2_set_phys_id(struct net_device *dev, enum ethtool_phys_id_state state)
case ETHTOOL_ID_INACTIVE:
BNX2_WR(bp, BNX2_EMAC_LED, 0);
BNX2_WR(bp, BNX2_MISC_CFG, bp->leds_save);
-
- if (!netif_running(dev))
- bnx2_set_power_state(bp, PCI_D3hot);
break;
}
@@ -8118,8 +8101,6 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
goto err_out_release;
}
- bnx2_set_power_state(bp, PCI_D0);
-
/* Configure byte swap and enable write to the reg_window registers.
* Rely on CPU to do target byte swapping on big endian systems
* The chip's target access swapping will not swap all accesses
@@ -8705,10 +8686,9 @@ static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
pci_restore_state(pdev);
pci_save_state(pdev);
- if (netif_running(dev)) {
- bnx2_set_power_state(bp, PCI_D0);
+ if (netif_running(dev))
err = bnx2_init_nic(bp, 1);
- }
+
if (!err)
result = PCI_ERS_RESULT_RECOVERED;
}
@@ -8752,6 +8732,28 @@ static void bnx2_io_resume(struct pci_dev *pdev)
rtnl_unlock();
}
+static void bnx2_shutdown(struct pci_dev *pdev)
+{
+ struct net_device *dev = pci_get_drvdata(pdev);
+ struct bnx2 *bp;
+
+ if (!dev)
+ return;
+
+ bp = netdev_priv(dev);
+ if (!bp)
+ return;
+
+ rtnl_lock();
+ if (netif_running(dev))
+ dev_close(bp->dev);
+
+ if (system_state == SYSTEM_POWER_OFF)
+ bnx2_set_power_state(bp, PCI_D3hot);
+
+ rtnl_unlock();
+}
+
static const struct pci_error_handlers bnx2_err_handler = {
.error_detected = bnx2_io_error_detected,
.slot_reset = bnx2_io_slot_reset,
@@ -8765,6 +8767,7 @@ static struct pci_driver bnx2_pci_driver = {
.remove = bnx2_remove_one,
.driver.pm = BNX2_PM_OPS,
.err_handler = &bnx2_err_handler,
+ .shutdown = bnx2_shutdown,
};
module_pci_driver(bnx2_pci_driver);
--
1.7.1
^ permalink raw reply related
* [PATCH 0/6 net-next] bnx2 EEH and WoL/PM patches
From: Michael Chan @ 2013-08-06 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev
First patch fixes EEH/AER error path. The rest of the patches
modernize the driver to use latest APIs for WoL and power management.
Michael Chan (6):
bnx2: Handle error condition in ->slot_reset()
bnx2: Use kernel APIs for WoL and power state changes.
bnx2: Refactor WoL setup into a separate function.
bnx2: Use SIMPLE_DEV_PM_OPS.
bnx2: Add pci shutdown handler.
bnx2: Update version to 2.2.4
drivers/net/ethernet/broadcom/bnx2.c | 308 +++++++++++++++++-----------------
drivers/net/ethernet/broadcom/bnx2.h | 2 +-
2 files changed, 158 insertions(+), 152 deletions(-)
^ permalink raw reply
* [PATCH 6/6 net-next] bnx2: Update version to 2.2.4
From: Michael Chan @ 2013-08-06 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1375829412-26425-6-git-send-email-mchan@broadcom.com>
and update copyright year.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 6 +++---
drivers/net/ethernet/broadcom/bnx2.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 88f5ab1..6fdfc18 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -1,6 +1,6 @@
/* bnx2.c: Broadcom NX2 network driver.
*
- * Copyright (c) 2004-2011 Broadcom Corporation
+ * Copyright (c) 2004-2013 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -58,8 +58,8 @@
#include "bnx2_fw.h"
#define DRV_MODULE_NAME "bnx2"
-#define DRV_MODULE_VERSION "2.2.3"
-#define DRV_MODULE_RELDATE "June 27, 2012"
+#define DRV_MODULE_VERSION "2.2.4"
+#define DRV_MODULE_RELDATE "Aug 05, 2013"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-6.2.3.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-6.0.15.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-6.2.1b.fw"
diff --git a/drivers/net/ethernet/broadcom/bnx2.h b/drivers/net/ethernet/broadcom/bnx2.h
index 172efbe..18cb2d2 100644
--- a/drivers/net/ethernet/broadcom/bnx2.h
+++ b/drivers/net/ethernet/broadcom/bnx2.h
@@ -1,6 +1,6 @@
/* bnx2.h: Broadcom NX2 network driver.
*
- * Copyright (c) 2004-2011 Broadcom Corporation
+ * Copyright (c) 2004-2013 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--
1.7.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