2009-11-16 13:12:12

by Rakesh Ranjan

[permalink] [raw]
Subject: [RFC-PATCH] libiscsi dhcp handler

Hi mike,

Herein attached patches to support dhcp based provisioning for iSCSI
offload capable cards. I have made dhcp code as generic as possible,
please go through the code. Based on the feedback I will submit final
version of these patches.

Regards
Rakesh Ranjan


Attachments:
0001-Required-changes-for-libiscsi-to-support-dhcp-based.patch (4.13 kB)
0002-dhcp-handler-for-libiscsi-to-support-dhcp-provisioni.patch (11.02 kB)
Download all attachments

2009-11-16 13:18:20

by David Miller

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

From: Rakesh Ranjan <[email protected]>
Date: Mon, 16 Nov 2009 18:41:49 +0530

> Herein attached patches to support dhcp based provisioning for iSCSI
> offload capable cards. I have made dhcp code as generic as possible,
> please go through the code. Based on the feedback I will submit final
> version of these patches.

You can't really add objects to the build before the patch that
adds the source for that object.

2009-11-16 13:24:54

by Rakesh Ranjan

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

David Miller wrote:
> From: Rakesh Ranjan <[email protected]>
> Date: Mon, 16 Nov 2009 18:41:49 +0530
>
>> Herein attached patches to support dhcp based provisioning for iSCSI
>> offload capable cards. I have made dhcp code as generic as possible,
>> please go through the code. Based on the feedback I will submit final
>> version of these patches.
>
> You can't really add objects to the build before the patch that
> adds the source for that object.
>

my mistake, the makefile part of patch is irrelevant. Will send new
patch in few mins.

Regards
Rakesh Ranjan

2009-11-16 13:45:51

by Rakesh Ranjan

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

David Miller wrote:
> From: Rakesh Ranjan <[email protected]>
> Date: Mon, 16 Nov 2009 18:41:49 +0530
>
>> Herein attached patches to support dhcp based provisioning for iSCSI
>> offload capable cards. I have made dhcp code as generic as possible,
>> please go through the code. Based on the feedback I will submit final
>> version of these patches.
>
> You can't really add objects to the build before the patch that
> adds the source for that object.
>

Hi david,

Fixed patch attached.

Regards
Rakesh Ranjan


Attachments:
0001-Required-changes-for-libiscsi-to-support-dhcp-based.patch (3.78 kB)
0002-dhcp-handler-for-libiscsi-to-support-dhcp-provisioni.patch (11.71 kB)
Download all attachments

2009-11-18 03:27:25

by Rakesh Ranjan

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

Rakesh Ranjan wrote:
> David Miller wrote:
>> From: Rakesh Ranjan <[email protected]>
>> Date: Mon, 16 Nov 2009 18:41:49 +0530
>>
>>> Herein attached patches to support dhcp based provisioning for iSCSI
>>> offload capable cards. I have made dhcp code as generic as possible,
>>> please go through the code. Based on the feedback I will submit final
>>> version of these patches.
>> You can't really add objects to the build before the patch that
>> adds the source for that object.
>>
>
> Hi david,
>
> Fixed patch attached.

ping ...

2009-11-18 07:24:59

by David Miller

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

From: Rakesh Ranjan <[email protected]>
Date: Wed, 18 Nov 2009 08:56:55 +0530

> ping ...

I'm too busy, if you're waiting for me. It could take weeks for me to
get to this, sorry.

2009-11-20 13:29:52

by Dan Carpenter

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

On 11/16/09, Rakesh Ranjan <[email protected]> wrote:
> David Miller wrote:
>> From: Rakesh Ranjan <[email protected]>
>> Date: Mon, 16 Nov 2009 18:41:49 +0530
>>
>>> Herein attached patches to support dhcp based provisioning for iSCSI
>>> offload capable cards. I have made dhcp code as generic as possible,
>>> please go through the code. Based on the feedback I will submit final
>>> version of these patches.
>>
>> You can't really add objects to the build before the patch that
>> adds the source for that object.
>>
>
> Hi david,
>
> Fixed patch attached.
>
> Regards
> Rakesh Ranjan
>

The header file changes cause warnings in allmodconfig.

CC [M] drivers/scsi/be2iscsi/be_iscsi.o
+In file included from drivers/scsi/be2iscsi/be_iscsi.c:21:
+include/scsi/libiscsi.h:445: warning: ?struct net_device? declared
inside parameter list
+include/scsi/libiscsi.h:445: warning: its scope is only this
definition or declaration, which is probably not what you want
+include/scsi/libiscsi.h:447: warning: ?struct sk_buff? declared
inside parameter list
+include/scsi/libiscsi.h:447: warning: ?struct net_device? declared
inside parameter list

regards,
dan carpenter

2009-11-21 08:13:16

by Dan Carpenter

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

On Fri, Nov 20, 2009 at 03:29:24PM +0200, Dan Carpenter wrote:
> On 11/16/09, Rakesh Ranjan <[email protected]> wrote:
> > David Miller wrote:
> >> From: Rakesh Ranjan <[email protected]>
> >> Date: Mon, 16 Nov 2009 18:41:49 +0530
> >>
> >>> Herein attached patches to support dhcp based provisioning for iSCSI
> >>> offload capable cards. I have made dhcp code as generic as possible,
> >>> please go through the code. Based on the feedback I will submit final
> >>> version of these patches.
> >>
> >> You can't really add objects to the build before the patch that
> >> adds the source for that object.
> >>
> >
> > Hi david,
> >
> > Fixed patch attached.

+ spin_unlock(&rcv_lock);
+
+drop:
+ kfree(pskb);

This should be kfree_skb(pskb)

+out:
+ return rc;
+}
+EXPORT_SYMBOL(libiscsi_ipconfig_recv);

regards,
dan carpenter

2010-01-05 06:42:17

by David Miller

[permalink] [raw]
Subject: Re: [RFC-PATCH] libiscsi dhcp handler

From: Rakesh Ranjan <[email protected]>
Date: Mon, 16 Nov 2009 19:15:34 +0530

> + /* Construct UDP header */
> + udph = &pkt->udph;
> + udph->source = htons(DHCPC_CLIENT_PORT);
> + udph->dest = htons(DHCPC_SERVER_PORT);
> + udph->len = htons(sizeof(struct dhcp_pkt) - sizeof(struct iphdr));

UDP checksum is not set, and is also not validated on receive.