- 05 5月, 2011 2 次提交
-
-
由 Kurt Van Dijck 提交于
can: rename can_try_module_get to can_get_proto can_try_module_get does return a struct can_proto. The name explains what is done in so much detail that a caller may not notice that a struct can_proto is locked/unlocked. Signed-off-by: NKurt Van Dijck <kurt.van.dijck@eia.be> Acked-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Kurt Van Dijck 提交于
commit 53914b67 had the same message. That commit did put everything in place but did not make can_proto const itself. Signed-off-by: NKurt Van Dijck <kurt.van.dijck@eia.be> Acked-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 4月, 2011 1 次提交
-
-
由 Oliver Hartkopp 提交于
This patch removes spin_locks at CAN socket creation time by using RCU. Inspired by the discussion with Kurt van Dijck and Eric Dumazet the RCU code was partly derived from af_phonet.c Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Reviewed-by: NEric Dumazet <eric.dumazet@gmail.com> Acked-by: NKurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 28 3月, 2011 1 次提交
-
-
由 Oliver Hartkopp 提交于
can_ioctl is the only reason for struct proto to be non-const. script/check-patch.pl suggests struct proto be const. Setting the reference to the common can_ioctl() in all CAN protocols directly removes the need to make the struct proto writable in af_can.c Signed-off-by: NKurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 2月, 2010 1 次提交
-
-
由 Oliver Hartkopp 提交于
In commit 20dd3850 "can: Speed up CAN frame receiption by using ml_priv" the formerly used hlist of receiver lists for each CAN netdevice has been replaced. The hlist content ensured only CAN netdevices to be accessed by the can_rx_(un)register() functions which accidently dropped away together with the hlist receiver implementation. This patch re-introduces the check for CAN netdevices in can_rx_(un)register(). Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 1月, 2010 1 次提交
-
-
由 Oliver Hartkopp 提交于
this patch removes the hlist that contains the CAN receiver filter lists. It uses the 'midlayer private' pointer ml_priv and links the filters directly to the CAN netdevice, which allows to omit the walk through the complete CAN devices hlist for each received CAN frame. This patch is tested and does not remove any locking. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 30 11月, 2009 1 次提交
-
-
由 Joe Perches 提交于
Not including net/atm/ Compiled tested x86 allyesconfig only Added a > 80 column line or two, which I ignored. Existing checkpatch plaints willfully, cheerfully ignored. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 11月, 2009 1 次提交
-
-
由 Octavian Purdila 提交于
Generated with the following semantic patch @@ struct net *n1; struct net *n2; @@ - n1 == n2 + net_eq(n1, n2) @@ struct net *n1; struct net *n2; @@ - n1 != n2 + !net_eq(n1, n2) applied over {include,net,drivers/net}. Signed-off-by: NOctavian Purdila <opurdila@ixiacom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 11月, 2009 2 次提交
-
-
由 Eric Paris 提交于
The generic __sock_create function has a kern argument which allows the security system to make decisions based on if a socket is being created by the kernel or by userspace. This patch passes that flag to the net_proto_family specific create function, so it can do the same thing. Signed-off-by: NEric Paris <eparis@redhat.com> Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Paris 提交于
struct can_proto had a capability field which wasn't ever used. It is dropped entirely. struct inet_protosw had a capability field which can be more clearly expressed in the code by just checking if sock->type = SOCK_RAW. Signed-off-by: NEric Paris <eparis@redhat.com> Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 10月, 2009 1 次提交
-
-
由 Stephen Hemminger 提交于
All usages of structure net_proto_ops should be declared const. Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 9月, 2009 1 次提交
-
-
由 Oliver Hartkopp 提交于
When using nanosleep() in an userspace application we get a ratelimit warning NOHZ: local_softirq_pending 08 for 10 times. The echo of CAN frames is done from process context and softirq context only. Therefore the usage of netif_rx() was wrong (for years). This patch replaces netif_rx() with netif_rx_ni() which has to be used from process/softirq context. It also adds a missing comment that can_send() must no be used from hardirq context. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NUrs Thuermann <urs@isnogud.escape.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 31 8月, 2009 1 次提交
-
-
由 Oliver Hartkopp 提交于
Dropped skb's should be documented by an appropriate return value. Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 8月, 2009 1 次提交
-
-
由 Oliver Hartkopp 提交于
To ensure a proper handling of CAN frames transported in skbuffs some checks need to be performed at receive time. As stated by Michael Olbrich and Luotao Fu BUG_ON() might be to restrictive. This is right as we can just drop the non conform skbuff and the Kernel can continue working. This patch replaces the BUG_ON() with a WARN_ONCE() so that the system remains healthy but we made the problem visible (once). Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NUrs Thuermann <urs@isnogud.escape.de> CC: Michael Olbrich <m.olbrich@pengutronix.de> CC: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 6月, 2009 1 次提交
-
-
由 Jesper Dangaard Brouer 提交于
This module uses rcu_call() thus it should use rcu_barrier() on module unload. Signed-off-by: NJesper Dangaard Brouer <hawk@comx.dk> Acked-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 4月, 2009 1 次提交
-
-
由 Oliver Hartkopp 提交于
Since commit ead2ceb0 ("Network Drop Monitor: Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") so called end-of-line points for skb's should use consume_skb() to free the socket buffer. In opposite to consume_skb() the function kfree_skb() is intended to be used for unexpected skb drops e.g. in error conditions that now can trigger the network drop monitor if enabled. This patch moves the skb end-of-line point in af_can.c to use consume_skb(). Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 27 2月, 2009 1 次提交
-
-
由 Wei Yongjun 提交于
Remove some pointless conditionals before kfree_skb(). Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 01 2月, 2009 1 次提交
-
-
由 Harvey Harrison 提交于
Base versions handle constant folding now. Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 1月, 2009 1 次提交
-
-
由 Oliver Hartkopp 提交于
The AF_CAN core delivered always cloned sk_buffs to the AF_CAN protocols, although this was _only_ needed by the can-raw protocol. With this (additionally documented) change, the AF_CAN core calls the callback functions of the registered AF_CAN protocols with the original (uncloned) sk_buff pointer and let's the can-raw protocol do the skb_clone() itself which omits all unneeded skb_clone() calls for other AF_CAN protocols. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NUrs Thuermann <urs.thuermann@volkswagen.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 05 12月, 2008 1 次提交
-
-
由 Oliver Hartkopp 提交于
Since commit d253eee2 the single CAN identifier filter lists handle only non-RTR CAN frames. So we need to omit the check of these filter lists when receiving RTR CAN frames. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 12月, 2008 1 次提交
-
-
由 Oliver Hartkopp 提交于
Due to a wrong safety check in af_can.c it was not possible to filter for SFF frames with a specific CAN identifier without getting the same selected CAN identifier from a received EFF frame also. This fix has a minimum (but user visible) impact on the CAN filter API and therefore the CAN version is set to a new date. Indeed the 'old' API is still working as-is. But when now setting CAN_(EFF|RTR)_FLAG in can_filter.can_mask you might get less traffic than before - but still the stuff that you expected to get for your defined filter ... Thanks to Kurt Van Dijck for pointing at this issue and for the review. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Acked-by: NKurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 10月, 2008 1 次提交
-
-
由 Johannes Berg 提交于
Some code here depends on CONFIG_KMOD to not try to load protocol modules or similar, replace by CONFIG_MODULES where more than just request_module depends on CONFIG_KMOD and and also use try_then_request_module in ebtables. Signed-off-by: NJohannes Berg <johannes@sipsolutions.net> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 20 7月, 2008 1 次提交
-
-
由 YOSHIFUJI Hideaki 提交于
Without CONFIG_NET_NS, namespace is always &init_net. Compiler will be able to omit namespace comparisons with this patch. Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 7月, 2008 1 次提交
-
-
由 Oliver Hartkopp 提交于
Even though the CAN netlayer only deals with CAN netdevices, the netlayer interface to the userspace and to the device layer should perform some sanity checks. This patch adds several sanity checks that mainly prevent userspace apps to send broken content into the system that may be misinterpreted by some other userspace application. Signed-off-by: NOliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: NUrs Thuermann <urs.thuermann@volkswagen.de> Acked-by: NAndre Naujoks <nautsch@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 08 5月, 2008 1 次提交
-
-
由 Oliver Hartkopp 提交于
The tx packet counting and the local loopback of CAN frames should only happen in the case that the CAN frame has been enqueued to the netdevice tx queue successfully. Thanks to Andre Naujoks <nautsch@gmail.com> for reporting this issue. Signed-off-by: NOliver Hartkopp <oliver@hartkopp.net> Signed-off-by: NUrs Thuermann <urs@isnogud.escape.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 3月, 2008 1 次提交
-
-
由 YOSHIFUJI Hideaki 提交于
Introduce per-net_device inlines: dev_net(), dev_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
-
- 08 2月, 2008 2 次提交
-
-
由 Urs Thuermann 提交于
The implementation of proto_register() has changed so that it can now sleep. The call to proto_register() must be moved out of the spin-locked region. Signed-off-by: NUrs Thuermann <urs.thuermann@volkswagen.de> Signed-off-by: NOliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Urs Thuermann 提交于
Remove local char array to construct module name. Don't call request_module() when CONFIG_KMOD is not set. Signed-off-by: NUrs Thuermann <urs.thuermann@volkswagen.de> Signed-off-by: NOliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 1月, 2008 1 次提交
-
-
由 Oliver Hartkopp 提交于
This patch adds the CAN core functionality but no protocols or drivers. No protocol implementations are included here. They come as separate patches. Protocol numbers are already in include/linux/can.h. Signed-off-by: NOliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: NUrs Thuermann <urs.thuermann@volkswagen.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-