Skip to content

Commit

Permalink
net: Add ndo_{set|get}_vf_port support for enic dynamic vnics
Browse files Browse the repository at this point in the history
Add enic ndo_{set|get}_vf_port ops to support setting/getting
port-profile for enic dynamic devices.  Enic dynamic devices are just like
normal enic eth devices except dynamic enics require an extra configuration
step to assign a port-profile identifier to the interface before the
interface is useable.  Once a port-profile is assigned, link comes up on the
interface and is ready for I/O.  The port-profile is used to configure the
network port assigned to the interface.  The network port configuration
includes VLAN membership, QoS policies, and port security settings typical
of a data center network.

A dynamic enic initially has a zero-mac address.  Before a port-profile is
assigned, a valid non-zero unicast mac address should be assign to the
dynamic enic interface.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
  • Loading branch information
Scott Feldman authored and David S. Miller committed May 18, 2010
1 parent 57b6108 commit f8bd909
Show file tree
Hide file tree
Showing 9 changed files with 521 additions and 24 deletions.
2 changes: 1 addition & 1 deletion drivers/net/enic/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_ENIC) := enic.o

enic-y := enic_main.o vnic_cq.o vnic_intr.o vnic_wq.o \
enic_res.o vnic_dev.o vnic_rq.o
enic_res.o vnic_dev.o vnic_rq.o vnic_vic.o

10 changes: 9 additions & 1 deletion drivers/net/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION "1.3.1.1"
#define DRV_VERSION "1.3.1.1-pp"
#define DRV_COPYRIGHT "Copyright 2008-2009 Cisco Systems, Inc"
#define PFX DRV_NAME ": "

Expand Down Expand Up @@ -74,6 +74,13 @@ struct enic_msix_entry {
void *devid;
};

struct enic_port_profile {
u8 request;
char name[PORT_PROFILE_MAX];
u8 instance_uuid[PORT_UUID_MAX];
u8 host_uuid[PORT_UUID_MAX];
};

/* Per-instance private data structure */
struct enic {
struct net_device *netdev;
Expand All @@ -95,6 +102,7 @@ struct enic {
u32 port_mtu;
u32 rx_coalesce_usecs;
u32 tx_coalesce_usecs;
struct enic_port_profile pp;

/* work queue cache line section */
____cacheline_aligned struct vnic_wq wq[ENIC_WQ_MAX];
Expand Down
Loading

0 comments on commit f8bd909

Please sign in to comment.