All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bhanu Prakash Gollapudi" <bprakash@broadcom.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: "JBottomley@parallels.com" <JBottomley@parallels.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Michael Chan <mchan@broadcom.com>,
	"robert.w.love@intel.com" <robert.w.love@intel.com>,
	"devel@open-fcoe.org" <devel@open-fcoe.org>
Subject: Re: [PATCH v2 15/18] fcoe: Move common functions to fcoe_transport library
Date: Thu, 8 Sep 2011 07:41:37 -0700	[thread overview]
Message-ID: <4E68D421.5060809@broadcom.com> (raw)
In-Reply-To: <4E68A2CD.5020804@cs.wisc.edu>

On 9/8/2011 4:11 AM, Mike Christie wrote:
> On 08/04/2011 07:38 PM, Bhanu Prakash Gollapudi wrote:
>>   /**
>> - * fcoe_get_wwn() - Get the world wide name from LLD if it supports it
>> - * @netdev: the associated net device
>> - * @wwn: the output WWN
>> - * @type: the type of WWN (WWPN or WWNN)
>> - *
>> - * Returns: 0 for success
>> - */
>> -static int fcoe_get_wwn(struct net_device *netdev, u64 *wwn, int type)
>> -{
>> -	const struct net_device_ops *ops = netdev->netdev_ops;
>> -
>> -	if (ops->ndo_fcoe_get_wwn)
>> -		return ops->ndo_fcoe_get_wwn(netdev, wwn, type);
>> -	return -EINVAL;
>> -}
>> -
>> -/**
>
>
>
>> +/**
>> + * fcoe_get_wwn() - Get the world wide name from LLD if it supports it
>> + * @netdev: the associated net device
>> + * @wwn: the output WWN
>> + * @type: the type of WWN (WWPN or WWNN)
>> + *
>> + * Returns: 0 for success
>> + */
>> +int fcoe_get_wwn(struct net_device *netdev, u64 *wwn, int type)
>> +{
>> +	const struct net_device_ops *ops = netdev->netdev_ops;
>> +
>> +	if (ops->ndo_fcoe_get_wwn)
>> +		return ops->ndo_fcoe_get_wwn(netdev, wwn, type);
>> +	return -EINVAL;
>> +}
>> +EXPORT_SYMBOL_GPL(fcoe_get_wwn);
>> +
>>
>
> I got a report that this is going to be a problem because the fcoe ops
> like ndo_fcoe_get_wwn are defined when CONFIG_FCOE is set. That is set
> for fcoe.ko. If you move functions calling those callouts to libfcoe
> then it is possible CONFIG_FCOE is not set (if you were just using
> bnx2fc.ko and not using fcoe.ko for example), and the build fails like this:
>
>
> drivers/scsi/fcoe/fcoe_transport.c: In function ‘fcoe_get_wwn’:
> drivers/scsi/fcoe/fcoe_transport.c:152: error: ‘const struct
> net_device_ops’ has no member named ‘ndo_fcoe_get_wwn’
> drivers/scsi/fcoe/fcoe_transport.c:153: error: ‘const struct
> net_device_ops’ has no member named ‘ndo_fcoe_get_wwn’
> make[3]: *** [drivers/scsi/fcoe/fcoe_transport.o] Error 1
>
>
> Do we need some ifdefs in libfcoe around the ops use or should there be
> some sort of lower level transport module callouts (or whatever modules
> like bnxfc and fcoe are called) that libfcoe calls into so those drivers
> can call into something like the netdev callouts if they use them?
>
Mike, This change has already been submitted and applied to net-next 
tree, as the change is in netdevice.h. The flags and ndo_fcoe_get_wwn 
are now moved under CONFIG_LIBFCOE.

http://patchwork.ozlabs.org/patch/111838/


Thanks,
Bhanu


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

  reply	other threads:[~2011-09-08 14:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05  0:38 [PATCH v2 00/18] bnx2fc version 1.0.5 Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 01/18] bnx2fc: Reset the max receive frame size Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 02/18] bnx2fc: Bug fixes in percpu_thread_create/destroy Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 03/18] bnx2fc: Enable bsg_request support for bnx2fc Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 04/18] bnx2fc: Remove erroneous kref_get on IO request Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 05/18] bnx2fc: Do not attempt destroying NPIV port twice Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 06/18] bnx2fc: Change function names of bnx2fc_netdev_setup/bnx2fc_netdev_cleanup Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 07/18] bnx2fc: Reorganize cleanup code between interface_cleanup and if_destory Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 08/18] bnx2fc: Handle NETDEV_UNREGISTER for vlan devices Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 09/18] bnx2fc: Clear DESTROY_CMPL flag after firmware destroy Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 10/18] bnx2fc: Do not reuse the fcoe connection id immediately Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 11/18] bnx2fc: IO errors when receiving unsolicited LOGO Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 12/18] bnx2fc: Fix NULL pointer deref during arm_cq Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 13/18] bnx2fc: code cleanup in bnx2fc_offload_session Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 14/18] bnx2fc: Drop incoming ABTS Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 15/18] fcoe: Move common functions to fcoe_transport library Bhanu Prakash Gollapudi
2011-09-08 11:11   ` Mike Christie
2011-09-08 14:41     ` Bhanu Prakash Gollapudi [this message]
2011-08-05  0:38 ` [PATCH v2 16/18] bnx2fc: Obtain WWNN/WWPN from the shared memory Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 17/18] bnx2fc: Prevent creating of NPIV port with duplicate WWN Bhanu Prakash Gollapudi
2011-08-05  0:38 ` [PATCH v2 18/18] bnx2fc: Bump version to 1.0.5 Bhanu Prakash Gollapudi
2011-08-24  5:48 ` [PATCH v2 00/18] bnx2fc version 1.0.5 James Bottomley
2011-08-24 18:29   ` Bhanu Prakash Gollapudi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E68D421.5060809@broadcom.com \
    --to=bprakash@broadcom.com \
    --cc=JBottomley@parallels.com \
    --cc=devel@open-fcoe.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=michaelc@cs.wisc.edu \
    --cc=robert.w.love@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.