[ofw] RE: [IPoIB CM]Patch handling of Non IP packets

Alex Estrin alex.estrin at qlogic.com
Tue Mar 3 05:16:13 PST 2009


Applied to ipoib_cm branch rev 2003.
Thanks.
Alex.

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex
> Estrin
> Sent: Friday, February 27, 2009 9:21 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [IPoIB CM]Patch handling of Non IP packets
> 
> Hello,
> 
> Redirection of non-IP packets wasn't set properly. This patch fixes it.
> However there is a problem for large raw packets -
> if destination endpoint is not connected that packets should be dropped. I'm not sure yet if there is
> another way to handle this.
> 
> Thanks,
> Alex.
> 
> 
> Index: ipoib_port.c
> ===================================================================
> --- ipoib_port.c	(revision 1979)
> +++ ipoib_port.c	(working copy)
> @@ -3149,8 +3149,23 @@
>  		 * The IPoIB spec doesn't define how to send non IP or ARP packets.
>  		 * Just send the payload and hope for the best.
>  		 */
> +		if( endpt_cm_get_state( p_desc->p_endpt ) != IPOIB_CM_CONNECTED )
> +		{
> +			UINT	packet_length;
> +			NdisQueryPacketLength( p_desc->p_pkt, &packet_length );
> +			if( ( packet_length - sizeof(eth_hdr_t) ) > MAX_UD_PAYLOAD_MTU )
> +			{
> +				IPOIB_PRINT_EXIT( TRACE_LEVEL_WARNING, IPOIB_DBG_ERROR,
> +					("Send failed for raw packet length %d\n", packet_length ) );
> +				return NDIS_STATUS_INVALID_LENGTH;
> +			}
> +			p_desc->send_dir = SEND_UD_QP;
> +		}
> +		else
> +		{
> +			p_desc->send_dir = SEND_RC_QP;
> +		}
> 
> -		p_desc->send_dir = SEND_UD_QP;
>  		cl_perf_start( SendGen );
>  		status = __send_gen( p_port, p_desc, 0 );
>  		cl_perf_stop( &p_port->p_adapter->perf, SendGen );
> @@ -4647,6 +4662,10 @@
>  				ipoib_endpt_deref( p_desc->p_endpt );
>  				break;
>  			}
> +			if( status == NDIS_STATUS_INVALID_LENGTH )
> +			{
> +				status = NDIS_STATUS_SUCCESS;
> +			}
>  			cl_perf_start( ProcessFailedSends );
>  			__process_failed_send( p_port, p_desc, status );
>  			cl_perf_stop( &p_port->p_adapter->perf, ProcessFailedSends );
> @@ -4791,6 +4810,10 @@
>  				ipoib_endpt_deref( p_desc->p_endpt );
>  				break;
>  			}
> +			if( status == NDIS_STATUS_INVALID_LENGTH )
> +			{
> +				status = NDIS_STATUS_SUCCESS;
> +			}
>  			cl_perf_start( ProcessFailedSends );
>  			__process_failed_send( p_port, p_desc, status );
>  			cl_perf_stop( &p_port->p_adapter->perf, ProcessFailedSends );
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw



More information about the ofw mailing list