Lines Matching refs:tok
354 static void switch_ns_to_rx(struct nstoken **tok) in switch_ns_to_rx() argument
356 close_netns(*tok); in switch_ns_to_rx()
357 *tok = open_netns(RX_NETNS_NAME); in switch_ns_to_rx()
360 static void switch_ns_to_tx(struct nstoken **tok) in switch_ns_to_tx() argument
362 close_netns(*tok); in switch_ns_to_tx()
363 *tok = open_netns(TX_NETNS_NAME); in switch_ns_to_tx()
371 struct nstoken *tok = NULL; in test_xdp_metadata() local
387 tok = open_netns(TX_NETNS_NAME); in test_xdp_metadata()
388 if (!ASSERT_OK_PTR(tok, "setns")) in test_xdp_metadata()
405 switch_ns_to_rx(&tok); in test_xdp_metadata()
406 if (!ASSERT_OK_PTR(tok, "setns rx")) in test_xdp_metadata()
456 switch_ns_to_tx(&tok); in test_xdp_metadata()
457 if (!ASSERT_OK_PTR(tok, "setns tx")) in test_xdp_metadata()
470 switch_ns_to_rx(&tok); in test_xdp_metadata()
471 if (!ASSERT_OK_PTR(tok, "setns rx")) in test_xdp_metadata()
479 switch_ns_to_tx(&tok); in test_xdp_metadata()
480 if (!ASSERT_OK_PTR(tok, "setns tx")) in test_xdp_metadata()
488 switch_ns_to_rx(&tok); in test_xdp_metadata()
489 if (!ASSERT_OK_PTR(tok, "setns rx")) in test_xdp_metadata()
513 switch_ns_to_tx(&tok); in test_xdp_metadata()
514 if (!ASSERT_OK_PTR(tok, "setns tx")) in test_xdp_metadata()
522 switch_ns_to_rx(&tok); in test_xdp_metadata()
523 if (!ASSERT_OK_PTR(tok, "setns rx")) in test_xdp_metadata()
538 if (tok) in test_xdp_metadata()
539 close_netns(tok); in test_xdp_metadata()