ovn/controller/pinctrl.c
static void
pinctrl_handle_nd_ns(struct rconn *swconn, const struct flow *ip_flow,
                     struct dp_packet *pkt_in,
                     const struct match *md, struct ofpbuf *userdata)
{
    /* This action only works for IPv6 packets. */
    if (get_dl_type(ip_flow) != htons(ETH_TYPE_IPV6)) {
        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
        VLOG_WARN_RL(&rl, "NS action on non-IPv6 packet");
        return;
    }

    ovs_mutex_lock(&pinctrl_mutex);
    pinctrl_handle_buffered_packets(ip_flow, pkt_in, md, false);
    ovs_mutex_unlock(&pinctrl_mutex);

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

    compose_nd_ns(&packet, ip_flow->dl_src, &ip_flow->ipv6_src,
                  &ip_flow->ipv6_dst);

    /* 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_ns(struct rconn *swconn, const struct flow *ip_flow,
                     struct dp_packet *pkt_in,
                     const struct match *md, struct ofpbuf *userdata)
{
    if (get_dl_type(ip_flow) != htons(ETH_TYPE_IPV6)) {
        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
        VLOG_WARN_RL(&rl, "NS action on non-IPv6 packet");
        return;
    }
    ovs_mutex_lock(&pinctrl_mutex);
    pinctrl_handle_buffered_packets(ip_flow, pkt_in, md, false);
    ovs_mutex_unlock(&pinctrl_mutex);
    uint64_t packet_stub[128 / 8];
    struct dp_packet packet;
    dp_packet_use_stub(&packet, packet_stub, sizeof packet_stub);
    compose_nd_ns(&packet, ip_flow->dl_src, &ip_flow->ipv6_src,
                  &ip_flow->ipv6_dst);
    set_actions_and_enqueue_msg(swconn, &packet, md, userdata);
    dp_packet_uninit(&packet);
}
static void pinctrl_handle_nd_ns ( struct rconn * swconn , const struct flow * ip_flow , struct dp_packet * pkt_in , const struct match * md , struct ofpbuf * userdata ) { if ( get_dl_type ( ip_flow ) != htons ( ETH_TYPE_IPV6 ) ) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT ( 1 , 5 ) ; VLOG_WARN_RL ( & rl , " " ) ; return ; } ovs_mutex_lock ( & pinctrl_mutex ) ; pinctrl_handle_buffered_packets ( ip_flow , pkt_in , md , false ) ; ovs_mutex_unlock ( & pinctrl_mutex ) ; uint64_t packet_stub [ 128 / 8 ] ; struct dp_packet packet ; dp_packet_use_stub ( & packet , packet_stub , sizeof packet_stub ) ; compose_nd_ns ( & packet , ip_flow -> dl_src , & ip_flow -> ipv6_src , & ip_flow -> ipv6_dst ) ; 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 packets. */ /* Reload previous packet metadata and set actions from userdata. */