Lines Matching full:vp

67 	struct sk_buff *skb, struct vector_private *vp)  in l2tpv3_form_header()  argument
69 struct uml_l2tpv3_data *td = vp->transport_data; in l2tpv3_form_header()
97 struct sk_buff *skb, struct vector_private *vp) in gre_form_header() argument
99 struct uml_gre_data *td = vp->transport_data; in gre_form_header()
115 struct sk_buff *skb, struct vector_private *vp) in raw_form_header() argument
131 uint8_t *header, struct sk_buff *skb, struct vector_private *vp) in l2tpv3_verify_header() argument
133 struct uml_l2tpv3_data *td = vp->transport_data; in l2tpv3_verify_header()
152 netdev_err(vp->dev, "uml_l2tpv3: unknown cookie id"); in l2tpv3_verify_header()
159 netdev_err(vp->dev, "uml_l2tpv3: session mismatch"); in l2tpv3_verify_header()
166 uint8_t *header, struct sk_buff *skb, struct vector_private *vp) in gre_verify_header() argument
170 struct uml_gre_data *td = vp->transport_data; in gre_verify_header()
177 netdev_err(vp->dev, "header type disagreement, expecting %0x, got %0x", in gre_verify_header()
188 netdev_err(vp->dev, "unknown key id %0x, expecting %0x", in gre_verify_header()
197 uint8_t *header, struct sk_buff *skb, struct vector_private *vp) in raw_verify_header() argument
202 (vp->req_size != 65536)) { in raw_verify_header()
205 vp->dev, in raw_verify_header()
241 static int build_gre_transport_data(struct vector_private *vp) in build_gre_transport_data() argument
248 vp->transport_data = kmalloc(sizeof(struct uml_gre_data), GFP_KERNEL); in build_gre_transport_data()
249 if (vp->transport_data == NULL) in build_gre_transport_data()
251 td = vp->transport_data; in build_gre_transport_data()
257 vp->form_header = &gre_form_header; in build_gre_transport_data()
258 vp->verify_header = &gre_verify_header; in build_gre_transport_data()
259 vp->header_size = 4; in build_gre_transport_data()
265 if (get_uint_param(vp->parsed, "v6", &temp_int)) { in build_gre_transport_data()
270 if (get_uint_param(vp->parsed, "rx_key", &temp_rx)) { in build_gre_transport_data()
271 if (get_uint_param(vp->parsed, "tx_key", &temp_tx)) { in build_gre_transport_data()
276 vp->header_size += 4; in build_gre_transport_data()
284 if (get_uint_param(vp->parsed, "sequence", &temp_int)) { in build_gre_transport_data()
286 vp->header_size += 4; in build_gre_transport_data()
290 vp->parsed, "pin_sequence", &temp_int)) { in build_gre_transport_data()
296 vp->rx_header_size = vp->header_size; in build_gre_transport_data()
298 vp->rx_header_size += sizeof(struct iphdr); in build_gre_transport_data()
302 static int build_l2tpv3_transport_data(struct vector_private *vp) in build_l2tpv3_transport_data() argument
310 vp->transport_data = kmalloc( in build_l2tpv3_transport_data()
313 if (vp->transport_data == NULL) in build_l2tpv3_transport_data()
316 td = vp->transport_data; in build_l2tpv3_transport_data()
318 vp->form_header = &l2tpv3_form_header; in build_l2tpv3_transport_data()
319 vp->verify_header = &l2tpv3_verify_header; in build_l2tpv3_transport_data()
322 vp->header_size = 4; in build_l2tpv3_transport_data()
329 if (get_uint_param(vp->parsed, "v6", &temp_int)) { in build_l2tpv3_transport_data()
334 if (get_uint_param(vp->parsed, "rx_session", &temp_rxs)) { in build_l2tpv3_transport_data()
335 if (get_uint_param(vp->parsed, "tx_session", &temp_txs)) { in build_l2tpv3_transport_data()
346 if (get_uint_param(vp->parsed, "cookie64", &temp_int)) { in build_l2tpv3_transport_data()
351 if (get_ulong_param(vp->parsed, "rx_cookie", &temp_rx)) { in build_l2tpv3_transport_data()
352 if (get_ulong_param(vp->parsed, "tx_cookie", &temp_tx)) { in build_l2tpv3_transport_data()
357 vp->header_size += 8; in build_l2tpv3_transport_data()
362 vp->header_size += 4; in build_l2tpv3_transport_data()
371 if (get_uint_param(vp->parsed, "counter", &temp_int)) { in build_l2tpv3_transport_data()
374 vp->header_size += 4; in build_l2tpv3_transport_data()
376 vp->parsed, "pin_counter", &temp_int)) { in build_l2tpv3_transport_data()
383 if (get_uint_param(vp->parsed, "udp", &temp_int)) { in build_l2tpv3_transport_data()
386 vp->header_size += 4; in build_l2tpv3_transport_data()
393 vp->rx_header_size = vp->header_size; in build_l2tpv3_transport_data()
395 vp->rx_header_size += sizeof(struct iphdr); in build_l2tpv3_transport_data()
400 static int build_raw_transport_data(struct vector_private *vp) in build_raw_transport_data() argument
402 if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) { in build_raw_transport_data()
403 if (!uml_raw_enable_vnet_headers(vp->fds->tx_fd)) in build_raw_transport_data()
405 vp->form_header = &raw_form_header; in build_raw_transport_data()
406 vp->verify_header = &raw_verify_header; in build_raw_transport_data()
407 vp->header_size = sizeof(struct virtio_net_hdr); in build_raw_transport_data()
408 vp->rx_header_size = sizeof(struct virtio_net_hdr); in build_raw_transport_data()
409 vp->dev->hw_features |= (NETIF_F_TSO | NETIF_F_GRO); in build_raw_transport_data()
410 vp->dev->features |= in build_raw_transport_data()
414 vp->dev, in build_raw_transport_data()
421 static int build_hybrid_transport_data(struct vector_private *vp) in build_hybrid_transport_data() argument
423 if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) { in build_hybrid_transport_data()
424 vp->form_header = &raw_form_header; in build_hybrid_transport_data()
425 vp->verify_header = &raw_verify_header; in build_hybrid_transport_data()
426 vp->header_size = sizeof(struct virtio_net_hdr); in build_hybrid_transport_data()
427 vp->rx_header_size = sizeof(struct virtio_net_hdr); in build_hybrid_transport_data()
428 vp->dev->hw_features |= in build_hybrid_transport_data()
430 vp->dev->features |= in build_hybrid_transport_data()
434 vp->dev, in build_hybrid_transport_data()
440 if (uml_tap_enable_vnet_headers(vp->fds->tx_fd)) in build_hybrid_transport_data()
445 static int build_tap_transport_data(struct vector_private *vp) in build_tap_transport_data() argument
448 if (uml_tap_enable_vnet_headers(vp->fds->tx_fd)) { in build_tap_transport_data()
449 vp->form_header = &raw_form_header; in build_tap_transport_data()
450 vp->verify_header = &raw_verify_header; in build_tap_transport_data()
451 vp->header_size = sizeof(struct virtio_net_hdr); in build_tap_transport_data()
452 vp->rx_header_size = sizeof(struct virtio_net_hdr); in build_tap_transport_data()
453 vp->dev->hw_features |= in build_tap_transport_data()
455 vp->dev->features |= in build_tap_transport_data()
459 vp->dev, in build_tap_transport_data()
468 static int build_bess_transport_data(struct vector_private *vp) in build_bess_transport_data() argument
470 vp->form_header = NULL; in build_bess_transport_data()
471 vp->verify_header = NULL; in build_bess_transport_data()
472 vp->header_size = 0; in build_bess_transport_data()
473 vp->rx_header_size = 0; in build_bess_transport_data()
477 int build_transport_data(struct vector_private *vp) in build_transport_data() argument
479 char *transport = uml_vector_fetch_arg(vp->parsed, "transport"); in build_transport_data()
482 return build_gre_transport_data(vp); in build_transport_data()
484 return build_l2tpv3_transport_data(vp); in build_transport_data()
486 return build_raw_transport_data(vp); in build_transport_data()
488 return build_tap_transport_data(vp); in build_transport_data()
490 return build_hybrid_transport_data(vp); in build_transport_data()
492 return build_bess_transport_data(vp); in build_transport_data()