summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
AgeCommit message (Collapse)AuthorFilesLines
2018-11-29GBP: l3-out subnetsNeale Ranns1-0/+1
Change-Id: Id4a20066fc5be716c61a497dfcb4d00dc1dbb28d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-26Remove unused argument from eth_identify_subint(...)Damjan Marion1-3/+0
Change-Id: I0e89fbc51f30325655c4e9d0104aceb3ead3b16f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-18add vlib_prefetch_buffer_data(...) macroDamjan Marion1-9/+8
Change-Id: Iba750a41262cc028ad0363fff78cc219e4a33538 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach9-70/+73
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-13L2 feautre bitmaps output verbose/non-verbose modeNeale Ranns4-6/+26
Change-Id: I15ff191ee8724a3354c074db590472db05e0652e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-07l2: convert l2_patch to new multiarch schemeDamjan Marion1-168/+114
Change-Id: I30487bd736407378fb5a6d313e4eef12bbb262b8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-07GBP Endpoint LearningNeale Ranns3-3/+4
Learning GBP endpoints over vxlan-gbp tunnels Change-Id: I1db9fda5a16802d9ad8b4efd4e475614f3b21502 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-11-06BD ARP entry use common API typesNeale Ranns4-42/+60
Change-Id: I29f20dbaf2c2d735faff297cee552ed648f6f61b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-06Change l2_patch from dual-loop to quad-loopYulong Pei1-18/+54
The change can save 1.1 clocks per packet on Intel Atom C3858 platform, It downgraded from 2.05e1 to 1.94e1 clocks per packet. The change can save 0.3 clocks per packet on Intel Xeon CPU E5-2699 v4 @ 2.20GHz, It downgraded from 1.26e1 to 1.23e1 clocks per packet. Change-Id: I1ede77fb592a797d86940a8abad9ca291a89f1c7 Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2018-11-02vlib: define minimum chained buffer segment sizeDamjan Marion1-3/+1
Change-Id: I9b5f7b264f9978e3dd97b2d1eb103b7d10ac3170 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-31l2fib:remove unused bucket arg in lookup functionsEyal Bari3-33/+7
Change-Id: Ib138b6e2eac47acc16e81bc88358ae7947420134 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-24L2-fwd trace show the lookup resultNeale Ranns3-48/+81
Change-Id: I09cf6ee7b4874d71f293f8f1a426d3a5e9651749 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-24L2-input/output: use feature enum type in flag update functionNeale Ranns4-4/+10
Change-Id: I1f58f441c65fbca101bee2e864bfa6ae2306b475 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-23c11 safe string handling supportDave Barach6-12/+12
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-15vnet: create L2 feature arc infrastructureAndrew Yourtchenko6-2/+727
This commit adds two new nodes in the L2 datapath in input and output direction respectively. These nodes fork the traffic into three feature arcs: ip4, ip6 and nonip, which later join to continue the usual L2 processing. The vnet_l2_feature_enable_disable() function with the same signature as vnet_feature_enable_disable() takes care of enabling the L2 datapath feature bits as needed, when the features are enabled/disabled. Thus, L2 features may use the similar plumbing as the L3 features enjoy. Change-Id: I76877b3a92d794c492bff1622bb26acba05705b2 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-11L2: BM traffic does not use UU-FWD (VPP-1445)Neale Ranns1-1/+2
Change-Id: I5495c37da2fb8ff48c4af14ccba021d64eac52b6 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-10L2-flood: no clone for 1 replicationNeale Ranns1-59/+69
Change-Id: If178dd38e7920f35588f5d821ff097168b078026 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01Fix documentation about sw_interface_set_l2_bridgeYichen Wang1-1/+1
Change-Id: I53e0e7d2cf1e3c52794830b33fa93d1582b74769 Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-09-26Modify return values of L2 bridge API handlersAlexander Chernavin1-0/+20
Change-Id: Ie6a6dde1fdc0e4fa8560682072a69876867a88d3 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns10-61/+451
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra13-30/+30
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-19L2-fib-dump: send 1 or 0 rather than flag valueNeale Ranns1-3/+3
Change-Id: I487b3b480347f60ffe3af4029adfb22b6700cea7 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-18Fix documentation for SHG in bridge domainYichen Wang1-1/+1
Change-Id: If094971cf011d09fa0daf3ff393f490e584c1151 Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-09-14Revert "L2-input: use vlib_buffer_enqueue_to_next"John Lo1-317/+239
The patch did not improve single input link performance and degrade performance with multiple input links. This reverts commit b1232555e91b286feab5667b5a22f29aa8e96626. Change-Id: Ib9336a2e0610088b9145a43cacbdadb52dabd522 Signed-off-by: John Lo <loj@cisco.com>
2018-09-13L2-FWD: use vlib_buffer_enqueue_to_next and cache prefetch fixNeale Ranns3-199/+153
before: l2-fwd ... 1.72e1 256.00 after: l2-fwd ... 1.49e1 256.00 Change-Id: I24b29b799435776abc6e60df0dd0301b74aac99b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-13L2-input: use vlib_buffer_enqueue_to_nextNeale Ranns1-239/+317
use the same trick as l2-ouput to group the processing of packets on the same interface. Change-Id: Ib2a6a1b5f362372936197f5bb2fdd0fe9439226b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-12L2-Learn: use vlib_buffer_enqueue_to_nextNeale Ranns1-195/+147
before: l2-learn ... 2.00e1 256.00 after: l2-learn ... 1.77e1 256.00 Change-Id: I22fe9ab4ec995ee22c547cfe16bf88c04838520c Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-11L2-learn; cache prefetch fixNeale Ranns2-15/+20
the header is written (STORE) the data is only read (LOAD) Change-Id: Ia3ac0c81224a0db736c329ed3e2e55b7417f08a0 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns5-6/+31
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-07L2-FIB: replace bit-fields with flagsNeale Ranns6-69/+132
Change-Id: Ic31da442a0e0477569d53b4a72627bbb25e93365 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-04l2_output:skip processing if no features are enabledEyal Bari1-2/+6
Change-Id: I7fcc082376b451c6179ec2ef58f98c931adfed27 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-09-03Deprecate old buffer replication schemeDamjan Marion1-1/+0
Change-Id: I1f54b994425c58776e1445c8d9fe142e7a644d3d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-24l2:bvi-dont aceess sup hw int for broadcastsEyal Bari1-20/+11
sup hw int is needed only for unicast validation Change-Id: I5e5753c09d1c16fdb2435b4db5628a2379fe6f96 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-23coverity: l2 arp termination dumpMohsin Kazmi1-4/+5
This patch resolves the coverity warning. Change-Id: I3f5e664b442fa9bcafd28c67283596570dc1244d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-22l2:remove unused members of input, output configsEyal Bari2-16/+7
reorder structs for less padding Change-Id: Id05123f5bac870e1c585b3aa2177d9e3a6f8d70b Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-17l2: arp termination dumpMohsin Kazmi2-0/+106
VPP-1368 Change-Id: I6373f76ba87184a91b517712eafb4ee1f5cea59e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion1-11/+5
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-10Use the bihash walk functionNeale Ranns1-126/+130
... rather than re-implementing the loop Change-Id: I20bede8403c804cbec654db9b7020a4d01e5bc18 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-09Fix L2 flooding to BVI with error return not workingJohn Lo1-4/+3
Change-Id: Id0b0e9bf1a7ba02144ec75783378352423f7a4b9 Signed-off-by: John Lo <loj@cisco.com>
2018-08-07Fix dangling reference in l2fib_scan(...)Dave Barach1-0/+8
Deleting a bihash kvp frees the bucket's backing storage when the bucket reference count reaches zero. l2fib_scan MUST check for that condition, and stop scanning the bucket if it occurs. One of the L2 FIB extended "make test" vectors caused this issue 100% of the time. Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-26L2 Flood: use the buffer clone API rather than buffer recycleNeale Ranns1-260/+168
Change-Id: I40e4efd8061369efc535f0d49b2f63668b6d1d15 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-23L2 EFP: byteswap sw_if_index, enable flag can be u8 on .apiNeale Ranns3-4/+7
Change-Id: Ib99d02e84e468726feae4c386733da405b298e4f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-15VPP-1341: fix loopback interface graph arcsDave Barach1-15/+0
Remove broken special case from l2_input.c:set_int_l2_mode(), which turns out to confuse the graph dispatch engine. The loopback TX function needs to push packets to either ethernet-input or to l2-input, based on bridge / BVI configuration. Rather than overloading a single graph arc - and making vain attempts to reconfigure it - create both arcs and use the correct one. Rewrote the loopback tx function as an idosyncratic multi-arch quad/single loop fn. Change-Id: I15b56ce641d90a11e7b3c7d23859f40e168dd7b2 Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-11bridge-domain:fix no_flood countEyal Bari1-0/+3
no_flood count was not updated on removal might couase a negative insertion index when adding new members Change-Id: I2caf2c453dfef1a9f16fb8fa2e5af42b4e653a69 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-31Improve L2FIB delete entry handling and "show l2fib" CLI optionsJohn Lo4-54/+69
Improve deletion of L2FIB MAC entry using l2fib_add_del API. If sw_if_index param specified in th API is non-zero, check that its value match that of the MAC entry to proceed with deletion. Improve "show l2fib" CLI to allow display of all entries, learned entries only, or added ovia CLI/API entries only. For added entry, show "no" under the age column to indicate entry does not age. Change-Id: I0bd2582c2b6bac268e551e4f8ca6dab2be4400ad Signed-off-by: John Lo <loj@cisco.com>
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-22/+6
Change-Id: Ibab5e27277f618ceb2d543b9d6a1a5f191e7d1db Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-24Rewrite of l2-output nodeDamjan Marion1-332/+280
Change-Id: I8cbd1eac80ae4aeb173d02786e9ccf3b4877304d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-11Periodic scan and probe of IP neighbors to maintain neighbor poolsJohn Lo1-5/+2
Scan IPv4 and IPv6 neigbor pool entries once a minute to keep them up to date. The neighbor of an entry is probed if its time-stamp is older than 1 minute. If the neighbor respond, its time-stamp will be updated. If there is no response from a neighbor, its entry will be deleted when the time-stamp of the entry become more than 4 minutes old. Static neighbor entries are not probed nor deleted. Implemented CLI and API to enable and disable priodic scan of IPv4, IPv6 or both types of IP neighbors. CLI is "ip scan-neighbor" and API is "ip_scan_neighbor_enable_disable". Other IP neighbor scan parameters can also be changed from their defaults via the CLI/API. Change-Id: Id1a0a934ace15d03db845aa698bcbb9cdabebfcd Signed-off-by: John Lo <loj@cisco.com>
2018-05-10vppinfra: use count_trailing_zeros in sparse_vec_indexDamjan Marion1-1/+1
It is much cheaper to use ctzll than to do shift,subtract and mask in likely case when we are looking for 1st set bit in the uword. Change-Id: I31954081571978878c7098bafad0c85a91755fa2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-24Support QOS_SOURCE_IP recording from L2 input node.Igor Mikhailov (imichail)1-0/+1
Some scenarios not involving ip[4,6]-input paths might benefit from IP header QOS fields recorded and applied. An example: L2 (overlay) traffic being encapsulated by VPP in VXLAN and transmitted on another (underlay) interface might want the QOS information carried over in the outer IP header. Change-Id: I4d9462c47ae6ba97680edb1e53340b17cfd7845b Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>