Skip to content

Commit

Permalink
fcoe: prep work to start consolidate the usage of fcoe_netdev
Browse files Browse the repository at this point in the history
Currently, in the default kernel fcoe driver, it is needed to get to the underlying
private per fcoe transport's private structure, e.g., fcoe_interface in
fcoe.ko, and returns the associated netdev. The similar logic exists in other
fcoe drivers, e.g., bnx2fc, so we add a function pointer into the common
fcoe_port struct to allow individual fcoe transport implementaion (fcoe
and bnx2fc) to get the corresponding netdev associated with a give lport.

Then a inline fcoe_get_netdev() is added as part of libfcoe for all underlying
fcoe transport drivers to use regardless of its individual fcoe transport
driver, and also allows move more common code such as fcoe_link_speed_update or
fcoe_ctlr_get_lesb to be in libfcoe, rather than specific to fcoe.

This patch is a prep work that adds aforementioned fucntion pointer, and
followed by the actual code changes to make use of it.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
  • Loading branch information
Yi Zou authored and Robert Love committed Dec 14, 2012
1 parent 8e6c536 commit 8106fb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/scsi/libfcoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ struct fcoe_port {
struct timer_list timer;
struct work_struct destroy_work;
u8 data_src_addr[ETH_ALEN];
struct net_device * (*get_netdev)(const struct fc_lport *lport);
};
void fcoe_clean_pending_queue(struct fc_lport *);
void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb);
Expand Down

0 comments on commit 8106fb4

Please sign in to comment.