This should make no difference at runtime, but it is shorter and looks more
straightforward to me.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
const struct tnl_mutable_config *mutable)
{
int sent_len;
- int err;
sent_len = 0;
while (skb) {
struct sk_buff *next = skb->next;
int frag_len = skb->len - mutable->tunnel_hlen;
+ int err;
skb->next = NULL;
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
err = ip_local_out(skb);
- if (likely(net_xmit_eval(err) == 0))
- sent_len += frag_len;
- else {
- skb = next;
- goto free_frags;
- }
-
skb = next;
+ if (unlikely(net_xmit_eval(err)))
+ goto free_frags;
+ sent_len += frag_len;
}
return sent_len;