summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* arcnet: Move EXPORT_SYMBOL after declarationsJoe Perches2015-09-231-15/+18
| | | | | | | Use the normal kernel style for EXPORT_SYMBOL. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Convert printk to pr_<level>Joe Perches2015-09-2312-64/+65
| | | | | | | | | | Use the more current logging style. Remove #define VERSION, use pr_info normally. Add pr_fmt with "arcnet:" prefixes and KBUILD_MODNAME. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Convert BUGMSG and BUGMSG2 to arc_prink and arc_contJoe Perches2015-09-2312-327/+355
| | | | | | | | | | These macros don't actually represent BUG uses but are more commonly used as logging macros, so use a more kernel style macro. Convert the BUGMSG from a netdev_ like use to actually use netdev_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Expand odd BUGLVL macro with if and usesJoe Perches2015-09-2312-58/+93
| | | | | | | | | Don't hide what should be obvious. Make the macro a simple test instead of using if and test. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Neaten BUGMSG macro definesJoe Perches2015-09-231-7/+17
| | | | | | | | | | These macros are actually printk and pr_cont uses with a flag. Add a new BUGLVL_TEST macro which is just the "should use" test and not an odd "if (<foo>)" macro to simplify uses in a new patch. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Use network block comment styleJoe Perches2015-09-2311-132/+95
| | | | | | | Conformity can be useful. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Use include/linux path for asmJoe Perches2015-09-237-7/+7
| | | | | | | Use the preferred kernel include path for asm paths. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Coalesce string fragmentsJoe Perches2015-09-236-36/+22
| | | | | | | Using coalesced strings helps grep for specific messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Use normal kernel brace styleJoe Perches2015-09-238-71/+52
| | | | | | | | Move braces normal kernel locations. Add missing braces. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Add and remove blank linesJoe Perches2015-09-2313-93/+13
| | | | | | | Use a more current kernel line style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: Use normal kernel spacing styleJoe Perches2015-09-2313-394/+394
| | | | | | | | | | Standardized spacing is easier to read. git diff -w shows no differences. objdiff shows no differences. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* arcnet: fix indentation of if_arcnet.hJoe Perches2015-09-231-29/+26
| | | | | | | Standardized spacing is easier to read. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* usbnet: remove invalid checkAndrzej Hajda2015-09-223-15/+0
| | | | | | | | | | | | skb->len is always non-negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rndis_wlan: fix checking for default valueAndrzej Hajda2015-09-221-1/+1
| | | | | | | | | | | | | Thresholds uses -1 to indicate that default value should be used. Since thresholds are unsigned sign checking makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* orinoco: fix checking for default valueAndrzej Hajda2015-09-221-3/+3
| | | | | | | | | | | | | Thresholds uses -1 to indicate that default value should be used. Since thresholds are unsigned sign checking makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mwifiex: fix comparison expressionAndrzej Hajda2015-09-221-2/+2
| | | | | | | | | | | | | To avoid underflows signed variables should be used in expression. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: brcm80211: fix range checkAndrzej Hajda2015-09-221-1/+1
| | | | | | | | | | | | | Unsigned minus constant is still unsigned so checking its sign makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: fix type of entry variableAndrzej Hajda2015-09-221-1/+1
| | | | | | | | | | | | Variable can store negative values. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/ibm/emac: fix type of phy_modeAndrzej Hajda2015-09-221-1/+1
| | | | | | | | | | | | phy_mode can be negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: hisax: fix frame calculationAndrzej Hajda2015-09-221-5/+5
| | | | | | | | | | | | | Difference of unsigned values is also unsigned so it does not make sense to check its sign. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller2015-09-22120-653/+816
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for your net-next tree in this 4.4 development cycle, they are: 1) Schedule ICMP traffic to IPVS instances, this introduces a new schedule_icmp proc knob to enable/disable it. By default is off to retain the old behaviour. Patchset from Alex Gartrell. I'm also including what Alex originally said for the record: "The configuration of ipvs at Facebook is relatively straightforward. All ipvs instances bgp advertise a set of VIPs and the network prefers the nearest one or uses ECMP in the event of a tie. For the uninitiated, ECMP deterministically and statelessly load balances by hashing the packet (usually a 5-tuple of protocol, saddr, daddr, sport, and dport) and using that number as an index (basic hash table type logic). The problem is that ICMP packets (which contain really important information like whether or not an MTU has been exceeded) will get a different hash value and may end up at a different ipvs instance. With no information about where to route these packets, they are dropped, creating ICMP black holes and breaking Path MTU discovery. Suddenly, my mom's pictures can't load and I'm fielding midday calls that I want nothing to do with. To address this, this patch set introduces the ability to schedule icmp packets which is gated by a sysctl net.ipv4.vs.schedule_icmp. If set to 0, the old behavior is maintained -- otherwise ICMP packets are scheduled." 2) Add another proc entry to ignore tunneled packets to avoid routing loops from IPVS, also from Alex. 3) Fifteen patches from Eric Biederman to: * Stop passing nf_hook_ops as parameter to the hook and use the state hook object instead all around the netfilter code, so only the private data pointer is passed to the registered hook function. * Now that we've got state->net, propagate the netns pointer to netfilter hook clients to avoid its computation over and over again. A good example of how this has been simplified is the former TEE target (now nf_dup infrastructure) since it has killed the ugly pick_net() function. There's another round of netns updates from Eric Biederman making the line. To avoid the patchbomb again to almost all the networking mailing list (that is 84 patches) I'd suggest we send you a pull request with no patches or let me know if you prefer a better way. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * netfilter: Use nf_ct_net instead of dev_net(out) in nf_nat_masquerade_ipv6Eric W. Biederman2015-09-181-1/+1
| | | | | | | | | | | | | | | | | | Use nf_ct_net(ct) instead of guessing that the netdevice out can reliably report the network namespace the conntrack operation is happening in. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: Pass net into nf_xfrm_me_harderEric W. Biederman2015-09-184-7/+7
| | | | | | | | | | | | | | | | Instead of calling dev_net on a likley looking network device pass state->net into nf_xfrm_me_harder. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: Pass priv instead of nf_hook_ops to netfilter hooksEric W. Biederman2015-09-1843-157/+156
| | | | | | | | | | | | | | | | | | Only pass the void *priv parameter out of the nf_hook_ops. That is all any of the functions are interested now, and by limiting what is passed it becomes simpler to change implementation details. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * ipvs: Read hooknum from state rather than ops->hooknumEric W. Biederman2015-09-181-8/+8
| | | | | | | | | | | | | | | | This should be more cache efficient as state is more likely to be in core, and the netfilter core will stop passing in ops soon. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: nf_conntrack: Add a struct net parameter to l4_pkt_to_tupleEric W. Biederman2015-09-1816-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | As gre does not have the srckey in the packet gre_pkt_to_tuple needs to perform a lookup in it's per network namespace tables. Pass in the proper network namespace to all pkt_to_tuple implementations to ensure gre (and any similar protocols) can get this right. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * act_connmark: Remember the struct net instead of guessing it.Eric W. Biederman2015-09-182-1/+3
| | | | | | | | | | | | | | | | | | Stop guessing the struct net instead of remember it. Guessing is just silly and will be problematic in the future when I implement routes between network namespaces. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: Pass net to nf_dup_ipv4 and nf_dup_ipv6Eric W. Biederman2015-09-187-44/+14
| | | | | | | | | | | | | | This allows them to stop guessing the network namespace with pick_net. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: nf_tables: Use pkt->net instead of computing net from the passed ↵Eric W. Biederman2015-09-185-20/+15
| | | | | | | | | | | | | | net_devices Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: nf_tables: Pass struct net in nft_pktinfoEric W. Biederman2015-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | nft_pktinfo is passed on the stack so this does not bloat any in core data structures. By centrally computing this information this makes maintence of the code simpler, and understading of the code easier. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: x_tables: Use par->net instead of computing from the passed net ↵Eric W. Biederman2015-09-1817-43/+41
| | | | | | | | | | | | | | devices Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: x_tables: Pass struct net in xt_action_paramEric W. Biederman2015-09-188-1/+9
| | | | | | | | | | | | | | | | | | | | | | As xt_action_param lives on the stack this does not bloat any persistent data structures. This is a first step in making netfilter code that needs to know which network namespace it is executing in simpler. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: nf_tables: kill nft_pktinfo.opsEric W. Biederman2015-09-1825-64/+54
| | | | | | | | | | | | | | | | | | | | | | | | - Add nft_pktinfo.pf to replace ops->pf - Add nft_pktinfo.hook to replace ops->hooknum This simplifies the code, makes it more readable, and likely reduces cache line misses. Maintainability is enhanced as the details of nft_hook_ops are of no concern to the recpients of nft_pktinfo. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * inet netfilter: Prefer state->hook to ops->hooknumEric W. Biederman2015-09-186-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | The values of nf_hook_state.hook and nf_hook_ops.hooknum must be the same by definition. We are more likely to access the fields in nf_hook_state over the fields in nf_hook_ops so with a little luck this results in fewer cache line misses, and slightly more consistent code. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * inet netfilter: Remove hook from ip6t_do_table, arp_do_table, ipt_do_tableEric W. Biederman2015-09-1817-41/+25
| | | | | | | | | | | | | | | | | | | | | | | | The values of ops->hooknum and state->hook are guaraneted to be equal making the hook argument to ip6t_do_table, arp_do_table, and ipt_do_table is unnecessary. Remove the unnecessary hook argument. In the callers use state->hook instead of ops->hooknum for clarity and to reduce the number of cachelines the callers touch. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: ebtables: Simplify the arguments to ebt_do_tableEric W. Biederman2015-09-185-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nearly everything thing of interest to ebt_do_table is already present in nf_hook_state. Simplify ebt_do_table by just passing in the skb, nf_hook_state, and the table. This make the code easier to read and maintenance easier. To support this create an nf_hook_state on the stack in ebt_broute (the only caller without a nf_hook_state already available). This new nf_hook_state adds no new computations to ebt_broute, but does use a few more bytes of stack. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * Merge tag 'ipvs-for-v4.4' of ↵Pablo Neira Ayuso2015-09-1813-218/+427
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Simon Horman says: ==================== IPVS Updates for v4.4 please consider these IPVS Updates for v4.4. The updates include the following from Alex Gartrell: * Scheduling of ICMP * Sysctl to ignore tunneled packets; and hence some packet-looping scenarios ==================== Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| | * ipvs: add sysctl to ignore tunneled packetsAlex Gartrell2015-09-174-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | This is a way to avoid nasty routing loops when multiple ipvs instances can forward to eachother. Signed-off-by: Alex Gartrell <agartrell@fb.com> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: support scheduling inverse and icmp SCTP packetsAlex Gartrell2015-09-011-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the event of an icmp packet, take only the ports instead of trying to grab the full header. In the event of an inverse packet, use the source address and port. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: support scheduling inverse and icmp UDP packetsAlex Gartrell2015-09-011-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the event of an icmp packet, take only the ports instead of trying to grab the full header. In the event of an inverse packet, use the source address and port. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: support scheduling inverse and icmp TCP packetsAlex Gartrell2015-09-011-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the event of an icmp packet, take only the ports instead of trying to grab the full header. In the event of an inverse packet, use the source address and port. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: ensure that ICMP cannot be sent in reply to ICMPAlex Gartrell2015-09-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Check the header for icmp before sending a PACKET_TOO_BIG Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: attempt to schedule icmp packetsAlex Gartrell2015-09-014-9/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoke the try_to_schedule logic from the icmp path and update it to the appropriate ip_vs_conn_put function. The schedule functions have been updated to reject the packets immediately for now. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: sh: support scheduling icmp/inverse packets consistentlyAlex Gartrell2015-09-011-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | "source_hash" the dest fields if it's an inverse packet. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: Use outer header in ip_vs_bypass_xmit_v6Alex Gartrell2015-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ip_vs_iphdr may refer to an internal header, so use the outer one instead. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: add schedule_icmp sysctlAlex Gartrell2015-09-012-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | This sysctl will be used to enable the scheduling of icmp packets. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: Make ip_vs_schedule aware of inverse iph'esAlex Gartrell2015-09-011-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary to schedule icmp later. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: drop inverse argument to conn_{in,out}_getAlex Gartrell2015-09-015-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | No longer necessary since the information is included in the ip_vs_iphdr itself. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: pull out ip_vs_try_to_schedule functionAlex Gartrell2015-09-011-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary as we'll be trying to schedule icmp later and we'll want to share this code. Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| | * ipvs: Handle inverse and icmp headers in ip_vs_leaveAlex Gartrell2015-09-011-12/+21
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Gartrell <agartrell@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
OpenPOWER on IntegriCloud