Lines Matching refs:vif

122 #define callback_param(vif, pending_idx) \  argument
123 (vif->pending_tx_info[pending_idx].callback_struct)
213 static void xenvif_fatal_tx_err(struct xenvif *vif) in xenvif_fatal_tx_err() argument
215 netdev_err(vif->dev, "fatal error; disabling device\n"); in xenvif_fatal_tx_err()
216 vif->disabled = true; in xenvif_fatal_tx_err()
218 if (vif->num_queues) in xenvif_fatal_tx_err()
219 xenvif_kick_thread(&vif->queues[0]); in xenvif_fatal_tx_err()
240 netdev_err(queue->vif->dev, in xenvif_count_requests()
243 xenvif_fatal_tx_err(queue->vif); in xenvif_count_requests()
251 netdev_err(queue->vif->dev, in xenvif_count_requests()
254 xenvif_fatal_tx_err(queue->vif); in xenvif_count_requests()
267 netdev_dbg(queue->vif->dev, in xenvif_count_requests()
289 netdev_dbg(queue->vif->dev, in xenvif_count_requests()
299 netdev_err(queue->vif->dev, "Cross page boundary, txp->offset: %u, size: %u\n", in xenvif_count_requests()
301 xenvif_fatal_tx_err(queue->vif); in xenvif_count_requests()
336 txp->gref, queue->vif->domid); in xenvif_tx_create_map_op()
414 netdev_err(queue->vif->dev, in xenvif_grant_handle_set()
427 netdev_err(queue->vif->dev, in xenvif_grant_handle_reset()
459 netdev_dbg(queue->vif->dev, in xenvif_tx_check_gop()
503 netdev_dbg(queue->vif->dev, in xenvif_tx_check_gop()
608 netdev_err(queue->vif->dev, "Missing extra info\n"); in xenvif_get_extras()
609 xenvif_fatal_tx_err(queue->vif); in xenvif_get_extras()
620 netdev_err(queue->vif->dev, in xenvif_get_extras()
622 xenvif_fatal_tx_err(queue->vif); in xenvif_get_extras()
632 static int xenvif_set_skb_gso(struct xenvif *vif, in xenvif_set_skb_gso() argument
637 netdev_err(vif->dev, "GSO size must not be zero.\n"); in xenvif_set_skb_gso()
638 xenvif_fatal_tx_err(vif); in xenvif_set_skb_gso()
650 netdev_err(vif->dev, "Bad GSO type %d.\n", gso->u.gso.type); in xenvif_set_skb_gso()
651 xenvif_fatal_tx_err(vif); in xenvif_set_skb_gso()
719 static int xenvif_mcast_add(struct xenvif *vif, const u8 *addr) in xenvif_mcast_add() argument
723 if (vif->fe_mcast_count == XEN_NETBK_MCAST_MAX) { in xenvif_mcast_add()
725 netdev_err(vif->dev, in xenvif_mcast_add()
735 list_add_tail_rcu(&mcast->entry, &vif->fe_mcast_addr); in xenvif_mcast_add()
736 vif->fe_mcast_count++; in xenvif_mcast_add()
741 static void xenvif_mcast_del(struct xenvif *vif, const u8 *addr) in xenvif_mcast_del() argument
745 list_for_each_entry_rcu(mcast, &vif->fe_mcast_addr, entry) { in xenvif_mcast_del()
747 --vif->fe_mcast_count; in xenvif_mcast_del()
755 bool xenvif_mcast_match(struct xenvif *vif, const u8 *addr) in xenvif_mcast_match() argument
760 list_for_each_entry_rcu(mcast, &vif->fe_mcast_addr, entry) { in xenvif_mcast_match()
771 void xenvif_mcast_addr_list_free(struct xenvif *vif) in xenvif_mcast_addr_list_free() argument
776 while (!list_empty(&vif->fe_mcast_addr)) { in xenvif_mcast_addr_list_free()
779 mcast = list_first_entry(&vif->fe_mcast_addr, in xenvif_mcast_addr_list_free()
782 --vif->fe_mcast_count; in xenvif_mcast_addr_list_free()
811 netdev_err(queue->vif->dev, in xenvif_tx_build_gops()
816 xenvif_fatal_tx_err(queue->vif); in xenvif_tx_build_gops()
853 ret = xenvif_mcast_add(queue->vif, extra->u.mcast.addr); in xenvif_tx_build_gops()
867 xenvif_mcast_del(queue->vif, extra->u.mcast.addr); in xenvif_tx_build_gops()
883 netdev_dbg(queue->vif->dev, in xenvif_tx_build_gops()
891 netdev_err(queue->vif->dev, in xenvif_tx_build_gops()
895 xenvif_fatal_tx_err(queue->vif); in xenvif_tx_build_gops()
908 netdev_dbg(queue->vif->dev, in xenvif_tx_build_gops()
931 netdev_err(queue->vif->dev, in xenvif_tx_build_gops()
941 if (xenvif_set_skb_gso(queue->vif, skb, gso)) { in xenvif_tx_build_gops()
980 queue->tx_copy_ops[*copy_ops].source.domid = queue->vif->domid; in xenvif_tx_build_gops()
1150 netdev_err(queue->vif->dev, in xenvif_tx_submit()
1158 skb->dev = queue->vif->dev; in xenvif_tx_submit()
1163 netdev_dbg(queue->vif->dev, in xenvif_tx_submit()
1288 netdev_err(queue->vif->dev, "Unmap fail: nr_ops %tu ret %d\n", in xenvif_tx_dealloc_action()
1292 netdev_err(queue->vif->dev, in xenvif_tx_dealloc_action()
1404 netdev_err(queue->vif->dev, in xenvif_idx_unmap()
1431 xenbus_unmap_ring_vfree(xenvif_to_xenbus_device(queue->vif), in xenvif_unmap_frontend_data_rings()
1434 xenbus_unmap_ring_vfree(xenvif_to_xenbus_device(queue->vif), in xenvif_unmap_frontend_data_rings()
1448 err = xenbus_map_ring_valloc(xenvif_to_xenbus_device(queue->vif), in xenvif_map_frontend_data_rings()
1456 err = xenbus_map_ring_valloc(xenvif_to_xenbus_device(queue->vif), in xenvif_map_frontend_data_rings()
1502 static void make_ctrl_response(struct xenvif *vif, in make_ctrl_response() argument
1506 RING_IDX idx = vif->ctrl.rsp_prod_pvt; in make_ctrl_response()
1514 *RING_GET_RESPONSE(&vif->ctrl, idx) = rsp; in make_ctrl_response()
1515 vif->ctrl.rsp_prod_pvt = ++idx; in make_ctrl_response()
1518 static void push_ctrl_response(struct xenvif *vif) in push_ctrl_response() argument
1522 RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&vif->ctrl, notify); in push_ctrl_response()
1524 notify_remote_via_irq(vif->ctrl_irq); in push_ctrl_response()
1527 static void process_ctrl_request(struct xenvif *vif, in process_ctrl_request() argument
1535 status = xenvif_set_hash_alg(vif, req->data[0]); in process_ctrl_request()
1539 status = xenvif_get_hash_flags(vif, &data); in process_ctrl_request()
1543 status = xenvif_set_hash_flags(vif, req->data[0]); in process_ctrl_request()
1547 status = xenvif_set_hash_key(vif, req->data[0], in process_ctrl_request()
1557 status = xenvif_set_hash_mapping_size(vif, in process_ctrl_request()
1562 status = xenvif_set_hash_mapping(vif, req->data[0], in process_ctrl_request()
1571 make_ctrl_response(vif, req, status, data); in process_ctrl_request()
1572 push_ctrl_response(vif); in process_ctrl_request()
1575 static void xenvif_ctrl_action(struct xenvif *vif) in xenvif_ctrl_action() argument
1580 req_prod = vif->ctrl.sring->req_prod; in xenvif_ctrl_action()
1581 req_cons = vif->ctrl.req_cons; in xenvif_ctrl_action()
1592 RING_COPY_REQUEST(&vif->ctrl, req_cons, &req); in xenvif_ctrl_action()
1595 process_ctrl_request(vif, &req); in xenvif_ctrl_action()
1598 vif->ctrl.req_cons = req_cons; in xenvif_ctrl_action()
1599 vif->ctrl.sring->req_event = req_cons + 1; in xenvif_ctrl_action()
1603 static bool xenvif_ctrl_work_todo(struct xenvif *vif) in xenvif_ctrl_work_todo() argument
1605 if (likely(RING_HAS_UNCONSUMED_REQUESTS(&vif->ctrl))) in xenvif_ctrl_work_todo()
1613 struct xenvif *vif = data; in xenvif_ctrl_irq_fn() local
1615 while (xenvif_ctrl_work_todo(vif)) in xenvif_ctrl_irq_fn()
1616 xenvif_ctrl_action(vif); in xenvif_ctrl_irq_fn()