* Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
From: Alexei Starovoitov @ 2014-09-16 22:06 UTC (permalink / raw)
To: David Miller
Cc: Ingo Molnar, Linus Torvalds, Andy Lutomirski, Daniel Borkmann,
Hannes Frederic Sowa, Chema Gonzalez, Eric Dumazet,
Peter Zijlstra, Pablo Neira Ayuso, H. Peter Anvin, Andrew Morton,
Kees Cook, Linux API, Network Development, LKML
In-Reply-To: <20140916.174901.2174503796369572537.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Tue, Sep 16, 2014 at 2:49 PM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
> Date: Tue, 16 Sep 2014 14:23:27 -0700
>
>> no compat layer and type checking will be done
>> by syscall wrappers. Ok?
>
> Why are you against using strong typing just for everything other
> than the user pointer blobs?
>
> I don't understand the resistence to my suggestion to just use
> aligned_u64 instead of "void __user *" in the union members.
All these different variants are ok to me. There are pros and
cons to either approach. I'm not against strong typing.
I just thought it would be cleaner not to use 'union' and
was asking for opinion. That's all. Sure, I will keep 'union'
and only change pointers to __aligned_u64.
^ permalink raw reply
* Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
From: David Miller @ 2014-09-16 21:49 UTC (permalink / raw)
To: ast
Cc: mingo, torvalds, luto, dborkman, hannes, chema, edumazet,
a.p.zijlstra, pablo, hpa, akpm, keescook, linux-api, netdev,
linux-kernel
In-Reply-To: <CAMEtUuzy0Hvjr0f4XBrH+FAxaKD7aijnYzDe3-MPrGWe6+MD4Q@mail.gmail.com>
From: Alexei Starovoitov <ast@plumgrid.com>
Date: Tue, 16 Sep 2014 14:23:27 -0700
> no compat layer and type checking will be done
> by syscall wrappers. Ok?
Why are you against using strong typing just for everything other
than the user pointer blobs?
I don't understand the resistence to my suggestion to just use
aligned_u64 instead of "void __user *" in the union members.
^ permalink raw reply
* [PATCH iproute2] ip tuntap: Added missing commands in usage
From: Vadim Kochan @ 2014-09-16 21:24 UTC (permalink / raw)
To: netdev; +Cc: Vadim Kochan
show, list, lst and help commands were not printed in usage.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
ip/iptuntap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iptuntap.c b/ip/iptuntap.c
index 2391af2..0ce64a6 100644
--- a/ip/iptuntap.c
+++ b/ip/iptuntap.c
@@ -36,7 +36,7 @@ static void usage(void) __attribute__((noreturn));
static void usage(void)
{
- fprintf(stderr, "Usage: ip tuntap { add | del } [ dev PHYS_DEV ] \n");
+ fprintf(stderr, "Usage: ip tuntap { add | del | show | list | lst | help } [ dev PHYS_DEV ] \n");
fprintf(stderr, " [ mode { tun | tap } ] [ user USER ] [ group GROUP ]\n");
fprintf(stderr, " [ one_queue ] [ pi ] [ vnet_hdr ] [ multi_queue ]\n");
fprintf(stderr, "\n");
--
2.1.0
^ permalink raw reply related
* Re: [GIT PULL nf-next 00/21] Second Round of IPVS Updates for v3.18
From: Julian Anastasov @ 2014-09-16 21:27 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Simon Horman, lvs-devel, netdev, netfilter-devel, Wensong Zhang
In-Reply-To: <20140916172556.GA21545@salvia>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 926 bytes --]
Hello,
On Tue, 16 Sep 2014, Pablo Neira Ayuso wrote:
> Hi Simon,
>
> On Tue, Sep 16, 2014 at 09:34:14AM +0900, Simon Horman wrote:
> > Hi Pablo,
> >
> > please consider these IPVS updates for v3.18.
> >
> > * Add simple weighted failover scheduler
> > - Thanks to Kenny Mathis
> > * Support v6 real servers in v4 pools and vice versa
> > - Thanks to Alex Gartrell and Julian Anastasov
>
> I need a slightly larger description of this series.
>
> I think you can merge patches 13-19 too. They are mostly two liners
> with a similar description, so they naturally belong to the same
> logical change. I would like to reduce the patchbomb pull request for
> David.
Good idea, done.
Simon, I'm attaching such patch that replaces all
these "ipvs: use correct address family in * logs".
It additionally changes the new ip_vs_fo.c scheduler
and ip_vs_wrr.c which was missed.
Regards
--
Julian Anastasov <ja@ssi.bg>
[-- Attachment #2: sched logs --]
[-- Type: TEXT/plain, Size: 7474 bytes --]
From 18e7e92c9972ff98dc5547b9ffdfbd45420631c2 Mon Sep 17 00:00:00 2001
From: Julian Anastasov <ja@ssi.bg>
Date: Wed, 17 Sep 2014 00:09:00 +0300
Subject: [PATCH net-next] ipvs: use correct address family in scheduler logs
Needed to support svc->af != dest->af.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Alex Gartrell <agartrell@fb.com>
---
net/netfilter/ipvs/ip_vs_dh.c | 2 +-
net/netfilter/ipvs/ip_vs_fo.c | 2 +-
net/netfilter/ipvs/ip_vs_lc.c | 2 +-
net/netfilter/ipvs/ip_vs_nq.c | 3 ++-
net/netfilter/ipvs/ip_vs_rr.c | 2 +-
net/netfilter/ipvs/ip_vs_sed.c | 3 ++-
net/netfilter/ipvs/ip_vs_sh.c | 8 ++++----
net/netfilter/ipvs/ip_vs_wlc.c | 3 ++-
net/netfilter/ipvs/ip_vs_wrr.c | 2 +-
9 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c
index c3b8454..6be5c53 100644
--- a/net/netfilter/ipvs/ip_vs_dh.c
+++ b/net/netfilter/ipvs/ip_vs_dh.c
@@ -234,7 +234,7 @@ ip_vs_dh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
IP_VS_DBG_BUF(6, "DH: destination IP address %s --> server %s:%d\n",
IP_VS_DBG_ADDR(svc->af, &iph->daddr),
- IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr),
ntohs(dest->port));
return dest;
diff --git a/net/netfilter/ipvs/ip_vs_fo.c b/net/netfilter/ipvs/ip_vs_fo.c
index 6a2647d..e09874d 100644
--- a/net/netfilter/ipvs/ip_vs_fo.c
+++ b/net/netfilter/ipvs/ip_vs_fo.c
@@ -44,7 +44,7 @@ ip_vs_fo_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
if (hweight) {
IP_VS_DBG_BUF(6, "FO: server %s:%u activeconns %d weight %d\n",
- IP_VS_DBG_ADDR(svc->af, &hweight->addr),
+ IP_VS_DBG_ADDR(hweight->af, &hweight->addr),
ntohs(hweight->port),
atomic_read(&hweight->activeconns),
atomic_read(&hweight->weight));
diff --git a/net/netfilter/ipvs/ip_vs_lc.c b/net/netfilter/ipvs/ip_vs_lc.c
index 2bdcb1c..19a0769 100644
--- a/net/netfilter/ipvs/ip_vs_lc.c
+++ b/net/netfilter/ipvs/ip_vs_lc.c
@@ -59,7 +59,7 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
else
IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d "
"inactconns %d\n",
- IP_VS_DBG_ADDR(svc->af, &least->addr),
+ IP_VS_DBG_ADDR(least->af, &least->addr),
ntohs(least->port),
atomic_read(&least->activeconns),
atomic_read(&least->inactconns));
diff --git a/net/netfilter/ipvs/ip_vs_nq.c b/net/netfilter/ipvs/ip_vs_nq.c
index 961a6de..a8b6340 100644
--- a/net/netfilter/ipvs/ip_vs_nq.c
+++ b/net/netfilter/ipvs/ip_vs_nq.c
@@ -107,7 +107,8 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
out:
IP_VS_DBG_BUF(6, "NQ: server %s:%u "
"activeconns %d refcnt %d weight %d overhead %d\n",
- IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+ IP_VS_DBG_ADDR(least->af, &least->addr),
+ ntohs(least->port),
atomic_read(&least->activeconns),
atomic_read(&least->refcnt),
atomic_read(&least->weight), loh);
diff --git a/net/netfilter/ipvs/ip_vs_rr.c b/net/netfilter/ipvs/ip_vs_rr.c
index 176b87c..58bacfc 100644
--- a/net/netfilter/ipvs/ip_vs_rr.c
+++ b/net/netfilter/ipvs/ip_vs_rr.c
@@ -95,7 +95,7 @@ stop:
spin_unlock_bh(&svc->sched_lock);
IP_VS_DBG_BUF(6, "RR: server %s:%u "
"activeconns %d refcnt %d weight %d\n",
- IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port),
atomic_read(&dest->activeconns),
atomic_read(&dest->refcnt), atomic_read(&dest->weight));
diff --git a/net/netfilter/ipvs/ip_vs_sed.c b/net/netfilter/ipvs/ip_vs_sed.c
index e446b9f..f8e2d00 100644
--- a/net/netfilter/ipvs/ip_vs_sed.c
+++ b/net/netfilter/ipvs/ip_vs_sed.c
@@ -108,7 +108,8 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
IP_VS_DBG_BUF(6, "SED: server %s:%u "
"activeconns %d refcnt %d weight %d overhead %d\n",
- IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+ IP_VS_DBG_ADDR(least->af, &least->addr),
+ ntohs(least->port),
atomic_read(&least->activeconns),
atomic_read(&least->refcnt),
atomic_read(&least->weight), loh);
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c
index cc65b2f..98a1343 100644
--- a/net/netfilter/ipvs/ip_vs_sh.c
+++ b/net/netfilter/ipvs/ip_vs_sh.c
@@ -138,7 +138,7 @@ ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s,
return dest;
IP_VS_DBG_BUF(6, "SH: selected unavailable server %s:%d, reselecting",
- IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port));
+ IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port));
/* if the original dest is unavailable, loop around the table
* starting from ihash to find a new dest
@@ -153,7 +153,7 @@ ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s,
return dest;
IP_VS_DBG_BUF(6, "SH: selected unavailable "
"server %s:%d (offset %d), reselecting",
- IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr),
ntohs(dest->port), roffset);
}
@@ -192,7 +192,7 @@ ip_vs_sh_reassign(struct ip_vs_sh_state *s, struct ip_vs_service *svc)
RCU_INIT_POINTER(b->dest, dest);
IP_VS_DBG_BUF(6, "assigned i: %d dest: %s weight: %d\n",
- i, IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ i, IP_VS_DBG_ADDR(dest->af, &dest->addr),
atomic_read(&dest->weight));
/* Don't move to next dest until filling weight */
@@ -342,7 +342,7 @@ ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
IP_VS_DBG_BUF(6, "SH: source IP address %s --> server %s:%d\n",
IP_VS_DBG_ADDR(svc->af, &iph->saddr),
- IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr),
ntohs(dest->port));
return dest;
diff --git a/net/netfilter/ipvs/ip_vs_wlc.c b/net/netfilter/ipvs/ip_vs_wlc.c
index b5b4650..6b366fd 100644
--- a/net/netfilter/ipvs/ip_vs_wlc.c
+++ b/net/netfilter/ipvs/ip_vs_wlc.c
@@ -80,7 +80,8 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
IP_VS_DBG_BUF(6, "WLC: server %s:%u "
"activeconns %d refcnt %d weight %d overhead %d\n",
- IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port),
+ IP_VS_DBG_ADDR(least->af, &least->addr),
+ ntohs(least->port),
atomic_read(&least->activeconns),
atomic_read(&least->refcnt),
atomic_read(&least->weight), loh);
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c
index 0546cd5..17e6d44 100644
--- a/net/netfilter/ipvs/ip_vs_wrr.c
+++ b/net/netfilter/ipvs/ip_vs_wrr.c
@@ -216,7 +216,7 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
found:
IP_VS_DBG_BUF(6, "WRR: server %s:%u "
"activeconns %d refcnt %d weight %d\n",
- IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port),
+ IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port),
atomic_read(&dest->activeconns),
atomic_read(&dest->refcnt),
atomic_read(&dest->weight));
--
1.9.3
^ permalink raw reply related
* Re: [Patch net-next v2 4/4] net: fec: Workaround for imx6sx enet tx hang when enable three queues
From: Zhi Li @ 2014-09-16 21:24 UTC (permalink / raw)
To: Fabio Estevam
Cc: Frank Li, Duan Fugang-B38611, David S. Miller,
netdev@vger.kernel.org, Shawn Guo,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <CAOMZO5DnmHBaDr7RzozJoBsuEY=bzmusKcfJQ4NjCyD4+13=Tg@mail.gmail.com>
On Tue, Sep 16, 2014 at 3:52 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Tue, Sep 16, 2014 at 2:58 PM, <Frank.Li@freescale.com> wrote:
>> From: Fugang Duan <B38611@freescale.com>
>>
>> When enable three queues on imx6sx enet, and then do tx performance
>> test with iperf tool, after some time running, tx hang.
>>
>> Found that:
>> If uDMA is running, software set TDAR may cause tx hang.
>> If uDMA is in idle, software set TDAR don't cause tx hang.
>>
>> There is a TDAR race condition for mutliQ when the software sets TDAR
>> and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles).
>> This will cause the udma_tx and udma_tx_arbiter state machines to hang.
>> The issue exist at i.MX6SX enet IP.
>>
>> So, the Workaround is checking TDAR status four time, if TDAR cleared by
>> hardware and then write TDAR, otherwise don't set TDAR.
>>
>> The patch is only one Workaround for the issue TKT210582.
>
> As Shawn pointed out, it is better to use the ERR007885 instead of an
> internal bug numbering.
Sorry, I forget change commit message.
best regards
Frank Li
^ permalink raw reply
* Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
From: Alexei Starovoitov @ 2014-09-16 21:23 UTC (permalink / raw)
To: David Miller
Cc: Ingo Molnar, Linus Torvalds, Andy Lutomirski, Daniel Borkmann,
Hannes Frederic Sowa, Chema Gonzalez, Eric Dumazet,
Peter Zijlstra, Pablo Neira Ayuso, H. Peter Anvin, Andrew Morton,
Kees Cook, Linux API, Network Development, LKML
In-Reply-To: <20140916.165452.1747695341192703967.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Tue, Sep 16, 2014 at 1:54 PM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
>
> The cost of the compat layer must be considered and weighted
> against this cast, which I think is really no big deal.
>
>> I think compat layer is a better option.
>
> It's overhead you'll have to support forever, I think you should
> reconsider.
>
> All of the "ugly casting" will be hidden, or can be hidden, in the
> syscall wrappers and/or interfaces in userspace.
ahh, ok. I thought you're strongly against any type of casts.
In such case I can get rid of 'union bpf_attr' as well and simply
define a struct per command, then syscall will look like:
sys_bpf(int cmd, void __user *attr, unsigned int size);
and uapi/linux/bpf.h will have:
struct bpf_prog_load_attr { /* for BPF_PROG_LOAD cmd */
__u32 prog_type;
__u32 insn_cnt;
__aligned_u64 insns;
__aligned_u64 license;
__u32 log_level;
__u32 log_size;
__aligned_u64 log_buf;
};
and similar for other commands.
no compat layer and type checking will be done
by syscall wrappers. Ok?
^ permalink raw reply
* Re: [PATCH RFC 1/6] ipv6: also increase fib6_node sernum on deletion events
From: Hannes Frederic Sowa @ 2014-09-16 21:05 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev, Eric Dumazet, Vlad Yasevich
In-Reply-To: <541862ED.8090600@6wind.com>
On Di, 2014-09-16 at 18:18 +0200, Nicolas Dichtel wrote:
> Le 12/09/2014 01:21, Hannes Frederic Sowa a écrit :
> > fib6_add increases the fn_sernum of fib6_nodes while it traverses the
> > tree. This serial number is used by ip6_dst_check to judge whether a
> > relookup for the socket cache should be done (e.g. a better route is
> > available).
> >
> > We didn't do so for fib6_del, so we missed relookups on ipv6 address
> > deletion events. Because this caused trouble in the SCTP stack, instead
> > the genid for ipv6 was bumped. Also TCP connections used old source
> > addresses, which were not available anymore.
> >
> > Because we have static rt6_nodes in the tree (no RTF_GATEWAY,
> > RTF_NONEXTHOP nor RTF_CACHE nodes but still DST_HOST) flag, we ended up
> > in a situation where the genid of the routing node was always smaller
> > than the published genid in the namespace. That caused ip6_dst_check to
> > always discard the current dst_entry and a relookup happend.
> >
> > This patch prepares for the removal of the ipv6 genid by also modifying
> > the fn_sernum on route deletion.
> >
> > Thanks to Eric Dumazet who noticed this problem!
> >
> > Cc: Eric Dumazet <eric.dumazet@gmail.com>
> > Cc: Vlad Yasevich <vyasevich@gmail.com>
> > Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> > Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> This serie looks good to me. Thank you for working on this topic!
Thanks a lot for your review, Nicolas! I'll do some more build tests I
got all the module handling correct and will send the formal submission.
Bye,
Hannes
^ permalink raw reply
* [PATCH iproute2] ip tuntap: Add checking if tun/tap mode was set by default
From: Vadim Kochan @ 2014-09-16 20:54 UTC (permalink / raw)
To: netdev; +Cc: Vadim Kochan
This checking was performed only when adding interface but
it is needed also when deleting, otherwise the error will be:
ioctl(TUNSETIFF): Invalid argument
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
ip/iptuntap.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ip/iptuntap.c b/ip/iptuntap.c
index 2391af2..c6dacd7 100644
--- a/ip/iptuntap.c
+++ b/ip/iptuntap.c
@@ -186,6 +186,11 @@ static int parse_args(int argc, char **argv, struct ifreq *ifr, uid_t *uid, gid_
argc--; argv++;
}
+ if (!(ifr->ifr_flags & TUN_TYPE_MASK)) {
+ fprintf(stderr, "You failed to specify a tunnel mode\n");
+ return -1;
+ }
+
return 0;
}
@@ -199,10 +204,6 @@ static int do_add(int argc, char **argv)
if (parse_args(argc, argv, &ifr, &uid, &gid) < 0)
return -1;
- if (!(ifr.ifr_flags & TUN_TYPE_MASK)) {
- fprintf(stderr, "You failed to specify a tunnel mode\n");
- return -1;
- }
return tap_add_ioctl(&ifr, uid, gid);
}
--
2.1.0
^ permalink raw reply related
* Re: [PATCH net-next 0/3] Remove rx_copybreak module param, use ethtool to change its value
From: David Miller @ 2014-09-16 20:57 UTC (permalink / raw)
To: _govind; +Cc: netdev, dave, pcnet32, romieu
In-Reply-To: <1410900687-9686-1-git-send-email-_govind@gmx.com>
From: Govindarajulu Varadarajan <_govind@gmx.com>
Date: Wed, 17 Sep 2014 02:21:24 +0530
> This series removes the rx_copybreak module param and adds ethtool support for
> the same.
Module parameters are an interface visible to the user and cannot just
be removed.
Sorry.
^ permalink raw reply
* Re: [PATCH v2] scsi: use 'depends' instead of 'select' for SCSI_FC_ATTRS
From: David Miller @ 2014-09-16 20:56 UTC (permalink / raw)
To: rdunlap; +Cc: jbottomley, netdev, linux-scsi
In-Reply-To: <5418A1ED.3010302@infradead.org>
From: Randy Dunlap <rdunlap@infradead.org>
Date: Tue, 16 Sep 2014 13:47:41 -0700
> From: Randy Dunlap <rdunlap@infradead.org>
>
> There are other kconfig symbols which use SCSI_FC_ATTRS.
> In order to maintain sanity and prevent kconfig warnings, change
> all of these from using 'select' to using 'depends on' so that
> proper symbol dependencies will be honored and circular depends
> problems will be avoided.
> This fixes kconfig warnings and build errors:
>
> warning: (LIBFC && SCSI_IBMVFC && SCSI_QLA_FC && SCSI_LPFC && ZFCP && SCSI_BFA_FC && SCSI_CHELSIO_FCOE && FUSION_FC) selects SCSI_FC_ATTRS which has unmet direct dependencies (SCSI && NET)
> drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_event':
> drivers/scsi/scsi_transport_fc.c:543:7: error: 'scsi_nl_sock' undeclared (first use in this function)
> drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_vendor_event':
> drivers/scsi/scsi_transport_fc.c:611:7: error: 'scsi_nl_sock' undeclared (first use in this function)
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot]
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Applied, thanks Randy.
^ permalink raw reply
* Re: [PATCH net-next] of: mdio: honor flags passed to of_phy_connect
From: David Miller @ 2014-09-16 20:55 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, devicetree
In-Reply-To: <5418A1CC.9090704@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 16 Sep 2014 13:47:08 -0700
> Right, I have a follow-up patch that will pass non-zero, I will just
> submit everything at once so it is clear in what context and purpose
> this gets used.
That would work a lot better, thanks.
^ permalink raw reply
* Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
From: David Miller @ 2014-09-16 20:54 UTC (permalink / raw)
To: ast-uqk4Ao+rVK5Wk0Htik3J/w
Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
luto-kltTT9wpgjJwATOyAt5JVQ, dborkman-H+wXaHxf7aLQT0dZR+AlfA,
hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r,
chema-hpIqsD4AKlfQT0dZR+AlfA, edumazet-hpIqsD4AKlfQT0dZR+AlfA,
a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw, pablo-Cap9r6Oaw4JrovVCs/uTlw,
hpa-YMNOUZJC4hwAvxtiuMwx3w, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
keescook-F7+t8E8rja9g9hUCZPvPmw, linux-api-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CAMEtUuxp6709mdygiQyCqwjv-0kF-CbNOzCCZmKw_mUckF4NZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
Date: Tue, 16 Sep 2014 13:44:12 -0700
> the union indeed changes alignment from patch #1 to #3,
> but, imo, it is not a problem, since kernel does:
It changes the alignment of the datastructures in userspace.
> I haven't thought of 'aligned_u64' for this case.
> For counters and masks it would be perfect, but here user is
> passing real pointers to key and value, so they have to
> be 'void __user *', otherwise user would need to type cast
> them, which I want to avoid.
The cost of the compat layer must be considered and weighted
against this cast, which I think is really no big deal.
> I think compat layer is a better option.
It's overhead you'll have to support forever, I think you should
reconsider.
All of the "ugly casting" will be hidden, or can be hidden, in the
syscall wrappers and/or interfaces in userspace.
^ permalink raw reply
* Re: [Patch net-next v2 4/4] net: fec: Workaround for imx6sx enet tx hang when enable three queues
From: Fabio Estevam @ 2014-09-16 20:52 UTC (permalink / raw)
To: Frank Li
Cc: Duan Fugang-B38611, David S. Miller, netdev@vger.kernel.org,
李智, Shawn Guo, linux-arm-kernel@lists.infradead.org
In-Reply-To: <1410890290-11248-5-git-send-email-Frank.Li@freescale.com>
On Tue, Sep 16, 2014 at 2:58 PM, <Frank.Li@freescale.com> wrote:
> From: Fugang Duan <B38611@freescale.com>
>
> When enable three queues on imx6sx enet, and then do tx performance
> test with iperf tool, after some time running, tx hang.
>
> Found that:
> If uDMA is running, software set TDAR may cause tx hang.
> If uDMA is in idle, software set TDAR don't cause tx hang.
>
> There is a TDAR race condition for mutliQ when the software sets TDAR
> and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles).
> This will cause the udma_tx and udma_tx_arbiter state machines to hang.
> The issue exist at i.MX6SX enet IP.
>
> So, the Workaround is checking TDAR status four time, if TDAR cleared by
> hardware and then write TDAR, otherwise don't set TDAR.
>
> The patch is only one Workaround for the issue TKT210582.
As Shawn pointed out, it is better to use the ERR007885 instead of an
internal bug numbering.
^ permalink raw reply
* [PATCH net-next 3/3] sis190: use ethtool for changing rx_copybreak
From: Govindarajulu Varadarajan @ 2014-09-16 20:51 UTC (permalink / raw)
To: davem, netdev; +Cc: Govindarajulu Varadarajan, Francois Romieu
In-Reply-To: <1410900687-9686-1-git-send-email-_govind@gmx.com>
This patch removes the module parameter rx_copybreak. Add new ethtool
tunable support for setting/getting rx_copybreak.
Cc: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/sis/sis190.c | 47 +++++++++++++++++++++++++++++++++++----
1 file changed, 43 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 27be6c8..804d88d 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -290,6 +290,7 @@ struct sis190_private {
LNK_ON,
LNK_AUTONEG,
} link_status;
+ u32 rx_copybreak;
};
struct sis190_phy {
@@ -338,15 +339,13 @@ static const struct pci_device_id sis190_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, sis190_pci_tbl);
-static int rx_copybreak = 200;
+#define SIS190_RX_COPYBREAK_DEFAULT 200
static struct {
u32 msg_enable;
} debug = { -1 };
MODULE_DESCRIPTION("SiS sis190/191 Gigabit Ethernet driver");
-module_param(rx_copybreak, int, 0);
-MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
module_param_named(debug, debug.msg_enable, int, 0);
MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
MODULE_AUTHOR("K.M. Liu <kmliu@sis.com>, Ueimor <romieu@fr.zoreil.com>");
@@ -535,7 +534,7 @@ static bool sis190_try_rx_copy(struct sis190_private *tp,
struct sk_buff *skb;
bool done = false;
- if (pkt_size >= rx_copybreak)
+ if (pkt_size >= tp->rx_copybreak)
goto out;
skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size);
@@ -1522,6 +1521,7 @@ static struct net_device *sis190_init_board(struct pci_dev *pdev)
tp->pci_dev = pdev;
tp->mmio_addr = ioaddr;
tp->link_status = LNK_OFF;
+ tp->rx_copybreak = SIS190_RX_COPYBREAK_DEFAULT;
sis190_irq_mask_and_ack(ioaddr);
@@ -1796,6 +1796,43 @@ static void sis190_set_msglevel(struct net_device *dev, u32 value)
tp->msg_enable = value;
}
+static int sis190_get_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna, void *data)
+{
+ struct sis190_private *tp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ *(u32 *)data = tp->rx_copybreak;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static int sis190_set_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna,
+ const void *data)
+{
+ struct sis190_private *tp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ tp->rx_copybreak = *(u32 *)data;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
static const struct ethtool_ops sis190_ethtool_ops = {
.get_settings = sis190_get_settings,
.set_settings = sis190_set_settings,
@@ -1806,6 +1843,8 @@ static const struct ethtool_ops sis190_ethtool_ops = {
.get_msglevel = sis190_get_msglevel,
.set_msglevel = sis190_set_msglevel,
.nway_reset = sis190_nway_reset,
+ .get_tunable = sis190_get_tunable,
+ .set_tunable = sis190_set_tunable,
};
static int sis190_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 2/3] pcnet32: use ethtool for changing rx_copybreak
From: Govindarajulu Varadarajan @ 2014-09-16 20:51 UTC (permalink / raw)
To: davem, netdev; +Cc: Govindarajulu Varadarajan, Don Fry
In-Reply-To: <1410900687-9686-1-git-send-email-_govind@gmx.com>
This patch removes the module parameter rx_copybreak. Add new ethtool
tunable support for setting/getting rx_copybreak.
Cc: Don Fry <pcnet32@frontier.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/amd/pcnet32.c | 49 ++++++++++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index e2e3aaf..20ef8d6 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -92,7 +92,7 @@ static int pcnet32vlb; /* check for VLB cards ? */
static struct net_device *pcnet32_dev;
static int max_interrupt_work = 2;
-static int rx_copybreak = 200;
+#define PCNET_RX_COPYBREAK_DEFAULT 200
#define PCNET32_PORT_AUI 0x00
#define PCNET32_PORT_10BT 0x01
@@ -303,6 +303,7 @@ struct pcnet32_private {
/* saved registers during ethtool blink */
u16 save_regs[4];
+ u32 rx_copybreak;
};
static int pcnet32_probe_pci(struct pci_dev *, const struct pci_device_id *);
@@ -1155,7 +1156,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
return;
}
- if (pkt_len > rx_copybreak) {
+ if (pkt_len > lp->rx_copybreak) {
struct sk_buff *newskb;
dma_addr_t new_dma_addr;
@@ -1439,6 +1440,43 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
spin_unlock_irqrestore(&lp->lock, flags);
}
+static int pcnet32_get_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna, void *data)
+{
+ struct pcnet32_private *lp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ *(u32 *)data = lp->rx_copybreak;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static int pcnet32_set_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna,
+ const void *data)
+{
+ struct pcnet32_private *lp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ lp->rx_copybreak = *(u32 *)data;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
static const struct ethtool_ops pcnet32_ethtool_ops = {
.get_settings = pcnet32_get_settings,
.set_settings = pcnet32_set_settings,
@@ -1455,6 +1493,8 @@ static const struct ethtool_ops pcnet32_ethtool_ops = {
.get_regs_len = pcnet32_get_regs_len,
.get_regs = pcnet32_get_regs,
.get_sset_count = pcnet32_get_sset_count,
+ .get_tunable = pcnet32_get_tunable,
+ .set_tunable = pcnet32_set_tunable,
};
/* only probes for non-PCI devices, the rest are handled by
@@ -1912,6 +1952,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
/* enable LED writes */
a->write_bcr(ioaddr, 2, a->read_bcr(ioaddr, 2) | 0x1000);
+ lp->rx_copybreak = PCNET_RX_COPYBREAK_DEFAULT;
+
return 0;
err_free_ring:
@@ -2885,9 +2927,6 @@ MODULE_PARM_DESC(debug, DRV_NAME " debug level");
module_param(max_interrupt_work, int, 0);
MODULE_PARM_DESC(max_interrupt_work,
DRV_NAME " maximum events handled per interrupt");
-module_param(rx_copybreak, int, 0);
-MODULE_PARM_DESC(rx_copybreak,
- DRV_NAME " copy breakpoint for copy-only-tiny-frames");
module_param(tx_start_pt, int, 0);
MODULE_PARM_DESC(tx_start_pt, DRV_NAME " transmit start point (0-3)");
module_param(pcnet32vlb, int, 0);
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 1/3] typhoon: use ethtool for changing rx_copybreak
From: Govindarajulu Varadarajan @ 2014-09-16 20:51 UTC (permalink / raw)
To: davem, netdev; +Cc: Govindarajulu Varadarajan, David Dillow
In-Reply-To: <1410900687-9686-1-git-send-email-_govind@gmx.com>
This patch removes the module parameter rx_copybreak. Add new ethtool
tunable support for setting/getting rx_copybreak.
Cc: David Dillow <dave@thedillows.org>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/3com/typhoon.c | 49 ++++++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index 48775b8..e1f4bf4 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -44,7 +44,7 @@
/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
* Setting to > 1518 effectively disables this feature.
*/
-static int rx_copybreak = 200;
+#define TYPHOON_RX_COPYBREAK_DEFAULT 200
/* Should we use MMIO or Port IO?
* 0: Port IO
@@ -131,12 +131,8 @@ MODULE_VERSION("1.0");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE(FIRMWARE_NAME);
MODULE_DESCRIPTION("3Com Typhoon Family (3C990, 3CR990, and variants)");
-MODULE_PARM_DESC(rx_copybreak, "Packets smaller than this are copied and "
- "the buffer given back to the NIC. Default "
- "is 200.");
MODULE_PARM_DESC(use_mmio, "Use MMIO (1) or PIO(0) to access the NIC. "
"Default is to try MMIO and fallback to PIO.");
-module_param(rx_copybreak, int, 0);
module_param(use_mmio, int, 0);
#if defined(NETIF_F_TSO) && MAX_SKB_FRAGS > 32
@@ -294,6 +290,7 @@ struct typhoon {
/* unused stuff (future use) */
int capabilities;
struct transmit_ring txHiRing;
+ u32 rx_copybreak;
};
enum completion_wait_values {
@@ -1144,6 +1141,43 @@ typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
ering->tx_pending = TXLO_ENTRIES - 1;
}
+static int typhoon_get_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna, void *data)
+{
+ struct typhoon *tp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ *(u32 *)data = tp->rx_copybreak;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static int typhoon_set_tunable(struct net_device *dev,
+ const struct ethtool_tunable *tuna,
+ const void *data)
+{
+ struct typhoon *tp = netdev_priv(dev);
+ int ret = 0;
+
+ switch (tuna->id) {
+ case ETHTOOL_RX_COPYBREAK:
+ tp->rx_copybreak = *(u32 *)data;
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
static const struct ethtool_ops typhoon_ethtool_ops = {
.get_settings = typhoon_get_settings,
.set_settings = typhoon_set_settings,
@@ -1152,6 +1186,8 @@ static const struct ethtool_ops typhoon_ethtool_ops = {
.set_wol = typhoon_set_wol,
.get_link = ethtool_op_get_link,
.get_ringparam = typhoon_get_ringparam,
+ .get_tunable = typhoon_get_tunable,
+ .set_tunable = typhoon_set_tunable,
};
static int
@@ -1659,7 +1695,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * read
pkt_len = le16_to_cpu(rx->frameLen);
- if(pkt_len < rx_copybreak &&
+ if(pkt_len < tp->rx_copybreak &&
(new_skb = netdev_alloc_skb(tp->dev, pkt_len + 2)) != NULL) {
skb_reserve(new_skb, 2);
pci_dma_sync_single_for_cpu(tp->pdev, dma_addr,
@@ -2358,6 +2394,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp->ioaddr = ioaddr;
tp->tx_ioaddr = ioaddr;
tp->dev = dev;
+ tp->rx_copybreak = TYPHOON_RX_COPYBREAK_DEFAULT;
/* Init sequence:
* 1) Reset the adapter to clear any bad juju
--
2.1.0
^ permalink raw reply related
* [PATCH net-next 0/3] Remove rx_copybreak module param, use ethtool to change its value
From: Govindarajulu Varadarajan @ 2014-09-16 20:51 UTC (permalink / raw)
To: davem, netdev
Cc: Govindarajulu Varadarajan, David Dillow, Don Fry, Francois Romieu
Recently rx_copybreak support for ethtool has been added in
commit: f0db9b073415848709dd59a6394969882f517da9
ethtool: Add generic options for tunables
we can use ethtool to change the rx_copybreak value.
This series removes the rx_copybreak module param and adds ethtool support for
the same.
I could only compile test the changes. I do not have the hardware.
Cc: David Dillow <dave@thedillows.org>
Cc: Don Fry <pcnet32@frontier.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Govindarajulu Varadarajan (3):
typhoon: use ethtool for changing rx_copybreak
pcnet32: use ethtool for changing rx_copybreak
sis190: use ethtool for changing rx_copybreak
drivers/net/ethernet/3com/typhoon.c | 49 ++++++++++++++++++++++++++++++++-----
drivers/net/ethernet/amd/pcnet32.c | 49 +++++++++++++++++++++++++++++++++----
drivers/net/ethernet/sis/sis190.c | 47 ++++++++++++++++++++++++++++++++---
3 files changed, 130 insertions(+), 15 deletions(-)
--
2.1.0
^ permalink raw reply
* [PATCH 09/22] batman-adv: Replace strnicmp with strncasecmp
From: Rasmus Villemoes @ 2014-09-16 20:51 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, Rasmus Villemoes, Marek Lindner, b.a.t.m.a.n,
netdev
In-Reply-To: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk>
The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.
To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: netdev@vger.kernel.org
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
net/batman-adv/gateway_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index 6f5e621..88a1bc3 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -44,10 +44,10 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff,
if (strlen(buff) > 4) {
tmp_ptr = buff + strlen(buff) - 4;
- if (strnicmp(tmp_ptr, "mbit", 4) == 0)
+ if (strncasecmp(tmp_ptr, "mbit", 4) == 0)
bw_unit_type = BATADV_BW_UNIT_MBIT;
- if ((strnicmp(tmp_ptr, "kbit", 4) == 0) ||
+ if ((strncasecmp(tmp_ptr, "kbit", 4) == 0) ||
(bw_unit_type == BATADV_BW_UNIT_MBIT))
*tmp_ptr = '\0';
}
@@ -77,10 +77,10 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff,
if (strlen(slash_ptr + 1) > 4) {
tmp_ptr = slash_ptr + 1 - 4 + strlen(slash_ptr + 1);
- if (strnicmp(tmp_ptr, "mbit", 4) == 0)
+ if (strncasecmp(tmp_ptr, "mbit", 4) == 0)
bw_unit_type = BATADV_BW_UNIT_MBIT;
- if ((strnicmp(tmp_ptr, "kbit", 4) == 0) ||
+ if ((strncasecmp(tmp_ptr, "kbit", 4) == 0) ||
(bw_unit_type == BATADV_BW_UNIT_MBIT))
*tmp_ptr = '\0';
}
--
2.0.4
^ permalink raw reply related
* [PATCH 03/22] netfilter: Replace strnicmp with strncasecmp
From: Rasmus Villemoes @ 2014-09-16 20:51 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, Rasmus Villemoes, David S. Miller, netdev,
netfilter-devel, coreteam
In-Reply-To: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk>
The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.
To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
net/netfilter/ipvs/ip_vs_ftp.c | 6 +++---
net/netfilter/nf_conntrack_ftp.c | 4 ++--
net/netfilter/nf_conntrack_sip.c | 22 +++++++++++-----------
net/netfilter/nf_log.c | 2 +-
net/netfilter/nf_nat_sip.c | 2 +-
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 77c1732..cce4a51 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -96,13 +96,13 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
if (data_limit - data < plen) {
/* check if there is partial match */
- if (strnicmp(data, pattern, data_limit - data) == 0)
+ if (strncasecmp(data, pattern, data_limit - data) == 0)
return -1;
else
return 0;
}
- if (strnicmp(data, pattern, plen) != 0) {
+ if (strncasecmp(data, pattern, plen) != 0) {
return 0;
}
s = data + plen;
@@ -353,7 +353,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
data_limit = skb_tail_pointer(skb);
while (data <= data_limit - 6) {
- if (strnicmp(data, "PASV\r\n", 6) == 0) {
+ if (strncasecmp(data, "PASV\r\n", 6) == 0) {
/* Passive mode on */
IP_VS_DBG(7, "got PASV at %td of %td\n",
data - data_start,
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index b8a0924..b666959 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -304,12 +304,12 @@ static int find_pattern(const char *data, size_t dlen,
if (dlen <= plen) {
/* Short packet: try for partial? */
- if (strnicmp(data, pattern, dlen) == 0)
+ if (strncasecmp(data, pattern, dlen) == 0)
return -1;
else return 0;
}
- if (strnicmp(data, pattern, plen) != 0) {
+ if (strncasecmp(data, pattern, plen) != 0) {
#if 0
size_t i;
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 4c3ba1c..885b4ab 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -247,7 +247,7 @@ int ct_sip_parse_request(const struct nf_conn *ct,
for (; dptr < limit - strlen("sip:"); dptr++) {
if (*dptr == '\r' || *dptr == '\n')
return -1;
- if (strnicmp(dptr, "sip:", strlen("sip:")) == 0) {
+ if (strncasecmp(dptr, "sip:", strlen("sip:")) == 0) {
dptr += strlen("sip:");
break;
}
@@ -350,7 +350,7 @@ static const char *ct_sip_header_search(const char *dptr, const char *limit,
continue;
}
- if (strnicmp(dptr, needle, len) == 0)
+ if (strncasecmp(dptr, needle, len) == 0)
return dptr;
}
return NULL;
@@ -383,10 +383,10 @@ int ct_sip_get_header(const struct nf_conn *ct, const char *dptr,
/* Find header. Compact headers must be followed by a
* non-alphabetic character to avoid mismatches. */
if (limit - dptr >= hdr->len &&
- strnicmp(dptr, hdr->name, hdr->len) == 0)
+ strncasecmp(dptr, hdr->name, hdr->len) == 0)
dptr += hdr->len;
else if (hdr->cname && limit - dptr >= hdr->clen + 1 &&
- strnicmp(dptr, hdr->cname, hdr->clen) == 0 &&
+ strncasecmp(dptr, hdr->cname, hdr->clen) == 0 &&
!isalpha(*(dptr + hdr->clen)))
dptr += hdr->clen;
else
@@ -620,9 +620,9 @@ static int ct_sip_parse_transport(struct nf_conn *ct, const char *dptr,
if (ct_sip_parse_param(ct, dptr, dataoff, datalen, "transport=",
&matchoff, &matchlen)) {
- if (!strnicmp(dptr + matchoff, "TCP", strlen("TCP")))
+ if (!strncasecmp(dptr + matchoff, "TCP", strlen("TCP")))
*proto = IPPROTO_TCP;
- else if (!strnicmp(dptr + matchoff, "UDP", strlen("UDP")))
+ else if (!strncasecmp(dptr + matchoff, "UDP", strlen("UDP")))
*proto = IPPROTO_UDP;
else
return 0;
@@ -743,10 +743,10 @@ int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr,
if (term != SDP_HDR_UNSPEC &&
limit - dptr >= thdr->len &&
- strnicmp(dptr, thdr->name, thdr->len) == 0)
+ strncasecmp(dptr, thdr->name, thdr->len) == 0)
break;
else if (limit - dptr >= hdr->len &&
- strnicmp(dptr, hdr->name, hdr->len) == 0)
+ strncasecmp(dptr, hdr->name, hdr->len) == 0)
dptr += hdr->len;
else
continue;
@@ -1394,7 +1394,7 @@ static int process_sip_response(struct sk_buff *skb, unsigned int protoff,
if (handler->response == NULL)
continue;
if (*datalen < matchend + handler->len ||
- strnicmp(*dptr + matchend, handler->method, handler->len))
+ strncasecmp(*dptr + matchend, handler->method, handler->len))
continue;
return handler->response(skb, protoff, dataoff, dptr, datalen,
cseq, code);
@@ -1435,7 +1435,7 @@ static int process_sip_request(struct sk_buff *skb, unsigned int protoff,
if (handler->request == NULL)
continue;
if (*datalen < handler->len ||
- strnicmp(*dptr, handler->method, handler->len))
+ strncasecmp(*dptr, handler->method, handler->len))
continue;
if (ct_sip_get_header(ct, *dptr, 0, *datalen, SIP_HDR_CSEQ,
@@ -1462,7 +1462,7 @@ static int process_sip_msg(struct sk_buff *skb, struct nf_conn *ct,
const struct nf_nat_sip_hooks *hooks;
int ret;
- if (strnicmp(*dptr, "SIP/2.0 ", strlen("SIP/2.0 ")) != 0)
+ if (strncasecmp(*dptr, "SIP/2.0 ", strlen("SIP/2.0 ")) != 0)
ret = process_sip_request(skb, protoff, dataoff, dptr, datalen);
else
ret = process_sip_response(skb, protoff, dataoff, dptr, datalen);
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index daad602..d719764 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -30,7 +30,7 @@ static struct nf_logger *__find_logger(int pf, const char *str_logger)
log = rcu_dereference_protected(loggers[pf][i],
lockdep_is_held(&nf_log_mutex));
- if (!strnicmp(str_logger, log->name, strlen(log->name)))
+ if (!strncasecmp(str_logger, log->name, strlen(log->name)))
return log;
}
diff --git a/net/netfilter/nf_nat_sip.c b/net/netfilter/nf_nat_sip.c
index b4d691d..791fac4 100644
--- a/net/netfilter/nf_nat_sip.c
+++ b/net/netfilter/nf_nat_sip.c
@@ -155,7 +155,7 @@ static unsigned int nf_nat_sip(struct sk_buff *skb, unsigned int protoff,
int request, in_header;
/* Basic rules: requests and responses. */
- if (strnicmp(*dptr, "SIP/2.0", strlen("SIP/2.0")) != 0) {
+ if (strncasecmp(*dptr, "SIP/2.0", strlen("SIP/2.0")) != 0) {
if (ct_sip_parse_request(ct, *dptr, *datalen,
&matchoff, &matchlen,
&addr, &port) > 0 &&
--
2.0.4
^ permalink raw reply related
* Re: [Patch net-next 1/1] net: fec: fix build error at m68k platform
From: David Miller @ 2014-09-16 20:50 UTC (permalink / raw)
To: Frank.Li; +Cc: b38611, netdev, lznuaa, shawn.guo, linux-arm-kernel
In-Reply-To: <1410892458-2113-1-git-send-email-Frank.Li@freescale.com>
From: <Frank.Li@freescale.com>
Date: Wed, 17 Sep 2014 02:34:18 +0800
> From: Frank Li <Frank.Li@freescale.com>
>
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 4d494cdc92b3b9a0f5fb9e1560810fa27d5a0489
> make.cross ARCH=m68k m5272c3_defconfig
> make.cross ARCH=m68k
>
> drivers/net/ethernet/freescale/fec.h:262:0: warning: "FEC_R_DES_START" redefined
> #define FEC_R_DES_START(X) ((X == 1) ? FEC_R_DES_START_1 : \
> ^
> drivers/net/ethernet/freescale/fec.h:158:0: note: this is the location of the previous definition
> #define FEC_R_DES_START 0x3d0 /* Receive descriptor ring */
> ^
> drivers/net/ethernet/freescale/fec.h:265:0: warning: "FEC_X_DES_START" redefined
> #define FEC_X_DES_START(X) ((X == 1) ? FEC_X_DES_START_1 : \
>
> ...
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
Applied.
^ permalink raw reply
* [PATCH v2] scsi: use 'depends' instead of 'select' for SCSI_FC_ATTRS
From: Randy Dunlap @ 2014-09-16 20:47 UTC (permalink / raw)
To: David Miller, James Bottomley; +Cc: netdev@vger.kernel.org, linux-scsi
From: Randy Dunlap <rdunlap@infradead.org>
There are other kconfig symbols which use SCSI_FC_ATTRS.
In order to maintain sanity and prevent kconfig warnings, change
all of these from using 'select' to using 'depends on' so that
proper symbol dependencies will be honored and circular depends
problems will be avoided.
This fixes kconfig warnings and build errors:
warning: (LIBFC && SCSI_IBMVFC && SCSI_QLA_FC && SCSI_LPFC && ZFCP && SCSI_BFA_FC && SCSI_CHELSIO_FCOE && FUSION_FC) selects SCSI_FC_ATTRS which has unmet direct dependencies (SCSI && NET)
drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_event':
drivers/scsi/scsi_transport_fc.c:543:7: error: 'scsi_nl_sock' undeclared (first use in this function)
drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_vendor_event':
drivers/scsi/scsi_transport_fc.c:611:7: error: 'scsi_nl_sock' undeclared (first use in this function)
Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
drivers/message/fusion/Kconfig | 2 +-
drivers/scsi/Kconfig | 10 +++++-----
drivers/scsi/csiostor/Kconfig | 2 +-
drivers/scsi/qla2xxx/Kconfig | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
--- lnx-317-rc5.orig/drivers/message/fusion/Kconfig
+++ lnx-317-rc5/drivers/message/fusion/Kconfig
@@ -29,7 +29,7 @@ config FUSION_SPI
config FUSION_FC
tristate "Fusion MPT ScsiHost drivers for FC"
depends on PCI && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
---help---
SCSI HOST support for a Fiber Channel host adapters.
--- lnx-317-rc5.orig/drivers/scsi/Kconfig
+++ lnx-317-rc5/drivers/scsi/Kconfig
@@ -585,7 +585,7 @@ config HYPERV_STORAGE
config LIBFC
tristate "LibFC module"
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
select CRC32
---help---
Fibre Channel library module
@@ -816,7 +816,7 @@ config SCSI_IBMVSCSI
config SCSI_IBMVFC
tristate "IBM Virtual FC support"
depends on PPC_PSERIES && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
help
This is the IBM POWER Virtual FC Client
@@ -1266,7 +1266,7 @@ source "drivers/scsi/qla4xxx/Kconfig"
config SCSI_LPFC
tristate "Emulex LightPulse Fibre Channel Support"
depends on PCI && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
select CRC_T10DIF
help
This lpfc driver supports the Emulex LightPulse
@@ -1676,7 +1676,7 @@ config SCSI_SUNESP
config ZFCP
tristate "FCP host bus adapter driver for IBM eServer zSeries"
depends on S390 && QDIO && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
help
If you want to access SCSI devices attached to your IBM eServer
zSeries by means of Fibre Channel interfaces say Y.
@@ -1704,7 +1704,7 @@ config SCSI_PM8001
config SCSI_BFA_FC
tristate "Brocade BFA Fibre Channel Support"
depends on PCI && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
help
This bfa driver supports all Brocade PCIe FC/FCOE host adapters.
--- lnx-317-rc5.orig/drivers/scsi/csiostor/Kconfig
+++ lnx-317-rc5/drivers/scsi/csiostor/Kconfig
@@ -1,7 +1,7 @@
config SCSI_CHELSIO_FCOE
tristate "Chelsio Communications FCoE support"
depends on PCI && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
select FW_LOADER
help
This driver supports FCoE Offload functionality over
--- lnx-317-rc5.orig/drivers/scsi/qla2xxx/Kconfig
+++ lnx-317-rc5/drivers/scsi/qla2xxx/Kconfig
@@ -1,7 +1,7 @@
config SCSI_QLA_FC
tristate "QLogic QLA2XXX Fibre Channel Support"
depends on PCI && SCSI
- select SCSI_FC_ATTRS
+ depends on SCSI_FC_ATTRS
select FW_LOADER
---help---
This qla2xxx driver supports all QLogic Fibre Channel
^ permalink raw reply
* Re: [PATCH net-next] of: mdio: honor flags passed to of_phy_connect
From: Florian Fainelli @ 2014-09-16 20:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev, devicetree
In-Reply-To: <20140916.163951.1456738615389200706.davem@davemloft.net>
On 09/16/2014 01:39 PM, David Miller wrote:
> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Tue, 16 Sep 2014 10:49:36 -0700
>
>> Commit f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach,
>> connect, connect_direct}") removed the flags argument to the PHY library
>> calls to: phy_{attach,connect,connect_direct}.
>>
>> Most Device Tree aware drivers call of_phy_connect() with the flag
>> argument set to 0, but some of them might want to set a different value
>> there in order for the PHY driver to key a specific behavior based on
>> the phy_device::dev_flags value.
>>
>> Allow such drivers to set custom dev_flags as part of the
>> of_phy_connect() call since of_phy_connect() does start the PHY state
>> machine, it will call into the PHY driver config_init() callback which
>> is usually where a specific phy_flags value is important.
>>
>> Fixes: f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach, connect, connect_direct}")
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>
> I do not see anyone passing non-zero in as the flags argument.
Right, I have a follow-up patch that will pass non-zero, I will just
submit everything at once so it is clear in what context and purpose
this gets used.
Thanks!
>
> It is difficult for me to determine the impact of this patch,
> whether it should really go to 'net' and/or 'stable', etc.
> if you don't tell me who this could possibly break.
>
> It's even worse when I do all of the searching around and
> cannot find a breakage case myself. :-/
>
^ permalink raw reply
* Re: [Patch net-next v2 2/4] net: fec: add interrupt coalescence feature support
From: David Miller @ 2014-09-16 20:45 UTC (permalink / raw)
To: Frank.Li; +Cc: b38611, netdev, lznuaa, shawn.guo, linux-arm-kernel
In-Reply-To: <1410890290-11248-3-git-send-email-Frank.Li@freescale.com>
From: <Frank.Li@freescale.com>
Date: Wed, 17 Sep 2014 01:58:08 +0800
> +/* ENET interrupt coalescing macro define */
> +#define FEC_ITR_CLK_SEL (0x1 << 30)
> +#define FEC_ITR_EN (0x1 << 31)
> +#define FEC_ITR_ICFT(X) ((X & 0xFF) << 20)
> +#define FEC_ITR_ICTT(X) ((X) & 0xFFFF)
> +#define FEC_ITR_ICFT_DEFAULT 200 /* Set 200 frame count threshold */
> +#define FEC_ITR_ICTT_DEFAULT 1000 /* Set 1000us timer threshold */
...
> +static int
> +fec_enet_set_coalesce(struct net_device *ndev, struct ethtool_coalesce *ec)
The size of these fields in the register determines the limitations of
the various parameters that this chip can support.
Therefore you must validate the user's request and signal an error if
the user asks for coalescing parameters that don't fit into those
fields.
^ permalink raw reply
* Re: [PATCH v12 net-next 03/11] bpf: add lookup/update/delete/iterate methods to BPF maps
From: Alexei Starovoitov @ 2014-09-16 20:44 UTC (permalink / raw)
To: David Miller
Cc: Ingo Molnar, Linus Torvalds, Andy Lutomirski, Daniel Borkmann,
Hannes Frederic Sowa, Chema Gonzalez, Eric Dumazet,
Peter Zijlstra, Pablo Neira Ayuso, H. Peter Anvin, Andrew Morton,
Kees Cook, Linux API, Network Development, LKML
In-Reply-To: <20140916.151606.448751391205382097.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Tue, Sep 16, 2014 at 12:16 PM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
> Date: Mon, 15 Sep 2014 12:18:33 -0700
>
>> @@ -83,6 +112,15 @@ union bpf_attr {
>> __u32 value_size; /* size of value in bytes */
>> __u32 max_entries; /* max number of entries in a map */
>> };
>> +
>> + struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
>> + int map_fd;
>> + void __user *key;
>> + union {
>> + void __user *value;
>> + void __user *next_key;
>> + };
>> + };
>> };
>>
>> #endif /* _UAPI__LINUX_BPF_H__ */
>
> Depending upon the processor ABI, this change can increase the
> alignment requirements of union bpf_attr. So the structure is not
> compatible between patch #1 and patch #3 here.
the union indeed changes alignment from patch #1 to #3,
but, imo, it is not a problem, since kernel does:
/* copy attributes from user space, may be less than sizeof(bpf_attr) */
if (copy_from_user(attr, uattr, size) != 0)
and then proceeds with further bpf_attr validation, so even
if user space alignment is 4 and user assumes contents
from patch 1, but kernel alignment is 8 and contents from
patch 3, it is still ok. Backwards compatibility is preserved.
> Also, you haven't implemented any compat layer whatsoever for the
> necessary translations. This happens because you are using pointers
> which are different sized between 32-bit and 64-bit ABIs.
I mentioned it in the cover letter:
- implemented and tested compat support (not part of this set)
I'll roll compat layer into the set to make it less confusing.
> I would suggest you use instead something like "aligned_u64" since
> these are just arbitrary userland cookies and using "aligned_u64"
> vs. "u64" will make it so that you don't have to deal with the 64-bit
> type alignment differences between x86-32 and x86-64 while writing the
> compat wrappers (if any).
I haven't thought of 'aligned_u64' for this case.
For counters and masks it would be perfect, but here user is
passing real pointers to key and value, so they have to
be 'void __user *', otherwise user would need to type cast
them, which I want to avoid.
>> + struct { /* anonymous struct used by BPF_PROG_LOAD command */
>> + __u32 prog_type; /* one of enum bpf_prog_type */
>> + __u32 insn_cnt;
>> + const struct bpf_insn __user *insns;
>> + const char __user *license;
>> + };
>> +};
>
> Again, these need syscall compat handling. You may want to redesign
> the types so that perhaps no compat layer translations will be needed.
'foo __user *' pointers vs 'aligned_u64'... It's a trade off.
I can make all pointer fields to be u64 and then, indeed,
no compat layer will be needed, but user would need to
do ugly type casts. I think compat layer is a better option.
It's simple enough. I'll roll it into the set and respin.
Thanks!
^ permalink raw reply
* Re: [PATCH net-next] of: mdio: honor flags passed to of_phy_connect
From: David Miller @ 2014-09-16 20:39 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, devicetree
In-Reply-To: <1410889776-11107-1-git-send-email-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 16 Sep 2014 10:49:36 -0700
> Commit f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach,
> connect, connect_direct}") removed the flags argument to the PHY library
> calls to: phy_{attach,connect,connect_direct}.
>
> Most Device Tree aware drivers call of_phy_connect() with the flag
> argument set to 0, but some of them might want to set a different value
> there in order for the PHY driver to key a specific behavior based on
> the phy_device::dev_flags value.
>
> Allow such drivers to set custom dev_flags as part of the
> of_phy_connect() call since of_phy_connect() does start the PHY state
> machine, it will call into the PHY driver config_init() callback which
> is usually where a specific phy_flags value is important.
>
> Fixes: f9a8f83b04e0 ("net: phy: remove flags argument from phy_{attach, connect, connect_direct}")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
I do not see anyone passing non-zero in as the flags argument.
It is difficult for me to determine the impact of this patch,
whether it should really go to 'net' and/or 'stable', etc.
if you don't tell me who this could possibly break.
It's even worse when I do all of the searching around and
cannot find a breakage case myself. :-/
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox