提交 014f5c3f 编写于 作者: C Chris Leech 提交者: James Bottomley

[SCSI] fcoe: Introduce and allocate fcoe_interface structure, 1:1 with net_device

In preparation for NPIV support, I'm splitting the fcoe instance structure
into two to remove the assumptions about it being 1:1 with the net_device.
There will now be two structures, one which is 1:1 with the underlying
net_device and one which is allocated per virtual SCSI/FC host.

fcoe_softc is renamed to fcoe_port for the per Scsi_Host FCoE private data.

Later patches with start moving shared stuff from fcoe_port to fcoe_interface
Signed-off-by: NChris Leech <christopher.leech@intel.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 af7f85d9
此差异已折叠。
......@@ -75,10 +75,21 @@ struct fcoe_percpu_s {
};
/*
* the fcoe sw transport private data
* an FCoE interface, 1:1 with netdev
*/
struct fcoe_softc {
struct fcoe_interface {
struct list_head list;
/* This will be removed once all the shared values are
* moved out of fcoe_port */
struct fcoe_port *priv;
};
/*
* the FCoE private structure that's allocated along with the
* Scsi_Host and libfc fc_lport structures
*/
struct fcoe_port {
struct fcoe_interface *fcoe;
struct net_device *netdev;
struct fc_exch_mgr *oem; /* offload exchange manger */
struct packet_type fcoe_packet_type;
......@@ -89,12 +100,12 @@ struct fcoe_softc {
struct fcoe_ctlr ctlr;
};
#define fcoe_from_ctlr(fc) container_of(fc, struct fcoe_softc, ctlr)
#define fcoe_from_ctlr(port) container_of(port, struct fcoe_port, ctlr)
static inline struct net_device *fcoe_netdev(
const struct fc_lport *lp)
{
return ((struct fcoe_softc *)lport_priv(lp))->netdev;
return ((struct fcoe_port *)lport_priv(lp))->netdev;
}
#endif /* _FCOE_H_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册