[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070925125122.GD18348@ghostprotocols.net>
Date: Tue, 25 Sep 2007 09:51:22 -0300
From: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To: Urs Thuermann <urs@...ogud.escape.de>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Patrick McHardy <kaber@...sh.net>,
Joe Perches <joe@...ches.com>,
Thomas Gleixner <tglx@...utronix.de>,
Oliver Hartkopp <oliver@...tkopp.net>,
Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
Urs Thuermann <urs.thuermann@...kswagen.de>
Subject: Re: [PATCH 4/7] CAN: Add broadcast manager (bcm) protocol
Em Tue, Sep 25, 2007 at 02:20:33PM +0200, Urs Thuermann escreveu:
> This patch adds the CAN broadcast manager (bcm) protocol.
>
> +static void bcm_can_tx(struct bcm_op *op)
> +{
> + skb = alloc_skb(CFSIZ,
> + in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
We have gfp_any() for this:
[acme@...o net-2.6.24]$ grep gfp_any net/*/*.[ch]
net/ipv4/tcp.c: tcp_send_active_reset(sk, gfp_any());
net/ipv6/route.c: skb = nlmsg_new(rt6_nlmsg_size(), gfp_any());
net/ipv6/route.c: err = rtnl_notify(skb, pid, RTNLGRP_IPV6_ROUTE,
nlh, gfp_any());
net/netfilter/nfnetlink.c: netlink_broadcast(nfnl, skb, pid, group,
gfp_any());
net/netlink/af_netlink.c: skb = netlink_trim(skb, gfp_any());
[acme@...o net-2.6.24]$ grep in_interrupt net/*/*.[ch]
net/decnet/dn_route.c: int user_mode = !in_interrupt();
net/decnet/dn_table.c: if (in_interrupt() && net_ratelimit()) {
[acme@...o net-2.6.24]$
> +static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
> + struct can_frame *frames, int has_timestamp)
> +{
> + struct sk_buff *skb;
> + struct can_frame *firstframe;
> + struct sockaddr_can *addr;
> + struct sock *sk = op->sk;
> + int datalen = head->nframes * CFSIZ;
> + int err;
> +
> + skb = alloc_skb(sizeof(*head) + datalen,
> + in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
ditto
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists