netdev
[Top] [All Lists]

ppp_channel_ops.start_xmit()

To: netdev@xxxxxxxxxxx
Subject: ppp_channel_ops.start_xmit()
From: Henner Eisen <eis@xxxxxxxxxxxxx>
Date: 28 Feb 2000 20:51:15 +0100
In-reply-to: Henner Eisen's message of "03 Feb 2000 23:03:17 +0100"
Sender: owner-netdev@xxxxxxxxxxx
Hi,

Our large discussion about pppoe/ppp/socket related stuff suddenly
ended, I guess everybody was busy with doing softnet changes, but this
is done now. I'm now going to try interfacing the X.25 protocol stack
to the generic ppp layer (will try to do this in a generic 'ppp over socket'
manner).

The first question arising was the return logic of ppp_hannel_ops.start_xmit():

struct ppp_channel_ops {
        /* Send a packet (or multilink fragment) on this channel.
           Returns 1 if it was accepted, 0 if not. */
        int     (*start_xmit)(struct ppp_channel *, struct sk_buff *);
};

Is there any rationale behind returning 1 on success, 0 on error?
Most other kernel functions return 0 on succes and != 0 otherwise.
The latter allows to return error codes, which could be evaluated by
the caller. It is also constistent with dev->hard_start_xmit() conventions.
Is it worthy to change this? Currently, it would be easy because
there are only very few drivers who use this.

Henner

<Prev in Thread] Current Thread [Next in Thread>
  • ppp_channel_ops.start_xmit(), Henner Eisen <=