On Sat, Jun 29, 2013 at 02:02:39PM +0200, Linus Lüssing wrote:
+/**
- batadv_send_skb_generic_tt - send an skb to a translation table node
I don't really like the expression "translation table node"..it looks like we have different type of nodes...What about a simple"to a destination using the Translation Table" ? you can go on a new line with the short description, if needed.
- @bat_priv: the bat priv with all the soft interface information
- @skb: payload to send
- @packet_type: the batman unicast packet type to use
- @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast
- 4addr packets)
- @vid: the vid to be used to search the translation table
- Look up the destination node for the destination address in the ethernet
- header via the translation table.
What about substituting "destination node" with "recipient node" to avoid repeating destination?
- Wrap the given skb into a batman-adv unicast or unicast-4addr header
- depending on whether BATADV_UNICAST or BATADV_UNICAST_4ADDR was supplied
- as packet_type.
- Then send this frame to the according destination node.
Since the above is a list of steps performed by the function, I'd rather remove the blank lines you've added between the paragraphs.
[...]
/**
- batadv_send_unicast_skb - send the skb encapsulated in a unicast packet
- batadv_send_skb_tt - send an skb to a translation table node
same as above
- @bat_priv: the bat priv with all the soft interface information
- @skb: the payload to send
- @vid: the vid to be used to search the translation table
- Look up the destination node for the destination address in the ethernet
- header via the translation table.
same as above
- Wrap the given skb into a batman-adv unicast header.
- Then send this frame to the according destination node.
same as above
/**
- batadv_send_4addr_unicast_skb - send the skb encapsulated in a unicast 4addr
- packet
- batadv_send_skb_tt_4addr - send an skb to a translation table node
same as above
- @bat_priv: the bat priv with all the soft interface information
- @skb: the payload to send
- @packet_subtype: the unicast 4addr packet subtype to use
- @vid: the vid to be used to search the translation table
- Look up the destination node for the destination address in the ethernet
- header via the translation table.
- Wrap the given skb into a batman-adv unicast-4addr header.
- Then send this frame to the according destination node.
same as above
- Returns 1 in case of error or 0 otherwise.
*/ -static inline int batadv_send_skb_unicast_4addr(struct batadv_priv *bat_priv,
struct sk_buff *skb,
int packet_subtype,
unsigned short vid)
+static inline int batadv_send_skb_tt_4addr(struct batadv_priv *bat_priv,
struct sk_buff *skb,
int packet_subtype,
unsigned short vid)
{
- return batadv_send_skb_generic_unicast(bat_priv, skb,
BATADV_UNICAST_4ADDR,
packet_subtype, vid);
- return batadv_send_skb_generic_tt(bat_priv, skb,
BATADV_UNICAST_4ADDR,
packet_subtype, vid);
}
I like this new API :) If you are ok with my suggestions then you can also add
Acked-by: Antonio Quartulli ordex@autistici.org
Cheers,