15 Jun, 2013
11 commits
-
While this currently cannot trigger any NULL pointer dereference in
sctp_seq_dump_local_addrs(), better change the order of commands to
prevent a future bug to happen. Although we first add SCTP_CMD_NEW_ASOC
and then set the SCTP_CMD_INIT_CHOOSE_TRANSPORT, it is okay for now,
since this primitive is only called by sctp_connect() or sctp_sendmsg()
with sctp_assoc_add_peer() set first. However, lets do this precaution
and first set the transport and then add it to the association hashlist
to prevent in future something to possibly triggering this.Signed-off-by: Daniel Borkmann
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller -
This clearly states a BUG somewhere in the SCTP code as e.g. fixed once
in f28156335 ("sctp: Use correct sideffect command in duplicate cookie
handling"). If this ever happens, throw a trace in the sideeffect engine
where assocs clearly must have a primary_path assigned.When in sctp_seq_dump_local_addrs() also throw a WARN and bail out since
we do not need to panic for printing this one asterisk. Also, it will
avoid the not so obvious case when primary != NULL test passes and at a
later point in time triggering a NULL ptr dereference caused by primary.
While at it, also fix up the white space.Signed-off-by: Daniel Borkmann
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller -
Jesse Gross says:
====================
A few miscellaneous improvements and cleanups before the GRE tunnel
integration series. Intended for net-next/3.11.
====================Signed-off-by: David S. Miller
-
This is not functional change, this is just code cleanup.
Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross -
Following patch keeps skb->csum correct across ovs.
Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross -
Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross -
Flagged with: https://github.com/lyda/misspell-check
Run with: git ls-files | misspellings -f -Signed-off-by: Andy Hill
Signed-off-by: Jesse Gross -
Signed-off-by: Lorand Jakab
Signed-off-by: Jesse Gross -
Following patch changes vport->send return type so that vport
layer can do error accounting.Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross -
The get_config vport op is left over from old compatibility code,
it is neither used nor implemented any more.Signed-off-by: Jesse Gross
-
It is an error to try to change the type of a vport using the set
command. However, while we check that this is an error, we still
proceed to allocate memory which then gets freed immediately.
This stops processing after noticing the error, which does not
actually fix a bug but is more correct.Signed-off-by: Jesse Gross
14 Jun, 2013
5 commits
-
Add support to change the link state of VF (vPort)
Signed-off-by: Rony Efraim
Signed-off-by: Or Gerlitz
Signed-off-by: David S. Miller -
Add netlink directives and ndo entry to allow for controling
VF link, which can be in one of three states:Auto - VF link state reflects the PF link state (default)
Up - VF link state is up, traffic from VF to VF works even if
the actual PF link is downDown - VF link state is down, no traffic from/to this VF, can be of
use while configuring the VFSigned-off-by: Rony Efraim
Signed-off-by: Or Gerlitz
Signed-off-by: David S. Miller -
This patch adds support for the Broadcom BCM6345 SoC Ethernet. BCM6345
has a slightly different and older DMA engine which requires the
following modifications:- the width of the DMA channels on BCM6345 is 64 bytes vs 16 bytes,
which means that the helpers enet_dma{c,s} need to account for this
channel width and we can no longer use macros- BCM6345 DMA engine does not have any internal SRAM for transfering
buffers- BCM6345 buffer allocation and flow control is not per-channel but
global (done in RSET_ENETDMA)- the DMA engine bits are right-shifted by 3 compared to other DMA
generations- the DMA enable/interrupt masks are a little different (we need to
enabled more bits for 6345)- some register have the same meaning but are offsetted in the ENET_DMAC
space so a lookup table is required to return the proper offsetThe MAC itself is identical and requires no modifications to work.
Signed-off-by: Florian Fainelli
Acked-by: Ralf Baechle
Signed-off-by: David S. Miller -
htb_class structures are big, and source of false sharing on SMP.
By carefully splitting them in two parts, we can improve performance.
I got 9 % performance increase on a 24 threads machine, with 200
concurrent netperf in TCP_RR mode, using a HTB hierarchy of 4 classes.Signed-off-by: Eric Dumazet
Cc: Tom Herbert
Signed-off-by: David S. Miller -
Caught by sparse:
- __rcu: missing annotation to sd->flow_limit
- __user: direct access in cpumask_scnprintfAlso
- add endline character when printing bitmap if room in buffer
- avoid bucket overflow by reducing FLOW_LIMIT_HISTORYThe last item warrants some explanation. The hashtable buckets are
subject to overflow if FLOW_LIMIT_HISTORY is larger than or equal
to bucket size, since all packets may end up in a single bucket. The
current (rather arbitrary) history value of 256 happens to match the
buffer size (u8).As a result, with a single flow, the first 128 packets are accepted
(correct), the second 128 packets dropped (correct) and then the
history[] array has filled, so that each subsequent new packet
causes an increment in the bucket for new_flow plus a decrement
for old_flow: a steady state.This is fine if packets are dropped, as the steady state goes away
as soon as a mix of traffic reappears. But, because the 256th packet
overflowed the bucket to 0: no packets are dropped.Instead of explicitly adding an overflow check, this patch changes
FLOW_LIMIT_HISTORY to never be able to overflow a single bucket.Reported-by: Fengguang Wu
(first item)Signed-off-by: Willem de Bruijn
Signed-off-by: David S. Miller
13 Jun, 2013
18 commits
-
Linux sends new unset data during disorder and recovery state if all
(suspected) lost packets have been retransmitted ( RFC5681, section
3.2 step 1 & 2, RFC3517 section 4, NexSeg() Rule 2). One requirement
is to keep the receive window about twice the estimated sender's
congestion window (tcp_rcv_space_adjust()), assuming the fast
retransmits repair the losses in the next round trip.But currently it's not the case on the first round trip in either
normal or Fast Open connection, beucase the initial receive window
is identical to (expected) sender's initial congestion window. The
fix is to double it.Signed-off-by: Yuchung Cheng
Acked-by: Neal Cardwell
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
Now that the SoC specific support is no longer done with help of #ifdef'fery,
we no longer need '__maybe_unused' annotations to sh_eth_select_mii() and
sh_eth_set_duplex()...Signed-off-by: Sergei Shtylyov
Signed-off-by: David S. Miller -
Reduce the uses of this unnecessary typedef.
Done via perl script:
$ git grep --name-only -w ctl_table net | \
xargs perl -p -i -e '\
sub trim { my ($local) = @_; $local =~ s/(^\s+|\s+$)//g; return $local; } \
s/\b(?<!struct\s)ctl_table\b(\s*\*\s*|\s+\w+)/"struct ctl_table " . trim($1)/ge'Reflow the modified lines that now exceed 80 columns.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Since team functionality relies heavily on userspace daemon, we need to
deliver event to userspace via Netlink as quick as possible. So make all
team port device link events urgent.Signed-off-by: Flavio Leitner
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
net/ipv4/ping.c:286:5: sparse: symbol 'ping_check_bind_addr' was not declared. Should it be static?
net/ipv4/ping.c:355:6: sparse: symbol 'ping_set_saddr' was not declared. Should it be static?
net/ipv4/ping.c:370:6: sparse: symbol 'ping_clear_saddr' was not declared. Should it be static?net/ipv6/ping.c:60:5: sparse: symbol 'dummy_ipv6_recv_error' was not declared. Should it be static?
net/ipv6/ping.c:64:5: sparse: symbol 'dummy_ip6_datagram_recv_ctl' was not declared. Should it be static?
net/ipv6/ping.c:69:5: sparse: symbol 'dummy_icmpv6_err_convert' was not declared. Should it be static?
net/ipv6/ping.c:73:6: sparse: symbol 'dummy_ipv6_icmp_error' was not declared. Should it be static?
net/ipv6/ping.c:75:5: sparse: symbol 'dummy_ipv6_chk_addr' was not declared. Should it be static?
net/ipv6/ping.c:201:5: sparse: symbol 'ping_v6_seq_show' was not declared. Should it be static?Signed-off-by: Fengguang Wu
Signed-off-by: David S. Miller -
net_device::dev_id should not be used merely to indicate a VI index,
as it affects the way the local part of IPv6 addresses is normally
generated.This field was intended for use where multiple devices may share a
single assigned MAC address and need to have different IPv6 addresses.
T4 VIs each have their own MAC address.Signed-off-by: Ben Hutchings
Acked-by: Dimitris Michailidis
Signed-off-by: David S. Miller -
Return -EINVAL on illegal flag instead of uninitialized value. This fixes the
kbuild test warning.Signed-off-by: Jason Wang
Signed-off-by: David S. Miller -
This patch silents the following sparse warnings:
drivers/net/macvtap.c:98:9: warning: incorrect type in assignment (different
address spaces)
drivers/net/macvtap.c:98:9: expected struct macvtap_queue *
drivers/net/macvtap.c:98:9: got struct macvtap_queue [noderef]
*
drivers/net/macvtap.c:120:9: warning: incorrect type in assignment (different
address spaces)
drivers/net/macvtap.c:120:9: expected struct macvtap_queue *
drivers/net/macvtap.c:120:9: got struct macvtap_queue [noderef]
*
drivers/net/macvtap.c:151:22: error: incompatible types in comparison expression
(different address spaces)
drivers/net/macvtap.c:233:23: error: incompatible types in comparison expression
(different address spaces)
drivers/net/macvtap.c:243:23: error: incompatible types in comparison expression
(different address spaces)
drivers/net/macvtap.c:247:15: error: incompatible types in comparison expression
(different address spaces)
CC [M] drivers/net/macvtap.o
drivers/net/macvlan.c:232:24: error: incompatible types in comparison expression
(different address spaces)Signed-off-by: Jason Wang
Signed-off-by: David S. Miller -
Corrects an byte order conflict introduced by
158874cac61245b84e939c92c53db7000122b7b0
("sctp: Correct access to skb->{network, transport}_header").
The values in question are host byte order.Signed-off-by: Simon Horman
Signed-off-by: David S. Miller -
Commit da12c90e099789a63073fc82a19542ce54d4efb9
"netlink: Add compare function for netlink_table"
only set compare at the time we create kernel netlink,
and reset compare to NULL at the time we finially
release netlink socket, but netlink_lookup wants
the compare exist always.So we should set compare after we allocate nl_table,
and never reset it. make comapre exist all the time.Reported-by: Fengguang Wu
Signed-off-by: Gao feng
Signed-off-by: David S. Miller -
commit 6648bd7e0e62c0c8c03b (ipv4: Add sysctl knob to control
early socket demux) introduced such sysctl, but forgot to add
doc into Documentation/networking/ip-sysctl.txt. This patch adds it.Basically I grab the doc from the description of commit 41063e9dd11956f2d285
(ipv4: Early TCP socket demux.) and the above commit.Cc: Eric Dumazet
Cc: Alexander Duyck
Cc: David S. Miller
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
This routine doesn't fail since 9fdc6bef (tuntap: dont use a private kmem_cache)
so it makes sense to compact the code a little bit.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The TUN_PERSIST flag is not reported at all -- both TUNGETIFF, and sysfs
"flags" attribute skip one. Knowing whether a device is persistent or not
is critical for checkpoint-restore, thus I propose to add the read-only
IFF_PERSIST one for this.Setting this new IFF_PERSIST is hardly possible, as TUNSETIFF doesn't check
for unknown flags being zero and thus there can be trash.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
commit ba418fa357a7b3c ("soreuseport: UDP/IPv4 implementation")
added following sparse errors :net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:433:60: expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:433:60: got restricted __be16 [usertype] sport
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:514:60: expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:514:60: got restricted __be16 [usertype] sport
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Fix following sparse error :
net/ipv4/af_inet.c:1410:59: warning: restricted __be16 degrades to
integeradded in commit db8caf3dbc77599
("gro: should aggregate frames without DF")Reported-by: kbuild test robot
From: Eric DumazetSigned-off-by: David S. Miller
-
John W. Linville says:
====================
This pull request is intended for the 3.11 stream...One big highlight is the cw1200 driver the ST-E CW1100 & CW1200
WLAN chipsets. This one has been lingering for a while, lacking
some review comments. Once started getting pulled into linux-next,
it got a bit more attention and a number of improvements were made
over the initial cut. No doubt there will be more changes ahead,
but I think it is looking alright at this point.Along with that, there is the usual flurry of updates to the mac80211
core and the iwlwifi, mwifiex, ath9k, rt2x00, wil6210, and other
drivers. A few of the highlights are some rt2x00 refactoring/cleanup
by Gabor Juhos, some rt2800 hardware support enhancements by Stanislaw
Gruszka, some iwlwifi power management updates from Alexander Bondar,
some enhanced bcma SPROM support from Rafał Miłecki, and a variety
of other things here and there.
====================Signed-off-by: David S. Miller
-
Commit 9f86134155047720a3685cda21467f68695152d2 (sh_eth: remove SH_ETH_HAS_TSU)
removes 'const' from 'sh_eth_netdev_ops' and modifies it in case TSU registers
are present. I've originally suggested to Iwamatsu-san to split this structure
in two instead and afterwards Dave M. suggested doing the same.
Split 'sh_eth_netdev_ops_tsu' from 'sh_eth_netdev_ops', making both 'const', and
assigning 'ndev->detdev_ops' depending on the presence of TSU registers.Signed-off-by: Sergei Shtylyov
Signed-off-by: David S. Miller -
Fix following sparse errors :
net/ipv4/igmp.c:1222:25: warning: cast from restricted __be32
net/ipv4/igmp.c:1234:31: warning: incorrect type in assignment (different address spaces)
net/ipv4/igmp.c:1234:31: expected struct ip_mc_list [noderef] *next_hash
net/ipv4/igmp.c:1234:31: got struct ip_mc_list *
net/ipv4/igmp.c:1250:31: warning: incorrect type in assignment (different address spaces)
net/ipv4/igmp.c:1250:31: expected struct ip_mc_list [noderef] *next_hash
net/ipv4/igmp.c:1250:31: got struct ip_mc_list *
net/ipv4/igmp.c:2380:37: warning: cast from restricted __be32These were added by commit e9897071350bd9
("igmp: hash a hash table to speedup ip_check_mc_rcu()")Reported-by: kbuild test robot
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
12 Jun, 2013
6 commits
-
Older Single Queue (SQ_SG_MODE) devices like TSEC (i.e. mpc83xx)
don't feature the frame receive indication bits (RXF) in RSTAT.
For these and for the rest of the SQ_SG_MODE devices, provide the
appropiate polling routine that handles a single pair of Rx/Tx
BD rings, removing the overhead incurred by the multiple queues/
multiple interrupt group devices (veTSEC/ eTSEC2.0 devices).
So this is primarily a fix for the TSEC devices.Signed-off-by: Claudiu Manoil
Signed-off-by: David S. Miller -
We should not use net_device::dev_id to indicate the port number, as
this affects the way the local part of IPv6 addresses is normally
generated.This field was intended for use where multiple devices may share a
single assigned MAC address and need to have different IPv6 addresses.
Siena's two ports each have their own MAC addresses.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
commit ef722495c8867aacc1db0675a6737e5cf1e72e07
( [IPV4]: Remove unused ip_options->is_data) removed the unused is_data
member from ip_options struct.This patch removes is_data also from the documentation of the ip_options struct.
Signed-off-by: Rami Rosen
Signed-off-by: David S. Miller -
Check the unlikely case of team->en_port_count == 0 before modulo
operation.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This patch removes synchronize_rcu() from function
__team_queue_override_port_del(). That can be done because it is ok to
do list_del_rcu() and list_add_tail_rcu() on the same list_head member
without calling synchronize_rcu() in between. A bit of refactoring
needed to be done because INIT_LIST_HEAD needed to be removed (to not
kill the forward pointer) as well.Signed-off-by: Jiri Pirko
Acked-by: Flavio Leitner
Signed-off-by: David S. Miller