Lines Matching full:vlan

130 					/* start FCoE VLAN discovery */  in fnic_handle_link()
157 /* start FCoE VLAN discovery */ in fnic_handle_link()
375 struct fip_vlan *vlan; in fnic_fcoe_send_vlan_req() local
383 "Sending VLAN request...\n"); in fnic_fcoe_send_vlan_req()
390 vlan = (struct fip_vlan *)eth_fr; in fnic_fcoe_send_vlan_req()
392 memset(vlan, 0, sizeof(*vlan)); in fnic_fcoe_send_vlan_req()
393 memcpy(vlan->eth.h_source, fip->ctl_src_addr, ETH_ALEN); in fnic_fcoe_send_vlan_req()
394 memcpy(vlan->eth.h_dest, fcoe_all_fcfs, ETH_ALEN); in fnic_fcoe_send_vlan_req()
395 vlan->eth.h_proto = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req()
397 vlan->fip.fip_ver = FIP_VER_ENCAPS(FIP_VER); in fnic_fcoe_send_vlan_req()
398 vlan->fip.fip_op = htons(FIP_OP_VLAN); in fnic_fcoe_send_vlan_req()
399 vlan->fip.fip_subcode = FIP_SC_VL_REQ; in fnic_fcoe_send_vlan_req()
400 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); in fnic_fcoe_send_vlan_req()
402 vlan->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC; in fnic_fcoe_send_vlan_req()
403 vlan->desc.mac.fd_desc.fip_dlen = sizeof(vlan->desc.mac) / FIP_BPW; in fnic_fcoe_send_vlan_req()
404 memcpy(&vlan->desc.mac.fd_mac, fip->ctl_src_addr, ETH_ALEN); in fnic_fcoe_send_vlan_req()
406 vlan->desc.wwnn.fd_desc.fip_dtype = FIP_DT_NAME; in fnic_fcoe_send_vlan_req()
407 vlan->desc.wwnn.fd_desc.fip_dlen = sizeof(vlan->desc.wwnn) / FIP_BPW; in fnic_fcoe_send_vlan_req()
408 put_unaligned_be64(fip->lp->wwnn, &vlan->desc.wwnn.fd_wwn); in fnic_fcoe_send_vlan_req()
411 skb_put(skb, sizeof(*vlan)); in fnic_fcoe_send_vlan_req()
431 struct fcoe_vlan *vlan; in fnic_fcoe_process_vlan_resp() local
436 "Received VLAN response...\n"); in fnic_fcoe_process_vlan_resp()
441 "Received VLAN response... OP 0x%x SUB_OP 0x%x\n", in fnic_fcoe_process_vlan_resp()
454 "process_vlan_resp: FIP VLAN %d\n", vid); in fnic_fcoe_process_vlan_resp()
455 vlan = kzalloc(sizeof(*vlan), GFP_ATOMIC); in fnic_fcoe_process_vlan_resp()
456 if (!vlan) { in fnic_fcoe_process_vlan_resp()
462 vlan->vid = vid & 0x0fff; in fnic_fcoe_process_vlan_resp()
463 vlan->state = FIP_VLAN_AVAIL; in fnic_fcoe_process_vlan_resp()
464 list_add_tail(&vlan->list, &fnic->vlans); in fnic_fcoe_process_vlan_resp()
471 /* any VLAN descriptors present ? */ in fnic_fcoe_process_vlan_resp()
476 "No VLAN descriptors in FIP VLAN response\n"); in fnic_fcoe_process_vlan_resp()
481 vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); in fnic_fcoe_process_vlan_resp()
482 fnic->set_vlan(fnic, vlan->vid); in fnic_fcoe_process_vlan_resp()
483 vlan->state = FIP_VLAN_SENT; /* sent now */ in fnic_fcoe_process_vlan_resp()
484 vlan->sol_count++; in fnic_fcoe_process_vlan_resp()
499 struct fcoe_vlan *vlan; in fnic_fcoe_start_fcf_disc() local
503 vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); in fnic_fcoe_start_fcf_disc()
504 fnic->set_vlan(fnic, vlan->vid); in fnic_fcoe_start_fcf_disc()
505 vlan->state = FIP_VLAN_SENT; /* sent now */ in fnic_fcoe_start_fcf_disc()
506 vlan->sol_count = 1; in fnic_fcoe_start_fcf_disc()
590 /* set the vlan as used */ in fnic_fcoe_handle_fip_frame()
594 /* received CVL request, restart vlan disc */ in fnic_fcoe_handle_fip_frame()
644 "Trigger a Link down - VLAN Disc\n"); in fnic_handle_fip_frame()
646 /* start FCoE VLAN discovery */ in fnic_handle_fip_frame()
670 * Undo VLAN encapsulation if present. in fnic_import_rq_eth_pkt()
840 u16 q_number, completed_index, bytes_written = 0, vlan, checksum; in fnic_rq_cmpl_frame_recv() local
862 &vlan); in fnic_rq_cmpl_frame_recv()
873 &vlan_stripped, &vlan, &checksum, in fnic_rq_cmpl_frame_recv()
1017 * @skb: Ethernet Frame, FIP, without VLAN encapsulation.
1305 struct fcoe_vlan *vlan; in fnic_fcoe_reset_vlans() local
1310 * might not be required since we did this before sending vlan in fnic_fcoe_reset_vlans()
1315 list_for_each_entry_safe(vlan, next, &fnic->vlans, list) { in fnic_fcoe_reset_vlans()
1316 list_del(&vlan->list); in fnic_fcoe_reset_vlans()
1317 kfree(vlan); in fnic_fcoe_reset_vlans()
1326 struct fcoe_vlan *vlan; in fnic_handle_fip_timer() local
1346 "Start VLAN Discovery\n"); in fnic_handle_fip_timer()
1351 vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, list); in fnic_handle_fip_timer()
1353 "fip_timer: vlan %d state %d sol_count %d\n", in fnic_handle_fip_timer()
1354 vlan->vid, vlan->state, vlan->sol_count); in fnic_handle_fip_timer()
1355 switch (vlan->state) { in fnic_handle_fip_timer()
1358 "FIP VLAN is selected for FC transaction\n"); in fnic_handle_fip_timer()
1363 /* if all vlans are in failed state, restart vlan disc */ in fnic_handle_fip_timer()
1366 "Start VLAN Discovery\n"); in fnic_handle_fip_timer()
1370 if (vlan->sol_count >= FCOE_CTLR_MAX_SOL) { in fnic_handle_fip_timer()
1372 * no response on this vlan, remove from the list. in fnic_handle_fip_timer()
1373 * Try the next vlan in fnic_handle_fip_timer()
1376 "Dequeue this VLAN ID %d from list\n", in fnic_handle_fip_timer()
1377 vlan->vid); in fnic_handle_fip_timer()
1378 list_del(&vlan->list); in fnic_handle_fip_timer()
1379 kfree(vlan); in fnic_handle_fip_timer()
1380 vlan = NULL; in fnic_handle_fip_timer()
1382 /* we exhausted all vlans, restart vlan disc */ in fnic_handle_fip_timer()
1386 "fip_timer: vlan list empty, " in fnic_handle_fip_timer()
1387 "trigger vlan disc\n"); in fnic_handle_fip_timer()
1391 /* check the next vlan */ in fnic_handle_fip_timer()
1392 vlan = list_first_entry(&fnic->vlans, struct fcoe_vlan, in fnic_handle_fip_timer()
1394 fnic->set_vlan(fnic, vlan->vid); in fnic_handle_fip_timer()
1395 vlan->state = FIP_VLAN_SENT; /* sent now */ in fnic_handle_fip_timer()
1399 vlan->sol_count++; in fnic_handle_fip_timer()