On Wed, Apr 13, 2016 at 12:56:25PM +0300, Sagi Grimberg wrote: > > >>On 09/04/16 16:11, Varun Prakash wrote: > >>>Add two callbacks to struct iscsit_transport - > >>> > >>>1. void *(*iscsit_alloc_pdu)() > >>> iscsi-target uses this callback for > >>> iSCSI PDU allocation. > >>> > >>>2. void (*iscsit_free_pdu) > >>> iscsi-target uses this callback > >>> to free an iSCSI PDU which was > >>> allocated by iscsit_alloc_pdu(). > >> > >>Can you please explain why are you adding two different > >>callouts? Who (Chelsio T5) will need it, and why they can't > >>use the in-cmd pdu? > > > >I am adding these to avoid per PDU 48 bytes(BHS) memcpy from cmd->pdu to > >transport driver tx buffer, iscsi-target can directly form iscsi hdr > >in transport driver tx buffer. > > Is that what it's for? Looks meaningless to me, do > you have an indication that this is some sort of bottleneck? > > I see you memset in your pdu_alloc, where is the gain > here anyway? We can definitely avoid memcpy if iscsi-target fills all the fields in iscsi hdr, in current code some fields are assumed to be zero so a memset is required in transport driver. I will drop this patch in -v3, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html