[ofw] [patch][IPoIB_NDIS6_CM]

Alex Naslednikov xalex at mellanox.co.il
Sun Jan 30 07:18:10 PST 2011


Applied at 7084 with minor change (see the commit log)

From: Alex Naslednikov
Sent: Wednesday, January 26, 2011 3:53 PM
To: ofw at lists.openfabrics.org
Subject: [ofw][patch][IPoIB_NDIS6_CM]


dhcp - set broadcast dhcp flag only for broadcast destination. Fixes gateway DHCP issue.
 Signed-off by: Galina Tcharny (galina at mellanox.co.il)
===================================================================
--- inc/kernel/ip_packet.h           (revision 3080)
+++ inc/kernel/ip_packet.h        (working copy)
@@ -53,6 +53,7 @@
 #define ETH_IS_LOCALLY_ADMINISTERED(addr) \
                (BOOLEAN)(((PUCHAR)(addr))[0] & ((UCHAR)0x02))

+#define IP_BROADCAST_ADDRESS (0xffffffff)

 #include <complib/cl_packon.h>
 /****s* IB Network Drivers/mac_addr_t
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp                (revision 3080)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp             (working copy)
@@ -364,6 +364,7 @@

 static NDIS_STATUS
 __send_mgr_filter_dhcp(
+             IN                           const     ip_hdr_t* const                                                                p_ip_hdr,
                IN                           const     udp_hdr_t* const                                           p_udp_hdr,
                IN                                                           MDL*                                                                                    p_mdl,
                IN                                                           size_t                                                                                    buf_len,
@@ -5506,7 +5507,7 @@
                memcpy( &s_buf->p_send_buf->ip.prot.udp.hdr, p_udp_hdr, sizeof(udp_hdr_t) );

                cl_perf_start( FilterDhcp );
-              status = __send_mgr_filter_dhcp( p_udp_hdr, p_mdl, buf_len, ethertype, s_buf );
+             status = __send_mgr_filter_dhcp( (ip_hdr_t *) p_ip_hdr, p_udp_hdr, p_mdl, buf_len, ethertype, s_buf );
                cl_perf_stop( &s_buf->p_port->p_adapter->perf, FilterDhcp );

                XIPOIB_EXIT( IPOIB_DBG_SEND );
@@ -5528,6 +5529,7 @@

 static NDIS_STATUS
 __send_mgr_filter_dhcp(
+             IN                           const     ip_hdr_t* const                                                                p_ip_hdr,
                IN                           const     udp_hdr_t* const                                           p_udp_hdr,
                IN                                                           NDIS_BUFFER*                                                 p_mdl,
                IN                                                           size_t                                                                                    buf_len,
@@ -5616,6 +5618,7 @@
                /* Client messages */
                case DHCPDISCOVER:
                case DHCPREQUEST:
+                             if(p_ip_hdr->dst_ip == IP_BROADCAST_ADDRESS)
                                                p_ib_dhcp->flags |= DHCP_FLAGS_BROADCAST;
                                /* Fall through */
                case DHCPDECLINE:

Alexander (XaleX) Naslednikov
SW Networking Team
Mellanox Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110130/0439b2b5/attachment.html>


More information about the ofw mailing list