ovn/controller/pinctrl.c
static void
pinctrl_handle_nd_na(struct rconn *swconn, const struct flow *ip_flow,
                     const struct match *md,
                     struct ofpbuf *userdata, bool is_router)
{
    /* This action only works for IPv6 ND packets, and the switch should only
     * send us ND packets this way, but check here just to be sure. */
    if (!is_nd(ip_flow, NULL)) {
        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
        VLOG_WARN_RL(&rl, "NA action on non-ND packet");
        return;
    }

    uint64_t packet_stub[128 / 8];
    struct dp_packet packet;
    dp_packet_use_stub(&packet, packet_stub, sizeof packet_stub);

    /* These flags are not exactly correct.  Look at section 7.2.4
     * of RFC 4861. */
    uint32_t rso_flags = ND_RSO_SOLICITED | ND_RSO_OVERRIDE;
    if (is_router) {
        rso_flags |= ND_RSO_ROUTER;
    }
    compose_nd_na(&packet, ip_flow->dl_dst, ip_flow->dl_src,
                  &ip_flow->nd_target, &ip_flow->ipv6_src,
                  htonl(rso_flags));

    /* Reload previous packet metadata and set actions from userdata. */
    set_actions_and_enqueue_msg(swconn, &packet, md, userdata);
    dp_packet_uninit(&packet);
}
/* Called with in the pinctrl_handler thread context. */
Called with in the pinctrl_handler thread context.
Called with in the pinctrl_handler thread context .
static void
pinctrl_handle_nd_na(struct rconn *swconn, const struct flow *ip_flow,
                     const struct match *md,
                     struct ofpbuf *userdata, bool is_router)
{
    if (!is_nd(ip_flow, NULL)) {
        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
        VLOG_WARN_RL(&rl, "NA action on non-ND packet");
        return;
    }
    uint64_t packet_stub[128 / 8];
    struct dp_packet packet;
    dp_packet_use_stub(&packet, packet_stub, sizeof packet_stub);
    uint32_t rso_flags = ND_RSO_SOLICITED | ND_RSO_OVERRIDE;
    if (is_router) {
        rso_flags |= ND_RSO_ROUTER;
    }
    compose_nd_na(&packet, ip_flow->dl_dst, ip_flow->dl_src,
                  &ip_flow->nd_target, &ip_flow->ipv6_src,
                  htonl(rso_flags));
    set_actions_and_enqueue_msg(swconn, &packet, md, userdata);
    dp_packet_uninit(&packet);
}
static void pinctrl_handle_nd_na ( struct rconn * swconn , const struct flow * ip_flow , const struct match * md , struct ofpbuf * userdata , bool is_router ) { if ( ! is_nd ( ip_flow , NULL ) ) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT ( 1 , 5 ) ; VLOG_WARN_RL ( & rl , " " ) ; return ; } uint64_t packet_stub [ 128 / 8 ] ; struct dp_packet packet ; dp_packet_use_stub ( & packet , packet_stub , sizeof packet_stub ) ; uint32_t rso_flags = ND_RSO_SOLICITED | ND_RSO_OVERRIDE ; if ( is_router ) { rso_flags |= ND_RSO_ROUTER ; } compose_nd_na ( & packet , ip_flow -> dl_dst , ip_flow -> dl_src , & ip_flow -> nd_target , & ip_flow -> ipv6_src , htonl ( rso_flags ) ) ; set_actions_and_enqueue_msg ( swconn , & packet , md , userdata ) ; dp_packet_uninit ( & packet ) ; }
Called with in the pinctrl_handler thread context.
Called with in the pinctrl_handler thread context .
/* This action only works for IPv6 ND packets, and the switch should only
     * send us ND packets this way, but check here just to be sure. */ /* These flags are not exactly correct.  Look at section 7.2.4
     * of RFC 4861. */ /* Reload previous packet metadata and set actions from userdata. */