Re: [RFC] vxlan: convert remote list to list_rcu
From: David Stevens <hidden>
Date: 2013-06-04 19:03:16
netdev-owner@vger.kernel.org wrote on 06/04/2013 01:20:22 PM:
From: Mike Rapoport <redacted>
If I've understood you right it would be something like this:
All the tabs are removed in the code I got-- don't know if it's your mailer or my reader....
quoted hunk ↗ jump to hunk
@@ -1025,13 +1027,10 @@ static netdev_tx_t vxlan_xmit_one(structsk_buff *skb, struct net_device *dev, vni = rdst->remote_vni; dst = rdst->remote_ip; - if (!dst) { - if (did_rsc) { - /* short-circuited back to local bridge */ - vxlan_encap_bypass(skb, vxlan, vxlan); - return NETDEV_TX_OK; - } - goto drop; + if (did_rsc) { + /* short-circuited back to local bridge */ + vxlan_encap_bypass(skb, vxlan, vxlan); + return NETDEV_TX_OK; }
This isn't correct -- I led you into that one,
but the original code is what we'd need -- it isn't
"rdst NULL" this is checking, but really "dst == INADDR_ANY",
which is probably what it ought to be, instead of "0".
At any rate, the check there works and needs to stay;
dst == INADDR_ANY is a distinct case from rdst == NULL.
Also looks like you're missing a brace on the L2MISS check --
the miss and the drop are only if the all-zeroes lookup
fails.
But the general idea looks good. If you remove the
is_zero_ether_addr() check in rtnl_fdb_add and rtnl_fdb_del,
then the existing fdb_add/fdb_append/fdb_del code code
would allow changes, including multiple destinations, to
the default destinations as well.
But there's more to it, too -- default_dst and all its references
would need to be replaced for joining groups and the netlink
part, and removed from vxlan_dev.
+-DLS