summaryrefslogtreecommitdiffstats
path: root/src/vnet/classify/vnet_classify.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-0/+1
* u32/u64/uword mismatches * pointer-to-int fixes * printf formatting issues * issues with incorrect "ULL" and related suffixes * structure alignment and padding issues Change-Id: I70b989007758755fe8211c074f651150680f60b4 Signed-off-by: David Johnson <davijoh3@cisco.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns1-3/+0
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-26Added u8x16,u32x4,u64x2 variants of _zero_byte_mask(x) for ARM/NEON ↵Adrian Oanca1-8/+4
platform. VPP-1129 Change-Id: I954acb56d901e42976e71534317f38d7c4359bcf Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
2018-02-20vppinfra: CLIB_HAVE_VEC128 mandates SSE4.2Damjan Marion1-1/+1
Change-Id: I6511110d0472203498a4f8741781eeeeb4f90844 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-07classifier-based ACL: refactor + add output ACLAndrew Yourtchenko1-0/+1
For implementation of MACIP ACLs enhancement (VPP-1088), an outbound classifier-based ACL would be needed. There was an existing incomplete code for outbound ACLs, it looked almost exact copy of input ACLs, minus the various enhancements, trying to sync that code seemed error-prone and cumbersome to maintain in the longer run. This change refactors the input+output ACLs processing into a unified routine (thus any changes will have effect on both), and also adds the API to set the output interface ACL, with the same format and semantics as the existing input one (except working on output ACL of course). WARNING: IP outbound ACL in L3 mode clobbers the ip.* fields in the vnet_buffer_opaque_t, since the code is using l2_classify.* The net_buffer (p0)->ip.save_rewrite_length is rescued into l2_classify.pad.l2_len, and used to rewind the header in case of drop, so that ipX_drop prints something sensible. Change-Id: I62f814f1e3650e504474a3a5359edb8a0a8836ed Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-11-28VPP-246 Coding standards cleanup - vnet/vnet/classifykhemendra kumar1-238/+278
Signed-off-by: khemendra kumar <khemendra.kumar13@gmail.com> Change-Id: I0d94ef604d34da6981e7c2d2b4da5ec3ec5fb19a
2017-11-18Rename classifier ip6-sr metadata set actionDave Barach1-1/+1
There's nothing ip6-sr specific about it. Change-Id: I9e3710162bd81b535c46599c988557abf5a5003b Signed-off-by: Dave Barach <dave@barachs.net>
2017-11-10add classify session action set-sr-policy-indexGabriel Ganne1-0/+1
This allows to use the classifier to steer source routing packets instead of using the "sr steer" command. This way we can steer on anything instead of only the dst ip address. test: * add add_node_next function to the VppPapiProvider class. * add simple test scenario using the classifier to steer packets with dest ip addr == a7::/8 to the source routing insert node. * use new interface indexes (3,4) instead of (0,1) to prevent a cleanup conflict with the other tests which attach a specific fib to the interface. The test creates interfaces sepsrated from the other tests to prevent a conflict in the cleaning of the ip6 fib index 1 which causes vpp not to be able to find a default route on this table. Change-Id: Ibacb30fab3ce53f0dfe848ca6a8cdf0d111d8336 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-05-24Leak locks and tables in the ClassifierNeale Ranns1-3/+6
Change-Id: Iae04c57bba87ab3665388eadd0805f75171636a5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-20VPP-849: improve vnet classifier memory allocator performanceDave Barach1-46/+57
Port the linear-scan bucket fix from bihash_template.c. Change-Id: Id8b2d1fe402401f098270ce6121c2f44f2f24c49 Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-23Fix vpp built-in version of api_unformat_sw_if_index(...)Dave Barach1-0/+1
Change-Id: I103fe19a1ecbaf3746ec6b957fa1010458cc9fae Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+523
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
ght: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2015-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.
 */

option version = "1.0.0";

/** \brief Configure IPFIX exporter process request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param collector_address - address of IPFIX collector
    @param collector_port - port of IPFIX collector
    @param src_address - address of IPFIX exporter
    @param vrf_id - VRF / fib table ID
    @param path_mtu - Path MTU between exporter and collector
    @param template_interval - number of seconds after which to resend template
    @param udp_checksum - UDP checksum calculation enable flag
*/
autoreply define set_ipfix_exporter
{
  u32 client_index;
  u32 context;
  u8 collector_address[16];
  u16 collector_port;
  u8 src_address[16];
  u32 vrf_id;
  u32 path_mtu;
  u32 template_interval;
  u8 udp_checksum;
};

/** \brief IPFIX exporter dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_exporter_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Reply to IPFIX exporter dump request
    @param context - sender context which was passed in the request
    @param collector_address - address of IPFIX collector
    @param collector_port - port of IPFIX collector
    @param src_address - address of IPFIX exporter
    @param fib_index - fib table index
    @param path_mtu - Path MTU between exporter and collector
    @param template_interval - number of seconds after which to resend template
    @param udp_checksum - UDP checksum calculation enable flag
*/
define ipfix_exporter_details
{
  u32 context;
  u8 collector_address[16];
  u16 collector_port;
  u8 src_address[16];
  u32 vrf_id;
  u32 path_mtu;
  u32 template_interval;
  u8 udp_checksum;
};

/** \brief IPFIX classify stream configure request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param domain_id - domain ID reported in IPFIX messages for classify stream
    @param src_port - source port of UDP session for classify stream
*/
autoreply define set_ipfix_classify_stream {
    u32 client_index;
    u32 context;
    u32 domain_id;
    u16 src_port;
};

/** \brief IPFIX classify stream dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_classify_stream_dump {
    u32 client_index;
    u32 context;
};

/** \brief Reply to IPFIX classify stream dump request
    @param context - sender context, to match reply w/ request
    @param domain_id - domain ID reported in IPFIX messages for classify stream
    @param src_port - source port of UDP session for classify stream
*/
define ipfix_classify_stream_details {
    u32 context;
    u32 domain_id;
    u16 src_port;
};

/** \brief IPFIX add or delete classifier table request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param table_id - classifier table ID
    @param ip_version - version of IP used in the classifier table
    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
*/
autoreply define ipfix_classify_table_add_del {
    u32 client_index;
    u32 context;
    u32 table_id;
    u8 ip_version;
    u8 transport_protocol;
    u8 is_add;
};

/** \brief IPFIX classify tables dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_classify_table_dump {
    u32 client_index;
    u32 context;
};

/** \brief Reply to IPFIX classify tables dump request
    @param context - sender context, to match reply w/ request
    @param table_id - classifier table ID
    @param ip_version - version of IP used in the classifier table
    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
*/
define ipfix_classify_table_details {
    u32 context;
    u32 table_id;
    u8 ip_version;
    u8 transport_protocol;
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */