On Mon, Feb 20, 2006 at 02:49:41PM +0100, Patrick McHardy ([EMAIL PROTECTED])
wrote:
> Evgeniy Polyakov wrote:
> > On Mon, Feb 20, 2006 at 02:31:05PM +0100, Patrick McHardy ([EMAIL
> > PROTECTED]) wrote:
> >
> >>Evgeniy Polyakov wrote:
> >>
> >>>Do not allocate and send new skb if there are no listeners.
> >>>cn_netlink_send() can return -ESRCH in this case.
> >>
> >>I don't think it makes sense to return an error. netlink_has_listeners()
> >>can return false positives, so no error would still not mean that the
> >>packet was really delivered. cn_netlink_send also doesn't propagate the
> >>return code of netlink_broadcast, so nobody seems to be interested
> >>anyway.
> >
> >
> > Yep, return code of netlink_broadcast() also should be returned back.
> > Main idea is to show, that if error is returned, then data 100% was not
> > delivered, no matter where it was dropped.
> > And alhtough nobody really does not care about it, since there is
> > sequence number inside, I think better to indicate if message was
> > dropped or not.
>
> Still netlink_has_listeners should not return an error. If no listeners
> exist, netlink_broadcast would return 0, netlink_has_listeners is just
> an optimization for that case.
Doesn't netlink_broadcast() return 0 only if skb was really delivered, i.e.
queued into at least one destination socket, when netlink_broadcast_deliver()
returns
boolean value 0 or 1 (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf)?
--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html