ovn/controller/pinctrl.c
static void
pinctrl_recv(struct rconn *swconn, const struct ofp_header *oh,
             enum ofptype type)
{
    if (type == OFPTYPE_ECHO_REQUEST) {
        queue_msg(swconn, ofputil_encode_echo_reply(oh));
    } else if (type == OFPTYPE_GET_CONFIG_REPLY) {
        /* Enable asynchronous messages */
        struct ofputil_switch_config config;

        ofputil_decode_get_config_reply(oh, &config);
        config.miss_send_len = UINT16_MAX;
        set_switch_config(swconn, &config);
    } else if (type == OFPTYPE_PACKET_IN) {
        process_packet_in(swconn, oh);
    } else {
        if (VLOG_IS_DBG_ENABLED()) {
            static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(30, 300);

            char *s = ofp_to_string(oh, ntohs(oh->length), NULL, NULL, 2);

            VLOG_DBG_RL(&rl, "OpenFlow packet ignored: %s", s);
            free(s);
        }
    }
}
/* 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_recv(struct rconn *swconn, const struct ofp_header *oh,
             enum ofptype type)
{
    if (type == OFPTYPE_ECHO_REQUEST) {
        queue_msg(swconn, ofputil_encode_echo_reply(oh));
    } else if (type == OFPTYPE_GET_CONFIG_REPLY) {
        struct ofputil_switch_config config;
        ofputil_decode_get_config_reply(oh, &config);
        config.miss_send_len = UINT16_MAX;
        set_switch_config(swconn, &config);
    } else if (type == OFPTYPE_PACKET_IN) {
        process_packet_in(swconn, oh);
    } else {
        if (VLOG_IS_DBG_ENABLED()) {
            static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(30, 300);
            char *s = ofp_to_string(oh, ntohs(oh->length), NULL, NULL, 2);
            VLOG_DBG_RL(&rl, "OpenFlow packet ignored: %s", s);
            free(s);
        }
    }
}
static void pinctrl_recv ( struct rconn * swconn , const struct ofp_header * oh , enum ofptype type ) { if ( type == OFPTYPE_ECHO_REQUEST ) { queue_msg ( swconn , ofputil_encode_echo_reply ( oh ) ) ; } else if ( type == OFPTYPE_GET_CONFIG_REPLY ) { struct ofputil_switch_config config ; ofputil_decode_get_config_reply ( oh , & config ) ; config . miss_send_len = UINT16_MAX ; set_switch_config ( swconn , & config ) ; } else if ( type == OFPTYPE_PACKET_IN ) { process_packet_in ( swconn , oh ) ; } else { if ( VLOG_IS_DBG_ENABLED ( ) ) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT ( 30 , 300 ) ; char * s = ofp_to_string ( oh , ntohs ( oh -> length ) , NULL , NULL , 2 ) ; VLOG_DBG_RL ( & rl , " " , s ) ; free ( s ) ; } } }
Called with in the pinctrl_handler thread context.
Called with in the pinctrl_handler thread context .
/* Enable asynchronous messages */