Message ID | 1364993010-15515-6-git-send-email-kaber@trash.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 03/04/2013 15:43, Patrick McHardy wrote: > [...] all TIPC needs to know about is ARP and RARP since > it wants to always perform "path find", even if a path is already known. [...] Not sure to follow this part... did you mean "all IPoIB needs to know about is ARP or RARP", this makes sense indeed, since for arp/rarp we want to call unicast_arp_send which does path_find and looks also for the case the path isn't valid Or. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Apr 03, 2013 at 06:31:49PM +0300, Or Gerlitz wrote: > On 03/04/2013 15:43, Patrick McHardy wrote: > >[...] all TIPC needs to know about is ARP and RARP since > >it wants to always perform "path find", even if a path is already known. [...] > > Not sure to follow this part... did you mean "all IPoIB needs to > know about is ARP or RARP", this makes > sense indeed, since for arp/rarp we want to call unicast_arp_send > which does path_find and looks > also for the case the path isn't valid What I meant is that it doesn't require any knowledge about IPv4/IPv6 or other higher layer protocols anymore. At least almost none. We have protocol knowledge in ipoib_start_xmit(). For broadcast packets, it drops unknown protocols. For unicast packets, it handles ARP/RARP seperately because of the path find differences, IP/IPv6 are sent using the neigh, all others are dropped. ipoib_cm also has knowledge about IPv4/IPv6 in order to send ICMP errors. What we could do instead of adding TIPC to the broadcast-don't-drop list and to the send-using-neigh list in ipoib_start_xmit() is to only treat ARP/RARP special and send every other protocol using the neigh or ipoib_mcast_send(). Right now the supported protocols are artificially limited without a technical reason. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 8534afd..554b906 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -730,7 +730,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) if ((header->proto != htons(ETH_P_IP)) && (header->proto != htons(ETH_P_IPV6)) && (header->proto != htons(ETH_P_ARP)) && - (header->proto != htons(ETH_P_RARP))) { + (header->proto != htons(ETH_P_RARP)) && + (header->proto != htons(ETH_P_TIPC))) { /* ethertype not supported by IPoIB */ ++dev->stats.tx_dropped; dev_kfree_skb_any(skb); @@ -751,6 +752,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) switch (header->proto) { case htons(ETH_P_IP): case htons(ETH_P_IPV6): + case htons(ETH_P_TIPC): neigh = ipoib_neigh_get(dev, cb->hwaddr); if (unlikely(!neigh)) { neigh_add_path(skb, cb->hwaddr, dev);
Support TIPC in the IPoIB driver. Since IPoIB now keeps track of its own neighbour entries and doesn't require the packet to have a dst_entry anymore, the only necessary changes are to: - not drop multicast TIPC packets because of the unknown ethernet type - handle unicast TIPC packets similar to IPv4/IPv6 unicast packets in ipoib_start_xmit(). An alternative would be to remove all ethertype limitations since they're not necessary anymore, all TIPC needs to know about is ARP and RARP since it wants to always perform "path find", even if a path is already known. Signed-off-by: Patrick McHardy <kaber@trash.net> --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)