Lines Matching refs:remus_nic
143 static void free_qdisc(libxl__remus_device_nic *remus_nic) in free_qdisc() argument
145 if (remus_nic->qdisc == NULL) in free_qdisc()
148 nl_object_put((struct nl_object *)(remus_nic->qdisc)); in free_qdisc()
149 remus_nic->qdisc = NULL; in free_qdisc()
153 libxl__remus_device_nic *remus_nic) in init_qdisc() argument
174 ret = rtnl_link_get_kernel(rs->nlsock, 0, remus_nic->ifb, &ifb); in init_qdisc()
177 "cannot obtain handle for %s: %s", remus_nic->ifb, in init_qdisc()
186 "interface %s has no index", remus_nic->ifb); in init_qdisc()
205 "plug qdisc is not installed on %s", remus_nic->ifb); in init_qdisc()
209 remus_nic->qdisc = qdisc; in init_qdisc()
212 "Cannot get qdisc handle from ifb %s", remus_nic->ifb); in init_qdisc()
249 libxl__remus_device_nic *remus_nic = dev->concrete_data; in setup_async_exec() local
259 const int dev_id = remus_nic->devid; in setup_async_exec()
260 const char *const vif = remus_nic->vif; in setup_async_exec()
261 const char *const ifb = remus_nic->ifb; in setup_async_exec()
304 libxl__remus_device_nic *remus_nic; in nic_setup() local
315 GCNEW(remus_nic); in nic_setup()
316 dev->concrete_data = remus_nic; in nic_setup()
317 remus_nic->devid = nic->devid; in nic_setup()
318 remus_nic->vif = get_vifname(dev, nic); in nic_setup()
319 if (!remus_nic->vif) { in nic_setup()
346 libxl__remus_device_nic *remus_nic = dev->concrete_data; in netbuf_setup_script_cb() local
355 const int devid = remus_nic->devid; in netbuf_setup_script_cb()
356 const char *const vif = remus_nic->vif; in netbuf_setup_script_cb()
357 const char **const ifb = &remus_nic->ifb; in netbuf_setup_script_cb()
404 rc = init_qdisc(cds, remus_nic); in netbuf_setup_script_cb()
435 libxl__remus_device_nic *remus_nic = dev->concrete_data; in netbuf_teardown_script_cb() local
440 free_qdisc(remus_nic); in netbuf_teardown_script_cb()
456 static int remus_netbuf_op(libxl__remus_device_nic *remus_nic, in remus_netbuf_op() argument
466 ret = rtnl_qdisc_plug_buffer(remus_nic->qdisc); in remus_netbuf_op()
468 ret = rtnl_qdisc_plug_release_one(remus_nic->qdisc); in remus_netbuf_op()
475 ret = rtnl_qdisc_add(rs->nlsock, remus_nic->qdisc, NLM_F_REQUEST); in remus_netbuf_op()
488 remus_nic->ifb, nl_geterror(ret)); in remus_netbuf_op()
495 libxl__remus_device_nic *remus_nic = dev->concrete_data; in nic_postsuspend() local
499 rc = remus_netbuf_op(remus_nic, dev->cds, tc_buffer_start); in nic_postsuspend()
508 libxl__remus_device_nic *remus_nic = dev->concrete_data; in nic_commit() local
512 rc = remus_netbuf_op(remus_nic, dev->cds, tc_buffer_release); in nic_commit()