bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement
1. When FCoE offload driver is registered, copy its capabilities to the chip scratchpad. 2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad. 3. Add FCoE/iSCSI statistics collection support Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
747cf6ed3d
commit
2e499d3cc1
13 changed files with 420 additions and 139 deletions
|
@ -256,11 +256,16 @@ static void cnic_ulp_ctl(struct cnic_dev *dev, int ulp_type, bool reg)
|
|||
struct cnic_local *cp = dev->cnic_priv;
|
||||
struct cnic_eth_dev *ethdev = cp->ethdev;
|
||||
struct drv_ctl_info info;
|
||||
struct fcoe_capabilities *fcoe_cap =
|
||||
&info.data.register_data.fcoe_features;
|
||||
|
||||
if (reg)
|
||||
if (reg) {
|
||||
info.cmd = DRV_CTL_ULP_REGISTER_CMD;
|
||||
else
|
||||
if (ulp_type == CNIC_ULP_FCOE && dev->fcoe_cap)
|
||||
memcpy(fcoe_cap, dev->fcoe_cap, sizeof(*fcoe_cap));
|
||||
} else {
|
||||
info.cmd = DRV_CTL_ULP_UNREGISTER_CMD;
|
||||
}
|
||||
|
||||
info.data.ulp_type = ulp_type;
|
||||
ethdev->drv_ctl(dev->netdev, &info);
|
||||
|
@ -611,6 +616,8 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type)
|
|||
|
||||
if (ulp_type == CNIC_ULP_ISCSI)
|
||||
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
|
||||
else if (ulp_type == CNIC_ULP_FCOE)
|
||||
dev->fcoe_cap = NULL;
|
||||
|
||||
synchronize_rcu();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue