summaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Expand)AuthorFilesLines
2017-04-25Fix structure alignment with 32-bit pointersDamjan Marion1-0/+4
2017-04-21vlib: add cli command to dump all CLI commandsDamjan Marion1-0/+49
2017-04-11Fix typo in minimal epoll polling timePierre Pfister1-1/+1
2017-04-10Common device-input interrupt infraDamjan Marion1-0/+14
2017-04-06Use thread local storage for thread indexDamjan Marion16-116/+94
2017-04-04vlib: make vlib_node_interrupt_pending(...) thread safeDamjan Marion3-5/+22
2017-04-01Clean up event log merge codeDave Barach1-1/+1
2017-03-31vlib: extend foreach_vlib_main macro to assert if workers are not parkedDamjan Marion2-12/+27
2017-03-28vlib: inline dispatch_node(...) (again)Damjan Marion2-11/+2
2017-03-22vlib: add description field in plugin registrationDamjan Marion2-5/+10
2017-03-22vhost: support interrupt modeSteven1-5/+8
2017-03-20vnet: add device-input threadplacement infraDamjan Marion1-10/+4
2017-03-1764 bit per-thread countersNeale Ranns2-172/+101
2017-03-17vlib: fix potential crash in dispatch_node ELOG_DATA callSteven1-2/+11
2017-03-16vlib: additional runtime_data checksDamjan Marion1-8/+14
2017-03-16vlib: make runtime_data thread-localDamjan Marion5-45/+103
2017-03-15No vector allocation during buffer copyNeale Ranns1-4/+1
2017-03-14vlib: poll pre_input nodes only on main threadDamjan Marion1-6/+7
2017-03-10Retire vpp_liteDamjan Marion1-0/+6
2017-03-10vlib: deduplicatee code in main and worker main loopDamjan Marion4-142/+116
2017-03-09vlib_mains == 0 special cases be goneDave Barach6-55/+65
2017-03-08vlib: add process restart cliDamjan Marion1-0/+20
2017-03-06Add support for unix { coredump-size <size> }.Klement Sekera1-0/+22
2017-03-02Clean up binary api message handler registration issuesDave Barach1-7/+24
2017-03-01VPP-598: tcp stack initial commitDave Barach2-1/+69
2017-03-01Fix buffer template copyDave Barach2-5/+30
2017-02-28vlib: add buffer cloning supportDamjan Marion3-200/+171
2017-02-27vlib: add VLIB_BUFFER_EXT_HDR_VALID flagDamjan Marion1-0/+2
2017-02-26Load plugins in alphabetical orderDave Barach1-9/+55
2017-02-24VPP-650: handle buffer failure in vlib_buffer_copy(...)Dave Barach1-1/+10
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall3-34/+80
2017-02-22fix trace frame-queue unformat of indexMatus Fabian1-1/+1
2017-02-07VPP-630: Null pointer dereferences in vlib/unix/plugin.cOle Troan1-1/+1
2017-02-06vlib: remove algned/unaligned buffers schemeDamjan Marion4-250/+39
2017-02-05fix some 'stored but never read' warnings raised by clangGabriel Ganne2-6/+7
2017-02-03Plugin infrastructure improvementsDamjan Marion3-60/+318
2017-01-25[re]Enable per-Adjacency/neighbour countersNeale Ranns1-0/+14
2017-01-23binary-api debug CLI works with pluginsDave Barach1-2/+7
2017-01-17dpdk: remove duplicate code in buffers.cDamjan Marion2-52/+69
2017-01-14vlib: add buffer and thread callbacksDamjan Marion9-818/+469
2017-01-07plugin: add API to get pointer to symbol in different pluginDamjan Marion2-7/+26
2017-01-03vlib: merge libvlib_unix.so into libvlib.soDamjan Marion1-1/+1
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion63-0/+29819
"o">= ADDRESS_IP4; memcpy(u.ip4, a.to_v4().to_bytes().data(), 4); } else { af = ADDRESS_IP6; memcpy(u.ip6, a.to_v6().to_bytes().data(), 16); } } void to_api(const ip_address_t& a, vapi_union_address_union& u) { if (a.is_v4()) { memcpy(u.ip4, a.to_v4().to_bytes().data(), 4); } else { memcpy(u.ip6, a.to_v6().to_bytes().data(), 16); } } boost::asio::ip::address_v6 from_api(const vapi_type_ip6_address& v) { std::array<uint8_t, 16> a; std::copy(v, v + 16, std::begin(a)); boost::asio::ip::address_v6 v6(a); return v6; } boost::asio::ip::address_v4 from_api(const vapi_type_ip4_address& v) { std::array<uint8_t, 4> a; std::copy(v, v + 4, std::begin(a)); boost::asio::ip::address_v4 v4(a); return v4; } ip_address_t from_api(const vapi_type_address& v) { boost::asio::ip::address addr; if (ADDRESS_IP6 == v.af) { std::array<uint8_t, 16> a; std::copy(v.un.ip6, v.un.ip6 + 16, std::begin(a)); boost::asio::ip::address_v6 v6(a); addr = v6; } else { std::array<uint8_t, 4> a; std::copy(v.un.ip6, v.un.ip6 + 4, std::begin(a)); boost::asio::ip::address_v4 v4(a); addr = v4; } return addr; } ip_address_t from_api(const vapi_union_address_union& u, vapi_enum_fib_path_nh_proto proto) { boost::asio::ip::address addr; if (FIB_API_PATH_NH_PROTO_IP6 == proto) { std::array<uint8_t, 16> a; std::copy(u.ip6, u.ip6 + 16, std::begin(a)); boost::asio::ip::address_v6 v6(a); addr = v6; } else if (FIB_API_PATH_NH_PROTO_IP4 == proto) { std::array<uint8_t, 4> a; std::copy(u.ip6, u.ip6 + 4, std::begin(a)); boost::asio::ip::address_v4 v4(a); addr = v4; } return addr; } ip_address_t from_api(const vapi_union_address_union& u, vapi_enum_address_family af) { boost::asio::ip::address addr; if (ADDRESS_IP6 == af) { std::array<uint8_t, 16> a; std::copy(u.ip6, u.ip6 + 16, std::begin(a)); boost::asio::ip::address_v6 v6(a); addr = v6; } else { std::array<uint8_t, 4> a; std::copy(u.ip6, u.ip6 + 4, std::begin(a)); boost::asio::ip::address_v4 v4(a); addr = v4; } return addr; } void to_api(const mac_address_t& a, vapi_type_mac_address& v) { std::copy(std::begin(a.bytes), std::end(a.bytes), v); } mac_address_t from_api(const vapi_type_mac_address& v) { return mac_address_t(v); } route::prefix_t from_api(const vapi_type_prefix& v) { return route::prefix_t(from_api(v.address), v.len); } vapi_type_prefix to_api(const route::prefix_t& p) { vapi_type_prefix v; to_api(p.address(), v.address); v.len = p.mask_width(); return v; } route::mprefix_t from_api(const vapi_type_mprefix& v) { return route::mprefix_t(from_api(v.src_address, v.af), from_api(v.grp_address, v.af), v.grp_address_length); } vapi_type_mprefix to_api(const route::mprefix_t& p) { vapi_enum_address_family af; vapi_type_mprefix v; to_api(p.grp_address(), v.grp_address, af); to_api(p.src_address(), v.src_address, af); v.grp_address_length = p.mask_width(); v.af = af; return v; } vapi_enum_fib_path_nh_proto to_api(const nh_proto_t& p) { if (p == nh_proto_t::IPV4) { return FIB_API_PATH_NH_PROTO_IP4; } else if (p == nh_proto_t::IPV6) { return FIB_API_PATH_NH_PROTO_IP6; } else if (p == nh_proto_t::ETHERNET) { return FIB_API_PATH_NH_PROTO_ETHERNET; } else if (p == nh_proto_t::MPLS) { return FIB_API_PATH_NH_PROTO_MPLS; } return FIB_API_PATH_NH_PROTO_IP4; } const nh_proto_t& from_api(vapi_enum_fib_path_nh_proto p) { switch (p) { case FIB_API_PATH_NH_PROTO_IP4: return nh_proto_t::IPV4; case FIB_API_PATH_NH_PROTO_IP6: return nh_proto_t::IPV6; case FIB_API_PATH_NH_PROTO_ETHERNET: return nh_proto_t::ETHERNET; case FIB_API_PATH_NH_PROTO_MPLS: return nh_proto_t::MPLS; case FIB_API_PATH_NH_PROTO_BIER: break; } return nh_proto_t::IPV4; } }; // VOM /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "mozilla") * End: */