summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_event.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-22vcl: remove vcl_eventFlorin Coras1-554/+0
Change-Id: I0f805ae47f6e9465070a54d85f164bc74877af01 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-30vcl: add support for multi-worker appsFlorin Coras1-2/+2
Add basic support for app registration of multiple workers. LDP does not work with multi-worker apps. Change-Id: I3fc421a2a591a077b275827463f874b261415a63 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28vcl: remove session locksFlorin Coras1-17/+17
Support for multi-worker apps will be added in future patches. This also disables vce. Change-Id: I43b0ed2d5daa2b3d8f8a12fb18bd89dcdfa0619d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-28vcl: move binary api and cfg to separate filesFlorin Coras1-58/+322
Change-Id: Ib88d703bb7d4b170059960b0688352c90c5fcc39 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19VCL: refactor async & spinlocksDave Wallace1-21/+23
- Consolidate async code. - Add macros for spinlocks to improve readability. Change-Id: I2e0fd2b82ea76987aaf298a183d816c7d2ee0867 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-04-12VCL IOEvent external API callbackKeith Burns (alagalah)1-44/+47
Change-Id: I417357b00c43b27872aa3f681335bdc1ef574eca Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-13VCL: Fix race condition in event thread functionDave Wallace1-11/+17
Change-Id: I8586faee0b3a40932cd711b60cebe1a23ff82a56 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-09VCL API for external callback for listener/connect eventKeith Burns (alagalah)1-2/+3
Change-Id: Ic59355683b581945d10a2df97d9b2deae87a998e Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-03-08VCL event handling changesKeith Burns (alagalah)1-0/+15
- added vce_get_event_handler() - added check for event before blocking on mutex in vppcom_session_accept() Change-Id: I8e19ea5fcbaa40279cb28152b9923ca8f1328670 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-03-08VCL refactoringKeith Burns (alagalah)1-18/+14
- simplified event handling and unregister - removed fixed need to bit flip event hash key - added spinlock for client_session_fifo (was using sessions_lockp) - removed redundant vars Change-Id: I3c7645da660fb5560efdc4e9347e105df9650a16 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-03-05VCL async event handlerKeith Burns (alagalah)1-0/+267
- provides async handling of events such as accept/connect Change-Id: Id95947237ef16629371b3c99822059d423e2f918 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
p { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __INTERFACE_RX_DPO_H__
#define __INTERFACE_RX_DPO_H__

#include <vnet/dpo/dpo.h>

/**
 * @brief
 * The data-path object representing a change of receive interface.
 * If a packet encounters an object of this type in the data-path, it's
 * RX interface is changed.
 */
typedef struct interface_rx_dpo_t_
{
    /**
     * The Software interface index that the packets will be given
     * as the ingress/rx interface
     */
    u32 ido_sw_if_index;

    /**
     * next VLIB node. A '<proto>-input' node.
     */
    u32 ido_next_node;

    /**
     * DPO protocol that the packets will have as they 'ingress'
     * on this interface
     */
    dpo_proto_t ido_proto;

    /**
     * number of locks.
     */
    u16 ido_locks;
} interface_rx_dpo_t;

extern void interface_rx_dpo_add_or_lock (dpo_proto_t proto,
                                          u32 sw_if_index,
                                          dpo_id_t *dpo);

extern void interface_rx_dpo_module_init(void);

/**
 * @brief pool of all interface DPOs
 */
extern interface_rx_dpo_t *interface_rx_dpo_pool;

static inline interface_rx_dpo_t *
interface_rx_dpo_get (index_t index)
{
    return (pool_elt_at_index(interface_rx_dpo_pool, index));
}

#endif