[RFC-PATCH] libiscsi dhcp handler

4 views
Skip to first unread message

Rakesh Ranjan

unread,
Nov 16, 2009, 8:11:49 AM11/16/09
to Mike Christie, open-...@googlegroups.com, net...@vger.kernel.org, LKML, David Miller, James Bottomley, Karen Xie, Rakesh Ranjan
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

0001-Required-changes-for-libiscsi-to-support-dhcp-based.patch
0002-dhcp-handler-for-libiscsi-to-support-dhcp-provisioni.patch

Rakesh Ranjan

unread,
Nov 16, 2009, 8:24:42 AM11/16/09
to David Miller, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
David Miller wrote:
> From: Rakesh Ranjan <rak...@chelsio.com>
> 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

Rakesh Ranjan

unread,
Nov 16, 2009, 8:45:34 AM11/16/09
to David Miller, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com, Rakesh Ranjan
David Miller wrote:
> From: Rakesh Ranjan <rak...@chelsio.com>
> 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

0001-Required-changes-for-libiscsi-to-support-dhcp-based.patch
0002-dhcp-handler-for-libiscsi-to-support-dhcp-provisioni.patch

David Miller

unread,
Nov 16, 2009, 8:18:35 AM11/16/09
to rak...@chelsio.com, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
From: Rakesh Ranjan <rak...@chelsio.com>
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

Rakesh Ranjan

unread,
Nov 17, 2009, 10:26:55 PM11/17/09
to Mike Christie, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, David Miller, Karen Xie, Rakesh Ranjan
ping ...


David Miller

unread,
Nov 18, 2009, 2:25:14 AM11/18/09
to rak...@chelsio.com, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
From: Rakesh Ranjan <rak...@chelsio.com>
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.

Dan Carpenter

unread,
Nov 20, 2009, 8:29:24 AM11/20/09
to Rakesh Ranjan, David Miller, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
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

Dan Carpenter

unread,
Nov 21, 2009, 3:13:01 AM11/21/09
to Dan Carpenter, Rakesh Ranjan, David Miller, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
On Fri, Nov 20, 2009 at 03:29:24PM +0200, Dan Carpenter wrote:
> On 11/16/09, Rakesh Ranjan <rak...@chelsio.com> wrote:
> > David Miller wrote:
> >> From: Rakesh Ranjan <rak...@chelsio.com>
> >> 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

David Miller

unread,
Jan 5, 2010, 1:42:18 AM1/5/10
to rak...@chelsio.com, mich...@cs.wisc.edu, open-...@googlegroups.com, net...@vger.kernel.org, linux-...@vger.kernel.org, James.B...@suse.de, kx...@chelsio.com
From: Rakesh Ranjan <rak...@chelsio.com>
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.

Reply all
Reply to author
Forward
0 new messages