netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Eykholt <jeykholt@cisco.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com,
	linux-scsi@vger.kernel.org, Yi Zou <yi.zou@intel.com>
Subject: Re: [net-next-2.6 PATCH 4/4] vlan: Add support to	netdev_ops.ndo_fcoe_get_wwn for VLAN device
Date: Wed, 28 Oct 2009 22:00:12 -0700	[thread overview]
Message-ID: <4AE9215C.2020208@cisco.com> (raw)
In-Reply-To: <20091029042515.15957.86107.stgit@localhost.localdomain>

Jeff Kirsher wrote:
> From: Yi Zou <yi.zou@intel.com>
> 
> Implements the netdev_ops.ndo_fcoe_get_wwn for VLAN device.

How would this arrange for different VLANs to get different WWPNs?
Or does it allow FCoE only on one VLAN per port?
I guess that would be fair because some switches support only one FCoE VLAN.

	Regards,
	Joe

> 
> Signed-off-by: Yi Zou <yi.zou@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> 
>  net/8021q/vlan_dev.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index e370197..790fd55 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -626,6 +626,17 @@ static int vlan_dev_fcoe_disable(struct net_device *dev)
>  		rc = ops->ndo_fcoe_disable(real_dev);
>  	return rc;
>  }
> +
> +static int vlan_dev_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type)
> +{
> +	struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
> +	const struct net_device_ops *ops = real_dev->netdev_ops;
> +	int rc = -EINVAL;
> +
> +	if (ops->ndo_fcoe_get_wwn)
> +		rc = ops->ndo_fcoe_get_wwn(real_dev, wwn, type);
> +	return rc;
> +}
>  #endif
>  
>  static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
> @@ -791,6 +802,7 @@ static const struct net_device_ops vlan_netdev_ops = {
>  	.ndo_fcoe_ddp_done	= vlan_dev_fcoe_ddp_done,
>  	.ndo_fcoe_enable	= vlan_dev_fcoe_enable,
>  	.ndo_fcoe_disable	= vlan_dev_fcoe_disable,
> +	.ndo_fcoe_get_wwn	= vlan_dev_fcoe_get_wwn,
>  #endif
>  };
>  
> @@ -813,6 +825,7 @@ static const struct net_device_ops vlan_netdev_accel_ops = {
>  	.ndo_fcoe_ddp_done	= vlan_dev_fcoe_ddp_done,
>  	.ndo_fcoe_enable	= vlan_dev_fcoe_enable,
>  	.ndo_fcoe_disable	= vlan_dev_fcoe_disable,
> +	.ndo_fcoe_get_wwn	= vlan_dev_fcoe_get_wwn,
>  #endif
>  };
>  
> 
> --
> 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:[~2009-10-29  5:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29  4:23 [net-next-2.6 PATCH 1/4] ixgbe: Add support for 82599 alternative WWNN/WWPN prefix Jeff Kirsher
2009-10-29  4:24 ` [net-next-2.6 PATCH 2/4] net: Add ndo_fcoe_get_wwn to net_device_ops Jeff Kirsher
2009-10-29  8:04   ` David Miller
2009-10-29  4:24 ` [net-next-2.6 PATCH 3/4] ixgbe: Add support for netdev_ops.ndo_fcoe_get_wwn to 82599 Jeff Kirsher
2009-10-29  8:04   ` David Miller
2009-10-29  4:25 ` [net-next-2.6 PATCH 4/4] vlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device Jeff Kirsher
2009-10-29  5:00   ` Joe Eykholt [this message]
2009-10-29  8:04   ` David Miller
2009-10-29  8:04 ` [net-next-2.6 PATCH 1/4] ixgbe: Add support for 82599 alternative WWNN/WWPN prefix David Miller

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=4AE9215C.2020208@cisco.com \
    --to=jeykholt@cisco.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yi.zou@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).