All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Stevens <dlstevens@us.ibm.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	netdev-owner@vger.kernel.org,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH net-next 05/10] vxlan: make vxlan_xmit_one void
Date: Wed, 5 Jun 2013 08:54:04 -0400	[thread overview]
Message-ID: <OFD4CE80FE.0925E8B1-ON85257B81.0046B66B-85257B81.0046DDDB@us.ibm.com> (raw)
In-Reply-To: <1370406254-6341-5-git-send-email-stephen@networkplumber.org>

Acked-by: David L Stevens <dlstevens@us.ibm.com>

netdev-owner@vger.kernel.org wrote on 06/05/2013 12:24:09 AM:

> From: Stephen Hemminger <stephen@networkplumber.org>

> 
> The function vxlan_xmit_one always returns NETDEV_TX_OK, so there
> is no point in keeping track of return values etc.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/vxlan.c |   26 +++++++++-----------------
>  1 file changed, 9 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 25d3e9e..f0b7605 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -996,8 +996,8 @@ static void vxlan_encap_bypass(struct sk_buff 
> *skb, struct vxlan_dev *src_vxlan,
>     }
>  }
> 
> -static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct 
> net_device *dev,
> -              struct vxlan_rdst *rdst, bool did_rsc)
> +static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> +            struct vxlan_rdst *rdst, bool did_rsc)
>  {
>     struct vxlan_dev *vxlan = netdev_priv(dev);
>     struct rtable *rt;
> @@ -1020,7 +1020,7 @@ static netdev_tx_t vxlan_xmit_one(struct 
> sk_buff *skb, struct net_device *dev,
>        if (did_rsc) {
>           /* short-circuited back to local bridge */
>           vxlan_encap_bypass(skb, vxlan, vxlan);
> -         return NETDEV_TX_OK;
> +         return;
>        }
>        goto drop;
>     }
> @@ -1076,7 +1076,7 @@ static netdev_tx_t vxlan_xmit_one(struct 
> sk_buff *skb, struct net_device *dev,
>        if (!dst_vxlan)
>           goto tx_error;
>        vxlan_encap_bypass(skb, vxlan, dst_vxlan);
> -      return NETDEV_TX_OK;
> +      return;
>     }
> 
>     memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
> @@ -1120,7 +1120,7 @@ static netdev_tx_t vxlan_xmit_one(struct 
> sk_buff *skb, struct net_device *dev,
>        goto drop;
> 
>     iptunnel_xmit(skb, dev);
> -   return NETDEV_TX_OK;
> +   return;
> 
>  drop:
>     dev->stats.tx_dropped++;
> @@ -1130,7 +1130,6 @@ tx_error:
>     dev->stats.tx_errors++;
>  tx_free:
>     dev_kfree_skb(skb);
> -   return NETDEV_TX_OK;
>  }
> 
>  /* Transmit local packets over Vxlan
> @@ -1146,7 +1145,6 @@ static netdev_tx_t vxlan_xmit(struct sk_buff 
> *skb, struct net_device *dev)
>     bool did_rsc = false;
>     struct vxlan_rdst *rdst0, *rdst;
>     struct vxlan_fdb *f;
> -   int rc1, rc;
> 
>     skb_reset_mac_header(skb);
>     eth = eth_hdr(skb);
> @@ -1174,24 +1172,18 @@ static netdev_tx_t vxlan_xmit(struct sk_buff
> *skb, struct net_device *dev)
>     } else
>        rdst0 = &f->remote;
> 
> -   rc = NETDEV_TX_OK;
> 
>     /* if there are multiple destinations, send copies */
>     for (rdst = rdst0->remote_next; rdst; rdst = rdst->remote_next) {
>        struct sk_buff *skb1;
> 
>        skb1 = skb_clone(skb, GFP_ATOMIC);
> -      if (skb1) {
> -         rc1 = vxlan_xmit_one(skb1, dev, rdst, did_rsc);
> -         if (rc == NETDEV_TX_OK)
> -            rc = rc1;
> -      }
> +      if (skb1)
> +         vxlan_xmit_one(skb1, dev, rdst, did_rsc);
>     }
> 
> -   rc1 = vxlan_xmit_one(skb, dev, rdst0, did_rsc);
> -   if (rc == NETDEV_TX_OK)
> -      rc = rc1;
> -   return rc;
> +   vxlan_xmit_one(skb, dev, rdst0, did_rsc);
> +   return NETDEV_TX_OK;
>  }
> 
>  /* Walk the forwarding table and purge stale entries */
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2013-06-05 12:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05  4:24 [PATCH net-next 01/10] vxlan: only migrate dynamic FDB entries Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 02/10] vxlan: handle skb_clone failure Stephen Hemminger
2013-06-05  6:59   ` Cong Wang
2013-06-05 14:05     ` David Stevens
2013-06-06  0:47       ` Cong Wang
2013-06-06  1:31         ` Stephen Hemminger
2013-06-05 12:50   ` David Stevens
2013-06-05  4:24 ` [PATCH net-next 03/10] vxlan: move IGMP join/leave to work queue Stephen Hemminger
2013-06-05  6:47   ` Cong Wang
2013-06-05  7:29     ` Mike Rapoport
2013-06-05  8:00       ` Cong Wang
2013-06-05 15:41       ` Stephen Hemminger
2013-06-08  8:23         ` Mike Rapoport
2013-06-05 15:42     ` Stephen Hemminger
2013-06-06  0:49       ` Cong Wang
2013-06-05 15:37   ` [PATCH net] vxlan: fix crash on module removal Stephen Hemminger
2013-06-06  1:11     ` Cong Wang
2013-06-06  1:32       ` Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 04/10] vxlan: send notification when MAC migrates Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 05/10] vxlan: make vxlan_xmit_one void Stephen Hemminger
2013-06-05 12:54   ` David Stevens [this message]
2013-06-05  4:24 ` [PATCH net-next 06/10] vxlan: convert remotes list to list_rcu Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 07/10] vxlan: port module param should be ushort Stephen Hemminger
2013-06-05 13:35   ` Sergei Shtylyov
2013-06-05  4:24 ` [PATCH net-next 08/10] vxlan: use initializer for dummy structures Stephen Hemminger
2013-06-05  4:24 ` [PATCH net-next 09/10] vxlan: whitespace cleanup Stephen Hemminger
2013-06-05 12:55   ` David Stevens
2013-06-05  4:24 ` [PATCH net-next 10/10] vxlan: version 0.2 Stephen Hemminger
2013-06-05  6:23 ` [PATCH net-next 01/10] vxlan: only migrate dynamic FDB entries Cong Wang
2013-06-06 23:16 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFD4CE80FE.0925E8B1-ON85257B81.0046B66B-85257B81.0046DDDB@us.ibm.com \
    --to=dlstevens@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev-owner@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.