02 Nov, 2009
1 commit
-
Some workloads hit dev_base_lock rwlock pretty hard.
We can use RCU lookups to avoid touching this rwlock
(and avoid touching netdevice refcount)netdevices are already freed after a RCU grace period, so this patch
adds no penalty at device dismantle time.However, it adds a synchronize_rcu() call in dev_change_name()
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
31 Oct, 2009
2 commits
-
RDS currently supports a GET_MR sockopt to establish a
memory region (MR) for a chunk of memory. However, the fastreg
method ties a MR to a particular destination. The GET_MR_FOR_DEST
sockopt allows the remote machine to be specified, and thus
support for fastreg (aka FRWRs).Note that this patch does *not* do all of this - it simply
implements the new sockopt in terms of the old one, so applications
can begin to use the new sockopt in preparation for cutover to
FRWRs.Signed-off-by: Andy Grover
Signed-off-by: David S. Miller -
This isn't beautifully abstracted, but it is simple,
simplifies uses and so far is only needed for the bonding driver.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller
30 Oct, 2009
2 commits
-
This will allow drivers to adjust their receive path dynamically
based on whether GRO is being applied successfully.Currently all in-tree callers ignore the return values of these
functions and do not need to be changed.Signed-off-by: Ben Hutchings
Acked-by: Herbert Xu
Signed-off-by: David S. Miller -
This clarifies which return and parameter types are GRO result codes
and not RX result codes.Signed-off-by: Ben Hutchings
Acked-by: Herbert Xu
Signed-off-by: David S. Miller
29 Oct, 2009
10 commits
-
proto_ops->getname implies copying protocol specific data
into storage unit (particulary to __kernel_sockaddr_storage).
So when we implement new protocol support we should keep such
a detail in mind (which is easy to forget about).Lets introduce DECLARE_SOCKADDR helper which check if
storage unit is not overfowed at build time.Eventually inet_getname is switched to use DECLARE_SOCKADDR
(to show example of usage).Signed-off-by: Cyrill Gorcunov
Signed-off-by: David S. Miller -
Some workloads hit dev_base_lock rwlock pretty hard.
We can use RCU lookups to avoid touching this rwlock.netdevices are already freed after a RCU grace period, so this patch
adds no penalty at device dismantle time.dev_ifname() converted to dev_get_by_index_rcu()
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Add and use no DSCAK bit in the features field.
Signed-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
Add and use no window scale bit in the features field.
Note that this is not the same as setting a window scale of 0
as would happen with window limit on route.Signed-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
Implement querying and acting upon the no timestamp bit in the feature
field.Signed-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
Implement querying and acting upon the no sack bit in the features
field.Signed-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
Adding an accessor to existing dst_entry feautres field and
refactor the only supported feature (allfrag) to use it.Signed-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
We need tcp_parse_options to be aware of dst_entry to
take into account per dst_entry TCP options settingsSigned-off-by: Gilad Ben-Yossef
Sigend-off-by: Ori Finkelman
Sigend-off-by: Yony Amit
Signed-off-by: David S. Miller -
Add ndo_fcoe_get_wwn so Fiber Channel over Ethernet (FCoE) can make use of
the provided World Wide Port Name (WWPN) and World Wide Node Name (WWNN)
from the underlying network interface driver.Signed-off-by: Yi Zou
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller
28 Oct, 2009
7 commits
-
Use unregister_netdevice_many() to speedup master device unregister.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Adding a list_head parameter to rtnl_link_ops->dellink() methods
allow us to queue devices on a list, in order to dismantle
them all at once.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Introduce rollback_registered_many() and unregister_netdevice_many()
rollback_registered_many() is able to perform necessary steps at device dismantle
time, factorizing two expensive synchronize_net() calls.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patchs adds an unreg_list anchor to struct net_device, and
introduces an unregister_netdevice_queue() function, able to queue
a net_device to a list instead of immediately unregister it.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
ieee80211_rx() must be called with bottom halves disabled. To simplify
driver development implement ieee80211_rx_ni() which disables BH. This
function must be used when in process context.Signed-off-by: Kalle Valo
Signed-off-by: John W. Linville -
Get rid of cookies in cfg80211_send_XXX() functions.
Signed-off-by: Holger Schurig
Signed-off-by: John W. Linville -
This slightly shrinks the structure.
Signed-off-by: Michael Buesch
Signed-off-by: John W. Linville
27 Oct, 2009
2 commits
-
Conflicts:
drivers/net/sh_eth.c -
We currently use a 16 bit field (vlan_tci) to store VLAN ID/PRIO on a skb.
Null value is used as a special value, meaning vlan tagging not enabled.
This forbids use of null vlan ID.As pointed by David, some drivers use the 3 high order bits (PRIO)
As VLAN ID is 12 bits, we can use the remaining bit (CFI) as a flag, and
allow null VLAN ID.In case future code really wants to use VLAN_CFI_MASK, we'll have to use
a bit outside of vlan_tci.#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
#define VLAN_PRIO_SHIFT 13
#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */
#define VLAN_TAG_PRESENT VLAN_CFI_MASK
#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */Reported-by: Gertjan Hofman
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
24 Oct, 2009
2 commits
-
When handling large number of netdevice, rtnl_dump_ifinfo()
is very slow because it has O(N^2) complexity.Instead of scanning one single list, we can use the 256 sub lists
of the dev_index hash table.This considerably speedups "ip link" operations
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
SIT tunnels use one rwlock to protect their prl entries.
This first patch adds RCU locking for prl management,
with standard call_rcu() calls.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
23 Oct, 2009
1 commit
-
This adds support for setting the skb mark.
Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
21 Oct, 2009
2 commits
-
dst_negative_advice() should check for changed dst and reset
sk_tx_queue_mapping accordingly. Pass sock to the callers of
dst_negative_advice.(sk_reset_txq is defined just for use by dst_negative_advice. The
only way I could find to get around this is to move dst_negative_()
from dst.h to dst.c, include sock.h in dst.c, etc)Signed-off-by: Krishna Kumar
Signed-off-by: David S. Miller -
Introduce sk_tx_queue_mapping; and functions that set, test and
get this value. Reset sk_tx_queue_mapping to -1 whenever the dst
cache is set/reset, and in socket alloc. Setting txq to -1 and
using valid txq= allows the tx path to use the value
of sk_tx_queue_mapping directly instead of subtracting 1 on every
tx.Signed-off-by: Krishna Kumar
Signed-off-by: David S. Miller
20 Oct, 2009
5 commits
-
commit 9e337b0f (net: annotate inet_timewait_sock bitfields)
added 4/8 bytes in struct inet_timewait_sock.Fix this by declaring tw_ipv6_offset in the 'flags' bitfield
The 14 bits hole is named tw_pad to make it cleary apparent.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Reported-by: Stephen Rothwell
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
It can help being able to filter packets on their queue_mapping.
If filter performance is not good, we could add a "numqueue" field
in struct packet_type, so that netif_nit_deliver() and other functions
can directly ignore packets with not expected queue number.Lets experiment this simple filter extension first.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patch makes the private functions alloc_can_skb() and
alloc_can_err_skb() of the at91_can driver public and adapts all
drivers to use these. While making the patch I realized, that
the skb's are *not* setup consistently. It's now done as shown
below:skb->protocol = htons(ETH_P_CAN);
skb->pkt_type = PACKET_BROADCAST;
skb->ip_summed = CHECKSUM_UNNECESSARY;
*cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
memset(*cf, 0, sizeof(struct can_frame));The frame is zeroed out to avoid uninitialized data to be passed to
user space. Some drivers or library code did not set "pkt_type" or
"ip_summed". Also, "__constant_htons()" should not be used for
runtime invocations, as pointed out by David Miller.Signed-off-by: Wolfgang Grandegger
Signed-off-by: David S. Miller -
Allow bpf to set a filter to drop packets that dont
match a specific markSigned-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
19 Oct, 2009
4 commits
-
The last users of skb_icv_walk are converted to ahash now,
so skb_icv_walk is unused and can be removed.Signed-off-by: Steffen Klassert
Signed-off-by: David S. Miller -
ah4 and ah6 are converted to ahash now, so we can remove the
code for the obsolete hash algorithm.Signed-off-by: Steffen Klassert
Signed-off-by: David S. Miller -
To support for ahash algorithms, we add a pointer to a
crypto_ahash to ah_data.Signed-off-by: Steffen Klassert
Signed-off-by: David S. Miller -
In order to have better cache layouts of struct sock (separate zones
for rx/tx paths), we need this preliminary patch.Goal is to transfert fields used at lookup time in the first
read-mostly cache line (inside struct sock_common) and move sk_refcnt
to a separate cache line (only written by rx path)This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
sport and id fields. This allows a future patch to define these
fields as macros, like sk_refcnt, without name clashes.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
15 Oct, 2009
2 commits
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
The Phonet "universe" only has 64 addresses, so we keep a trivial flat
routing table.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller