Re: [PATCH 2/5] IB/srpt: Remove use of transport_do_task_sg_chain()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2012-03-30 at 11:29 -0700, Roland Dreier wrote:
> From: Roland Dreier <roland@xxxxxxxxxxxxxxx>
> 
> With the modern target core, se_cmd->t_data_sg already points to a
> sglist that covers the whole command.  So task_sg chaining is needless
> overhead and obfuscation -- instead of splicing the split up task
> sglists back into one list, we can just use the original list directly.
> 
> Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx>
> ---

Looks fine.  Applied.

Thanks!

>  drivers/infiniband/ulp/srpt/ib_srpt.c |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 3c3ce51..8b962c5 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1098,9 +1098,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
>  	dir = cmd->data_direction;
>  	BUG_ON(dir == DMA_NONE);
>  
> -	transport_do_task_sg_chain(cmd);
> -	ioctx->sg = sg = sg_orig = cmd->t_tasks_sg_chained;
> -	ioctx->sg_cnt = sg_cnt = cmd->t_tasks_sg_chained_no;
> +	ioctx->sg = sg = sg_orig = cmd->t_data_sg;
> +	ioctx->sg_cnt = sg_cnt = cmd->t_data_nents;
>  
>  	count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
>  			      opposite_dma_dir(dir));
> @@ -3991,9 +3990,6 @@ static int __init srpt_init_module(void)
>  
>  	srpt_target->tf_ops = srpt_template;
>  
> -	/* Enable SG chaining */
> -	srpt_target->tf_ops.task_sg_chaining = true;
> -
>  	/*
>  	 * Set up default attribute lists.
>  	 */


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux