Compare commits

..

49 Commits

Author SHA1 Message Date
Steve Shin
d594711a5d l2-flood: fix restore vnet buffer's flags in the replication routine
When BUM packets are flooded in the l2 domain, some data should be
kept and restored for recycling in the replication routine.
If l2 bridge domain has multiple interfaces mixed with normal and
vlan tagged, the vlan tag value of the vnet buffer can be changed
while flooding the replicated packets. The change is made to store
and restore the original vlan tag in the replication logic.

Change-Id: I399cf54cd2e74cb44a2be42241bdc4fba85032c5
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 49806fe252030a4cd993f598ff65a89590d57388)
2017-11-14 03:45:24 +00:00
John Lo
5b99133cff Further fix to SHG handling for ARP/ICMPv6 from BVI in a BD
For ARP/ICMPv6 packets received from a BVI in a BD, allow flood
to all remote VTEPs via VXLAN tunnels irrespective of SHG check
for ARP request or ICMPv6 neighbor solicitation packets only.
All other packets types will flood normally as per SHG check.

Change-Id: I17b1cef9015e363fb684c2b6506ed6c4efe70bba
Signed-off-by: John Lo <loj@cisco.com>
2017-11-10 19:22:41 +00:00
JingLiuZTE
ace9fc92ca lock init
writer_lock must be inited before used.

Change-Id: Ib258aa09b3bccc4de6edba0eb75a7eec20f1a61f
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
(cherry picked from commit 4c9f2a805038a2d4f663b05a3d08ac4ee1eec3da)
2017-11-09 02:10:15 +00:00
Florin Coras
5ed8774529 vppinfra: make _vec_resize_will_expand read-only
Change-Id: Ibcc20c24f6feb2b91245b0d88830a6c730d704e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef5d5aa2f168d7964076bcf74b0da249b3e0cd23)
2017-11-08 12:23:00 +00:00
John Lo
c97b4aca0d Fix SHG handling for ARP/ICMPv6 received from BVI in a BD
This change makes sure ARP/ICMPv6 brodcast packets received from
the BVI of a BD can be flooded to all remote VTEPs via its VXLAN
tunnels irrespective of SHG setting. Similar processing was done
for unicast packets already and needs to be extpanded to ARP and
ICMPv6 broadcast packets.

Change-Id: I26ac43ecdbc81a769f742a583a156506f7e70d49
Signed-off-by: John Lo <loj@cisco.com>
2017-11-08 00:11:49 +00:00
Neale Ranns
234301f3c7 Add replicate DPO header to export list for VPPSB
Change-Id: I0b437ac5fecc81c7762d9cad0f33e977fcf3aa27
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 60c1c7c0397eaeb201f0fe300285bda4ae3ef707)
2017-11-07 12:54:22 +00:00
Filip Tehlar
5a9ecce76a LISP: fix negative mapping timeout, VPP-1043
Change-Id: Ie57b81f8743f14182813558887d84d6667c81d43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 0a62e5a3d817c3400be122c58d0311c298047580)
2017-11-06 07:49:17 +00:00
Chris Luke
e3c13e8b5b Fix for vppctl and interactive commands (VPP-1038)
- Interactive commands like "ping" read extra input from the
  input stream.
- In the case of "ping" it is simply a signal to cease the current
  operation.
- "vppctl", in non-interactive mode, will issue a "quit" immediately
  after the requested command to queue up closing of the session.
- This resulted in "ping" thinking a keypress was seen and returning
  control to the CLI; the "quit" command however is consumed by the
  keypress event handler and thus the session does not close.

- This patch reworks vppctl slightly to only issue "quit" after the
  command has completed. In particular it uses the fact that VPP issues
  NUL bytes as a surrogate prompt between output of commands to signal
  acknowledgement that the command has completed; vppctl now flags
  that the quit should be issued after the next such acknowledgement.
- Since input it still accepted, the user can still terminate the
  "ping" early, if desired.

Change-Id: I7e3dbe767f32f8e364ccb5f81799759b311585df
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-10-31 08:04:14 +00:00
Ole Troan
088f042400 VPP-1033: Python API support arbitrary sized input parameters.
Dynamically calculate the required buffer size to pack into based on
message definition. Also add input parameter length checking.

Change-Id: I7633bec596e4833bb328fbf63a65b866c7985de5
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 895b6e8b4408108a9b5cea99dcb378c3524b18b2)
2017-10-27 19:07:08 +00:00
Florin Coras
116af2170e 17.10 Release Notes
Change-Id: I0c2a8412c9946e4d18b37db907735ac0b2ea2f6e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-25 17:13:38 -07:00
Sergio Gonzalez Monroy
84568df69a dpdk/ipsec: fix crypto device placement
VPP-1036

Change-Id: I96dae6a4a40c0142d03bdf750ef23c9ce5b6edfa
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-23 15:51:40 +01:00
Sergio Gonzalez Monroy
c47652c50b dpdk/ipsec: fix digest physical address
VPP-1034

Change-Id: Ib13cf0395bc2e42d24de51347e0aeed8a137f2f2
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-19 12:35:25 +00:00
Dave Barach
fb353ce54e CSIT-844: fix binary api rx pthread heap push/pop
We need to push/pop the rx pthread's heap without affecting other
thread(s).

Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main
thread heap pointer in that slot, and set __os_thread_index
appropriately.

Don't bail out of vpp_api_test with results pending, e.g. at the end
of a vpp_api_test script. Even though vpp will eventuallly
garbage-collect them, We don't want to leave allocated reply messages
lurking in the api message allocation rings...

This patch is a manual cherry-pick from gerrit 8862

Change-Id: If3c84abe61496905432bfa36767068bad4bd243b
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-18 22:24:22 +00:00
Dave Barach
7513c8c7d2 VPP-930: add missing ntohl to send_ip6_fib_details(...)
Change-Id: I0c1671f3eaf2dad084e3ac9fb124c9ed78273f50
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-18 22:22:51 +00:00
Filip Tehlar
c64ef37c82 LISP: fix crash when sending NSH map-request message, ONE-32
Change-Id: Ief8c3d3bec116e9f884981fb52af528f98b5f6ff
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-18 07:11:40 -07:00
Dave Barach
50328c9d1e VPP-1031: Fix minor issues in clib_spinlock_unlock()
Change-Id: I20ce799c9dd57332c06003b466ee7c36169bce98
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit fa77e8fb1cc8a87a4a31792698e7200c4195583e)
2017-10-16 18:34:33 -04:00
Filip Tehlar
1999e983c5 LISP: fix map-request counters, ONE-25
Change-Id: I198f58a84c4692408f9205052af24ee22df7aeaa
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-16 07:02:04 -07:00
Florin Coras
a416ea9f02 ip: avoid arp assert if out of buffers (VPP-1030)
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d172a62365523427aebd34444736632c9a68a463)
2017-10-16 05:01:04 +00:00
Dave Barach
84db40e02e VPP-1029: Don't call clib_longjmp(...) directly from the SIGTERM handler
It's way too easy to imagine leaving a mutex or a spin-lock held in
the /vpe-api shared-memory segment, or elsewhere. Set a volatile
variable and check it in a safe place...

Change-Id: I9d91c38cffeb921143c272162d055c9c24a6c312
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 903651caf320dfdaabd20a0e6f3cd0ffc843e02f)
2017-10-16 02:33:49 +00:00
Steve Shin
b5518bedd9 dpdk: patch to support bonded interface for MLX NIC
At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr().

This DPDK patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.

Change-Id: If575f63ef31733102566610d769ddd212d74736a
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 268e64e312257b0ab36e0d5b9124cc3f2a1841a7)
2017-10-14 09:14:11 +00:00
Georgina Sheehan
abc914b7da plugins/dpdk: align memory to avoid potential segfault and false sharing
VPP-1025

Change-Id: I87bb8f38974a7be274c1b1d205f5513e7d068e48
Signed-off-by: Georgina <georgina.sheehan@intel.com>
2017-10-14 09:10:59 +00:00
Jan Gelety
5e62e58e4e Use csit rls1710 operational branch in vpp stable/1710
Change-Id: I6f7cd3e1119ab43a5512df8bcfcbcac53f2dd273
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-13 13:47:05 +00:00
Matus Fabian
ec0452133a NAT: fix delete of sessions for 1:1 NAT if 1 worker (VPP-1023)
Change-Id: I2446c646de7f227f9438dd7ef93a455ba5af0102
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-12 04:17:45 -07:00
Florin Coras
cf6c343710 tcp: update thread time when initializing connection (VPP-1022)
Change-Id: I92b0dbd2d795e3ba9050797ede2b08638e55b6f5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 11:30:38 -07:00
Neale Ranns
e0c078aa2a IP neighbour move incorrectly placed jump label
Change-Id: I19fdf13a4848306ee3841d822b832cba96c5bce5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 8edad036f1f8b920a6643a026f50a5d3aff8cbf1)
2017-10-11 16:06:37 +00:00
Florin Coras
87f1411722 tcp: do not format sb if not established (VPP-1018)
Change-Id: I011dda118f37cb31a37dda270027612d0af57ca0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 10:51:46 +00:00
Florin Coras
93b7822ddc lisp: memset to zero mapping delete args (VPP-1017)
Change-Id: If5e0fb8a1b60c7181b5b3d6dd923f52a24dda9b8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 01:28:28 -07:00
Dave Wallace
86c0446e28 make test: Copy api_post_mortem.$$ file tmp test dir for archiving. (VPP-1011)
Change-Id: I4baf89ef383dbc2f309081a6b56b13ebcb8fc2df
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit e2efd12b8418558cd8e701368287860409e8d265)
2017-10-11 08:08:55 +00:00
Steven
4ca58265a0 vhost: crash under heavy traffic condition due to memory corruption (VPP-1016)
With heavy traffic, tx code path may crash due to memory corruption

Thread 5 "vpp_wk_2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3995c700 (LWP 2505)]
0x00007ffff73675e8 in vhost_user_if_input (vm=0x7fffb5f5bf9c,
    vum=0x7ffff7882a40 <vhost_user_main>, vui=0x7fffb65570c4, qid=0,
    node=0x7fffb6577dac, mode=VNET_HW_INTERFACE_RX_MODE_POLLING)
    at /home/sluong/vpp-master/vpp/build-data/../src/vnet/devices/virtio/vhost-user.c:1610
1610		  bi_current = (vum->cpus[thread_index].rx_buffers)
	                       [vum->cpus[thread_index].rx_buffers_len];
(gdb) p vum->cpus[thread_index].rx_buffers_len
$2 = 793212607
(gdb)

Apparently, some code accidentally wrote the bad value in rx_buffers_len.
rx_buffers_len should never be greater than 1024 since that is how many buffers
we request each time.

After debugging many hours, I discovered that the memory corruption happens
in the tx code path right here on line 2176.

	  {
	    vhost_copy_t *cpy = &vum->cpus[thread_index].copy[copy_len];
	    copy_len++;
	    cpy->len = bytes_left;
	    cpy->len = (cpy->len > buffer_len) ? buffer_len : cpy->len;
	    cpy->dst = buffer_map_addr;
	    cpy->src = (uword) vlib_buffer_get_current (current_b0) +
	      current_b0->current_length - bytes_left;

(gdb) p cpy
$3 = (vhost_copy_t *) 0x7fffb554077c
(gdb) p copy_len
$4 = 1025
(gdb) p &vum->cpus[3].rx_buffers_len
$8 = (u32 *) 0x7fffb5540784

copy_len is picking up the index entry 1024 before it was incremented. copy array has only
1024 members (0 - 1023 are valid).
The assignment here in cpy surely causes memory corruption. It is only discovered later
when the memory location that it corrupted is used.

The condition for the crash is to transmit jumbo frames under heavy volume. Since ring
size is 1024, with one packet taking up one index for frame size (less 2048), it does
not cause overflow. With jumbo frames, it requires multiple indices for one packet,
it can cause the overflow under heavy traffic.

The fix is to do copy out when we have 1000 entries in the array to avoid
overflow.

Change-Id: Iefbc739b8e80470f1cf13123113f8331ffcd0eb2
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit aa5df48cb233b377b5910694e2440a16e5973864)
2017-10-11 08:08:06 +00:00
Thomas F Herbert
dfa0d20405 Deps added to Makefile must also be in spec file.
Deps are required for Fedora too.

This patch should be in version 17.10 because it
fixes breaking rpm builds in some circumstances.

JIRA: VPP-1015

Change-Id: I10807069742cdd6b09a0f34d9d05e9cae4146ec3
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-10-11 07:58:10 +00:00
Thomas F Herbert
8c5bfbcc09 Fix bug with temporary directory when building rpms.
Fixes bug introduced in commit 5349f94d.

JIRA: VPP-1014

Change-Id: Ia18f4c6f5f1124306cce790a36f6de970d186687
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-10-09 14:50:38 -04:00
Matus Fabian
dea5881815 NAT: fixed ICMP broken translation for GRE tunnel interface (VPP-1008)
Change-Id: Ie3245b96c511cc30915e70e8c881f445291a38c2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-09 10:52:39 +00:00
Dave Wallace
76c37d2d84 make test: Create link to failed test dir on timeout. (VPP-1011)
- Also change default coredump configuration from
  "coredump-size unlimited" to "full-coredump"

Change-Id: Iefedc2636f2d9696b7575b34e91dd7be49f601fa
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 981fadf928dadac683d2f629edf738aa91510af3)
2017-10-06 22:59:03 +00:00
Steven
fc7e711003 tuntap: Introduce per thread structure to suport multi-threads (VPP-1012)
https://gerrit.fd.io/r/#/c/8551/ decoupled the global variable,
namely tm->iovecs from TX and RX. However, to support multi-threads,
we have to eliminate the use of this global variable with per thread
variable. I notice that rx_buffers must also be per thread variable.
So, we introduce per thread struct to contain rx_buffers and iovecs.
Each thread will find the per thread struct with thread_index.

Change-Id: I61abf2fdace8d722525a382ac72f0d04a173b9ce
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4cd257667406d0500a81323ef91f5c7c8c902b25)
2017-10-06 13:44:01 +00:00
Pierre Pfister
67700d4116 fix buffer allocation for sparse jumbo frames in vhost
A bug was reported where a jumbo packet would stay in vhost
queue forever or until a large enough number of other packets
arrived in the queue too.

This is due to a bug in vhost input node buffer allocation.

The fix is to make sure that vhost always allocates at least
enough buffers for one single big packet. '40' is used to
account for 65kB frames.

Change-Id: I1d293028854165083e30cd798fab9d4140230b78
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-10-05 20:08:18 +00:00
Klement Sekera
a5081a7ac3 drop python3 dependency (VPP-1010)
Change-Id: I99c2c1d0d5b96f33efdb58dd3a2897a752e65349
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-05 20:06:53 +00:00
Dave Wallace
e691345d7a make test: archive failed test data with build logs. (VPP-1011)
- Fix invocation of compress_failed.sh
- Fix compress_failed to copy compressed results
  files to $WORKSPACE/archives and return failure
  exit code.

Failed test case data will be copied to logs.fd.io
and found in the archives/<make test data dir>-FAILED
directory in the build log link in the
vpp-verify-master-ubuntu1604 jenkins job page.

For example:
https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-verify-master-ubuntu1604/7353/archives/

Change-Id: Ife9a0737115e69c0a8441e3bb0133af1528d909b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 25dc16715ee3fc0a600e2f58841173249bfae501)
2017-10-05 18:42:42 +00:00
Steven
79bfbae54c memif: crash on slave mode (VPP-1006)
Crash was seen on recent image with this BT on top of the stack

(gdb) bt full
    (mif=0x7fffb6226568) at
    /vpp/build-data/../src/plugins/memif/memif.c:297
        ring = 0x0 <<<<<<<<<<
        i = 0
        j = 0
        buffer_offset = 65792
        r = 0x7fffb5e59f80
        alloc = {flags = 1, name = 0x7fffb449f965 "memif region",
          size = 4260096, numa_node = 0, addr = 0x7fff41dac000,
          fd = 11,
          log2_page_size = 12, n_pages = 1041}
        err = 0x0
        __FUNCTION__ = "memif_init_regions_and_queues"

The crash happened at this line.
      ring = memif_get_ring (mif, MEMIF_RING_S2M, i);
      ring=>head = ring->tail = 0; <=====

Please note that the crash is caused by dereferencing NULL rinng.
Put breakpoint into the function. I notice that
mif->regions[0].shm is not initialized.

(gdb) p mif->regions[0].shm
$8 = (void *) 0x0

It looks like we forgot to set shm after clib_mem_vm_ext_alloc().
Add the missing cide and the crash is fixed.

Change-Id: Ib722a6c241c77acfa8e33962106b57faa50e1ea7
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 9fefa9a697daf0e949ea7a2700ecaf2ba4d1d2cb)
2017-10-05 04:07:59 +00:00
Florin Coras
f3d627dd3c session: fill in bind handle for sock flavored api (VPP-1005)
Change-Id: I492bea060ba5c219ea75e19ebfdad79b1074e04b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-04 22:03:14 +00:00
Jon Loeliger
de6c03c0f1 Propagate duplicate IF addr add/del error up to API.
Identify and complain when the same IP prefix is assigned
to two different SW interfaces:

    vpp# set int ip address TenGigabitEthernet6/0/0 1.2.3.4/32
    vpp# set int ip address TenGigabitEthernet6/0/1 1.2.3.4/32
    set interface ip address: Prefix 1.2.3.4/32 already found on
	interface TenGigabitEthernet6/0/0

Change-Id: I1aee1b6a7ddd00d3109a53d8e1b6ce97bf45e372
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 35ffa3e8f6b032f6e324234d495f769049d8feea)
2017-10-04 18:48:52 +00:00
Neale Ranns
77d7dcba32 Set MAC address needs the HW interface index
Change-Id: I7b175d57b85e626aab00221b6dac0498aebcbeae
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d867a7cf6baffcebbf1b6e408272ec22dc55dd68)
2017-10-04 17:14:58 +00:00
Neale Ranns
8ec5f4d742 Dump of deag/lookup routes has is_drop=1 (VPP-995)
Change-Id: I58772a83e22885a9ea8a7a981d2bcb4b31a050d2
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 7b7ba572ab486d57b59c12af521175a6bcd7a52b)
2017-10-04 09:53:55 +00:00
John Lo
dab7eb87bc Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)
Change L2 learning path so it update stale timestamp in MAC entry
only if aging is enabled on the BD for the MAC entry.

Change-Id: I7babe986ceef3c030d8ef9185076c42b405f7b0f
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 5a6508d7269266b4a3ecacdd197ea3514a0c0e28)
2017-10-03 18:59:37 +00:00
Florin Coras
780af45905 ip: fix probing of already resolved destinations (VPP-998)
Change-Id: I3e6276e6829dfee5a7aeae1b4ab4c3d2f2e932a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03 14:58:12 +00:00
Eyal Bari
bd70c2f2e3 L2-FIB:add mac learn events test
fixes an issue where events were not sent if BD doesn't enable  mac aging

Change-Id: Iddc53cb5c45e560633e6c5cff2731dccfc70ad5b
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 24db0ec78fb651c4c585ebf30e07108240574045)
2017-10-02 01:30:12 +00:00
Steven
1808f3c00a cdp/lldp: punt for no buffer (VPP-997)
When making a call to vlib_packet_template_get_packet(), it
is possible to get back a NULL if the system runs out of buffer.
This can happen when there is buffer leaks. But don't crash
just because we run out of buffers, just punt.

Change-Id: Ie90ea41f3dda6e583d48959cbd18ff124158d7f8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 0ff5c563d5048991dbd02a3892dccde8305a7e30)
2017-09-29 18:23:54 +00:00
Steven
3fd57e6753 tun/tap: Bad packets sent to kernel via tun/tap interface
It was observed that under heavy traffic, VPP accidentally sent traffic
with the wrong source and destination to the tun/tap interface. Traffic
appears to be sent to the wrong direction. This problem is only
seen when worker thread is configured.

When worker thread is used, TX and RX may reside in different
core. Yet both TX and RX threads are sharing the same global variable,
namely iovecs without any mutex or memory barrier protection.
This creates a race condition when heavy traffic is blasted to VPP,
like 1000 pps.

We could create a mutex or memory barrier to ensure atomic memory access.
But why bother? It is a lot cheaper to just decouple the iovecs such
that TX and RX have their own iovecs.

Change-Id: I86a5a19bd8de54d54f32e1f0845bae6a81bbf686
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4ff586d1c6fc5c40e1548cd6f221a8a7f3ad033b)
2017-09-28 02:40:49 +00:00
Chris Luke
d84f2ef54a General documentation updates
- We now have several developer-focused docs, so create an index page
  for them.
- Rework several docs to fit into the index structure.
- Experiment with code highlighting; tweak the CSS slightly to make
  it slightly nicer to look at.

Change-Id: I4185a18f84fa0764745ca7a3148276064a3155c6
Signed-off-by: Chris Luke <chrisy@flirble.org>
(cherry picked from commit 64ebb5ff1338140d94c7f9ee72138fe84d89de2e)
2017-09-28 01:47:14 +00:00
Florin Coras
7ea28045aa 17.10 change default branch in gitreview
Change-Id: Icd2cc7e328719b3964dfe344caf8ed9858283661
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-27 14:11:15 -07:00
4780 changed files with 306350 additions and 1032930 deletions

View File

@ -1,48 +1,38 @@
# Minimal clang-format version is 11
BasedOnStyle: GNU
UseTab: Always
SpaceAfterCStyleCast: true
---
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BinPackParameters: true
BreakBeforeBraces: GNU
ColumnLimit: 79
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpacesBeforeTrailingComments: 1
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
Cpp11BracedListStyle: true
Standard: Cpp11
SortIncludes: false
AlignConsecutiveMacros: true
BreakBeforeTernaryOperators: false
BreakBeforeBinaryOperators: None
ContinuationIndentWidth: 2
ForEachMacros:
- 'clib_bitmap_foreach'
- 'pool_foreach'
- 'pool_foreach_index'
- 'pool_foreach_pointer'
- 'vec_foreach'
- 'vec_foreach_backwards'
- 'vec_foreach_index'
- 'vec_foreach_index_backwards'
- 'vec_foreach_pointer'
- 'vlib_foreach_rx_tx'
- 'foreach_int'
- 'foreach_pointer'
- 'foreach_vlib_main'
- 'foreach_set_bit_index'
- 'foreach_vlib_frame_bitmap_set_bit_index'
- 'FOREACH_ARRAY_ELT'
- 'RTE_ETH_FOREACH_DEV'
- 'foreach_vnet_dev_rx_queue_runtime'
- 'foreach_vnet_dev_counter'
- 'foreach_vnet_dev_port_rx_queue'
- 'foreach_vnet_dev_port_tx_queue'
- 'foreach_vnet_dev_port'
- 'foreach_vnet_dev_args'
- 'foreach_vnet_dev_port_args'
StatementMacros:
- 'CLIB_MULTIARCH_FN'
- 'VLIB_NODE_FN'
- 'VNET_DEV_NODE_FN'
- 'VNET_DEVICE_CLASS_TX_FN'
- '__clib_section'
- '__clib_aligned'
WhitespaceSensitiveMacros:
- 'WARN_ON'
- 'WARN_OFF'
IndentWidth: 2
TabWidth: 4
UseTab: Never
IndentFunctionDeclarationAfterType: false
ContinuationIndentWidth: 4
...

View File

@ -1,8 +0,0 @@
Checks: "-*,\
misc-*,\
bugprone-*,\
-bugprone-reserved-identifier,\
-performance-*,\
clang-analyzer-*,\
-clang-analyzer-valist.Uninitialized,\
"

View File

@ -1,48 +0,0 @@
# <feature-name>: <subject>
# |<---- Using a maximum of 50 characters ---->|
#
# Explain why this change is being made
# |<---- Try to limit each line to a maximum of 72 characters ---->|
# Ticket: <JIRA #id>
# Type: <type>
# Fixes: <offending-git-commit-id>
# Change-Id: <sha1>
# Signed-off-by: <email>
#
#
# --- COMMIT END ---
#
# Type can be
# feature (new feature)
# fix (bug fix)
# refactor (refactoring production code)
# improvement (minor improvements in existing feature)
# style (formatting, missing semi colons, etc; no code change)
# docs (changes to documentation)
# test (adding or refactoring tests; no production code change)
# make (change the build process, or tools, or infrastructure)
#
# feature-name: Is the name of the VPP feature, plugin or directory.
# Commits across multiple components should be split.
# E.g. ip, fib, nat, acl, host, api
#
# Fixes: If type is fix refers to the original commit (optional).
# Ticket: Refers to JIRA ticket if it exists (optional).
#
# --------------------
# Remember to:
# Lowercase the subject line.
# Use the imperative mood in the subject line.
# Not end the subject line with a period.
# Separate subject from body with a blank line.
# Use the body to explain what and why vs. how.
# Use multiple lines with "-" for bullet points in body.
# --------------------
# Usage:
#
# The template is automatically added to the current repository by
# make install-dep.
# (git config commit.template .git_commit_template.txt)
#
# --------------------

View File

@ -1,21 +0,0 @@
---
name: Close Pull Request
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
# Optional. Post a issue comment just before closing a pull request.
comment: "Thank you so much for your interest! VPP takes patches at https://gerrit.fd.io/
```
git clone https://gerrit.fd.io/r/vpp
```
Using [git review](https://www.mediawiki.org/wiki/Gerrit/git-review) to contribute patches is recommended"

78
.gitignore vendored
View File

@ -8,35 +8,38 @@
/build-root/dpdk-includes/
/build-root/packages-vpp/
/build-root/path_setup
/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/deb/.pybuild/
/build-root/*.buildinfo
/build-root/*.deb
/build-root/*.rpm
/build-root/*.tar.xz
/build-root/*.changes
/build-root/rpmbuild/
/build-root/test-coverage/
/build-root/test/
/build-root/test-doc/
/build-root/test-cov/
/build-root/python/
/build-root/vapi_test/
/build-config.mk
/build/external/*.tar.gz
/build/external/*.tar.xz
/build/external/vpp-*
/build/external/dpdk_mlx_default.sh
/build/external/downloads/
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/dpdk/vpp-dpdk*.deb
/dpdk/vpp-dpdk*.changes
/path_setup
/tools/
# start autotools ignore
autom4te.cache/
config/
Makefile
Makefile.in
aclocal.m4
app.info
compile
config.h
config.h.in
config.log
config.guess
config.sub
config.status
configure
configure.scan
coverage_report
depcomp
@ -50,7 +53,7 @@ ylwrap
test-driver
*.iml
.deps.ok
.bootstrap.ok
.settings
.autotools
# stop autotools ignore
@ -60,9 +63,7 @@ test-driver
.idea/
.project
.cproject
.pydevproject
.vscode/
cmake-build*/
# cscope and ctags
/cscope.*
@ -77,12 +78,6 @@ GTAGS
/build-root/docs
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
/docs/venv
# language servers
compile_commands.json
.clangd
.cache
# indent backup files
*.BAK
@ -94,46 +89,11 @@ compile_commands.json
/src/vpp-api/python/build
/src/vpp-api/python/dist
/src/vpp-api/python/vpp_papi.egg-info
/src/vpp_api/.tox
/src/vpp_api/.stestr
/src/vpp-api/python/vpp_papi/memclnt.py
/src/vpp-api/python/vpp_papi/vpe.py
# Build files in the test directory
/test/*.ok
# vppctl command list
/src/scripts/vppctl-cmd-list
# No core files
**/core
# extra scripts config
/extras/scripts/.config/
# extras gomemif build files
/extras/gomemif/bazel*
# vpptop build files
/extras/vpptop/build/*
# debian packaging
.pc
# No test log files
**/test-run-*-*-*
# host stack test framework
/extras/hs-test/vpp-data
/extras/hs-test/hs-test
/extras/hs-test/http_server
/extras/hs-test/.build.ok
/extras/hs-test/summary/
# ./configure
/CMakeFiles
/bin
/lib
/.ninja_deps
/.ninja_log
/.cmake
/CMakeCache.txt
/build.ninja
/cmake_install.cmake
/startup.conf
/startup.vpp

View File

@ -2,4 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2406
defaultbranch=stable/1710

105
INFO.yaml
View File

@ -1,105 +0,0 @@
---
project: 'vpp'
project_creation_date: '2015-12-08'
project_category: ''
lifecycle_state: 'Incubation'
project_lead: &vpp_ptl
name: 'Damjan Marion'
email: 'dmarion@me.com'
id: 'dmarion'
company: 'cisco'
timezone: 'Europe/Zagreb'
primary_contact: *vpp_ptl
issue_tracking:
type: 'jira'
url: 'https://jira.fd.io/projects/vpp'
key: 'VPP'
mailing_list:
type: 'groups.io'
url: 'https://lists.fd.io/g/vpp-dev'
tag: '<[sub-project_name]>'
realtime_discussion:
type: 'irc'
server: 'freenode.net'
channel: 'fdio-vpp'
meetings:
- type: 'zoom'
agenda: 'n/a'
url: 'https://wiki.fd.io/view/VPP/Meeting'
server: 'n/a'
channel: 'fdio-vpp'
repeats: 'weekly'
time: '08:00 PT'
repositories:
- 'vpp'
committers:
- <<: *vpp_ptl
- name: 'Dave Barach'
company: 'cisco'
email: 'openvpp@barachs.net'
id: 'dbarach'
- name: 'Florin Coras'
company: 'cisco'
email: 'florin.coras@gmail.com'
id: 'florin.coras'
- name: 'Benoit Ganne'
company: 'cisco'
email: 'bganne@cisco.com'
id: 'bganne'
- name: 'John Lo'
company: 'cisco'
email: 'loj@cisco.com'
id: 'lojohn'
- name: 'Chris Luke'
company: 'comcast'
email: 'chris_luke@comcast.com'
id: 'chrisluke'
- name: 'Neale Ranns'
company: 'cisco'
email: 'nranns@cisco.com'
id: 'nranns'
- name: 'Matthew Smith'
company: 'netgate'
email: 'mgsmith@netgate.com'
id: 'mgsmith'
- name: 'Ole Trøan'
company: 'employees'
email: 'otroan@employees.org'
id: 'otroan'
- name: 'Paul Vinciguerra'
company: 'vinciconsulting'
email: 'pvinci@vinciconsulting.com'
id: 'pvinci'
- name: 'Dave Wallace'
company: 'gmail'
email: 'dwallacelf@gmail.com'
id: 'dwallacelf'
- name: 'Ed Warnicke'
company: 'gmail'
email: 'hagbard@gmail.com'
id: 'hagbard'
- name: 'Andrew Yourtchenko'
company: 'cisco'
email: 'ayourtch@cisco.com'
id: 'ayourtch'
- name: 'Fan Zhang'
company: 'intel'
email: 'roy.fan.zhang@intel.com'
id: 'royzhang1980'
- name: 'Mohammed HAWARI'
company: 'cisco'
email: 'momohawari@gmail.com'
id: 'momohawari'
tsc:
# yamllint disable rule:line-length
approval: 'https://wiki.fd.io/view/TSC/Meeting_Minutes'
changes:
- type: 'Promotion'
name: 'Damjan Marion'
link: 'https://lists.fd.io/g/vpp-dev/message/17521'
- type: 'Addition'
name: 'Fan Zhang'
link: 'https://lists.fd.io/g/vpp-dev/message/19068'
- type: 'Approval'
name: 'Mohammed HAWARI'
link: 'https://ircbot.wl.linuxfoundation.org/meetings/fdio-meeting/2023/fd_io_tsc/fdio-meeting-fd_io_tsc.2023-06-01-15.00.html'

File diff suppressed because it is too large Load Diff

751
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -19,32 +19,33 @@ For more information on VPP and its features please visit the
## Changes
Details of the changes leading up to this version of VPP can be found under
doc/releasenotes.
@ref release_notes.
## Directory layout
| Directory name | Description |
| ---------------------- | ------------------------------------------- |
| build-data | Build metadata |
| build-root | Build output directory |
| docs | Sphinx Documentation |
| dpdk | DPDK patches and build infrastructure |
| extras/libmemif | Client library for memif |
| src/examples | VPP example code |
| src/plugins | VPP bundled plugins directory |
| src/svm | Shared virtual memory allocation library |
| src/tests | Standalone tests (not part of test harness) |
| src/vat | VPP API test program |
| src/vlib | VPP application library |
| src/vlibapi | VPP API library |
| src/vlibmemory | VPP Memory management |
| src/vnet | VPP networking |
| src/vpp | VPP application |
| src/vpp-api | VPP application API bindings |
| src/vppinfra | VPP core library |
| src/vpp/api | Not-yet-relocated API bindings |
| test | Unit tests and Python test harness |
Directory name | Description
---------------------- | -------------------------------------------
build-data | Build metadata
build-root | Build output directory
doxygen | Documentation generator configuration
dpdk | DPDK patches and build infrastructure
@ref extras/libmemif | Client library for memif
@ref src/examples | VPP example code
@ref src/plugins | VPP bundled plugins directory
@ref src/svm | Shared virtual memory allocation library
src/tests | Standalone tests (not part of test harness)
src/vat | VPP API test program
@ref src/vlib | VPP application library
@ref src/vlibapi | VPP API library
@ref src/vlibmemory | VPP Memory management
@ref src/vlibsocket | VPP Socket I/O
@ref src/vnet | VPP networking
@ref src/vpp | VPP application
@ref src/vpp-api | VPP application API bindings
@ref src/vppinfra | VPP core library
@ref src/vpp/api | Not-yet-relocated API bindings
test | Unit tests and Python test harness
## Getting started
@ -99,3 +100,8 @@ end-user-oriented information. Also see @subpage dev_doc for developer notes.
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
advanced building strategies and other development notes.
## Test Framework
There is PyDoc generated documentation available for the VPP test framework.
See @ref test_framework_doc for details.

726
RELEASE.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
# Copyright (c) 2015 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.

View File

@ -0,0 +1,32 @@
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
DPDK_DEBUG=n
endif
DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
ifneq ($(DPDK_PLATFORM_TARGET),)
DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
endif
DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
endif
dpdk_configure = echo
dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install

View File

@ -1,45 +0,0 @@
# Copyright (c) 2015 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.
external_source = build
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
DPDK_DEBUG=n
endif
DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
BUILD_DIR=$(PACKAGE_BUILD_DIR) \
INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd))
ifneq ($(DPDK_MLX4_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y
endif
ifeq ("$(V)","1")
DPDK_MAKE_ARGS += DPDK_VERBOSE=1
endif
external_configure = echo
external_build = echo
external_install = $(MAKE) $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install

View File

@ -1 +0,0 @@
# empty file

View File

@ -0,0 +1,3 @@
g2_source = src
g2_configure_args = --disable-vlib --disable-svm --enable-g2

View File

@ -1,16 +1,3 @@
# Copyright (c) 2015 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.
gmod_configure_depend = vpp-install
gmod_configure_args = --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/ganglia

View File

@ -1,35 +0,0 @@
# Copyright (c) 2017-2018 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.
libmemif_source = extras
libmemif_configure_subdir = libmemif
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
else
CMAKE?=cmake
endif
libmemif_cmake_args ?=
libmemif_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
libmemif_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
libmemif_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
libmemif_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
libmemif_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(libmemif_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)
libmemif_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
libmemif_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install

View File

@ -0,0 +1,4 @@
perftool_source = src
perftool_configure_args = --disable-vlib --disable-svm --enable-perftool

View File

@ -1,40 +1,5 @@
# Copyright (c) 2015 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.
sample-plugin_source = src
sample-plugin_configure_subdir = examples/sample-plugin
sample-plugin_configure_depend = vpp-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
sample-plugin_PATH = $(call package_install_dir_fn,vpp)/bin
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
else
CMAKE?=cmake
endif
sample-plugin_cmake_args ?=
sample-plugin_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
sample-plugin_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
sample-plugin_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
sample-plugin_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
sample-plugin_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(sample-plugin_cmake_args) \
$(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)
sample-plugin_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
sample-plugin_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install

View File

@ -1,12 +0,0 @@
# Copyright (c) 2015 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.

View File

@ -0,0 +1 @@
#

View File

@ -1,59 +1,35 @@
# Copyright (c) 2015 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.
vpp_source = src
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
vpp_configure_args = --enable-dpdk-shared
else
CMAKE?=cmake
vpp_configure_args =
endif
vpp_cmake_prefix_path = /opt/vpp/external/$(shell uname -m)
vpp_cmake_prefix_path += $(PACKAGE_INSTALL_DIR)external
vpp_cmake_prefix_path := $(subst $() $(),;,$(vpp_cmake_prefix_path))
# Platform dependent configure flags
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
vpp_cmake_args ?=
vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
vpp_cmake_args += -DCMAKE_BUILD_TYPE="$($(TAG)_TAG_BUILD_TYPE)"
vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
ifeq ("$(V)","1")
vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
vpp_CPPFLAGS =
vpp_LDFLAGS =
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vpp_configure_depend += dpdk-install
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
vpp_CPPFLAGS += -I/usr/include/dpdk
endif
ifneq ($(VPP_PLATFORM),)
vpp_cmake_args += -DVPP_PLATFORM="$(VPP_PLATFORM)"
ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
vpp_configure_args += --with-dpdk-mlx5-pmd
endif
ifneq ($(VPP_EXCLUDED_PLUGINS),)
vpp_cmake_args += -DVPP_EXCLUDED_PLUGINS="$(VPP_EXCLUDED_PLUGINS)"
endif
ifneq (${SOURCE_DATE_EPOCH}),)
vpp_cmake_args += -DVPP_SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
else
vpp_configure_args += --disable-dpdk-plugin
endif
ifneq ($(VPP_EXTRA_CMAKE_ARGS),)
vpp_cmake_args += $(VPP_EXTRA_CMAKE_ARGS)
ifeq ($($(PLATFORM)_enable_tests),yes)
vpp_configure_args += --enable-tests
endif
vpp_configure_depend += external-install
vpp_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'
vpp-package-deb: vpp-install
@$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vpp -- pkg-deb
@find $(PACKAGE_BUILD_DIR) \
-maxdepth 2 \
\( -name '*.changes' -o -name '*.deb' -o -name '*.buildinfo' \) \
-exec mv {} $(CURDIR) \;

View File

@ -15,3 +15,82 @@
$(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \
$(eval -include $(d)/platforms/*.mk))
.PHONY: install-deb
install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
@$(BUILD_ENV) ; \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) \
$(patsubst %,%-install, \
$(ROOT_PACKAGES)) || exit 1; \
\
: generate file manifests ; \
find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
| sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
> deb/debian/vpp.install ; \
\
: core api definitions ; \
./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp.install ; \
\
: need symbolic links in the lib pkg ; \
find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
-print | egrep -e '*\.so\.*\.*\.*' \
| grep -v plugins\/ \
| sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:' \
> deb/debian/vpp-lib.install ; \
\
: vnet api definitions ; \
./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-lib.install ; \
\
: dev package ; \
./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dev.install ; \
\
: plugins package ; \
./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-plugins.install ; \
\
: vpp-api-lua package ; \
./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-lua.install ; \
\
: vpp-api-java package ; \
./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-java.install ; \
\
: bin package needs startup config ; \
echo ../../src/vpp/conf/startup.conf /etc/vpp \
>> deb/debian/vpp.install ; \
\
: and sysctl config ; \
echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
>> deb/debian/vpp.install ; \
\
: bash completion for vppctl ; \
echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
>> deb/debian/vpp.install ; \
\
: move dictionary of vppctl commands ; \
echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
>> deb/debian/vpp.install ; \
\
: dev package needs a couple of additions ; \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
>> deb/debian/vpp-dev.install; \
done; \
\
: generate changelog; \
./scripts/generate-deb-changelog \
\
: Go fabricate the actual Debian packages ; \
( \
cd deb && \
dpkg-buildpackage -us -uc -b \
)

View File

@ -0,0 +1,45 @@
# 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.
# vector packet processor
arm32_arch = native
arm32_native_tools = vppapigen
arm32_uses_dpdk = yes
arm32_uses_openssl = no
arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
jvpp gmod
vlib_configure_args_arm32 = --with-pre-data=128
vnet_configure_args_arm32 = --with-dpdk --without-libssl
vpp_configure_args_arm32 = --with-dpdk --without-libssl
arm32_dpdk_arch = "armv7a"
arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
CONFIG_RTE_EAL_IGB_UIO=y \
CONFIG_RTE_LIBRTE_E1000_PMD=y \
CONFIG_RTE_MAX_LCORE=4 \
CONFIG_RTE_MAX_NUMA_NODES=1"
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror
arm32_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror

View File

@ -0,0 +1,66 @@
# Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
# 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.
# Configuration for NXP DPAA2 ARM64 based platform
dpaa2_arch = aarch64
dpaa2_os = linux-gnu
dpaa2_target = aarch64-linux-gnu
dpaa2_mtune = cortex-A57
dpaa2_march = "armv8-a+fp+simd+crc+crypto"
dpaa2_cross_ldflags = \
-Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
-Wl,-rpath=/usr/lib64
dpaa2_native_tools = vppapigen
dpaa2_root_packages = vpp vlib vlib-api vnet svm vpp-api-test
# DPDK configuration parameters
dpaa2_uses_dpdk = yes
# Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
# installed DPDK libraries and headers.
ifeq ($(PLATFORM),dpaa2)
ifneq ($(DPDK_PATH),)
dpaa2_uses_dpdk = yes
dpaa2_uses_external_dpdk = yes
dpaa2_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
dpaa2_dpdk_lib_dir = $(DPDK_PATH)/lib
else
# compile using internal DPDK + NXP DPAA2 Driver patch
dpaa2_dpdk_arch = "armv8a"
dpaa2_dpdk_target = "arm64-dpaa2-linuxapp-gcc"
dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
endif
endif
vpp_configure_args_dpaa2 = --with-dpdk --without-libssl \
--with-sysroot=$(SYSROOT)
vnet_configure_args_dpaa2 = --with-dpdk --without-libssl \
--with-sysroot=$(SYSROOT)
# Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
vlib_configure_args_dpaa2 = --with-pre-data=256
dpaa2_debug_TAG_CFLAGS = -g -O2 -DCLIB_DEBUG -fPIC -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_debug_TAG_LDFLAGS = -g -O2 -DCLIB_DEBUG -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
# Use -rdynamic is for stack tracing, O0 for debugging....default is O2
# Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
dpaa2_TAG_CFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_TAG_LDFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6

View File

@ -0,0 +1,34 @@
# Qemu "p-series" powerpc64
qppc_os = linux-gnu
qppc_cross_ldflags = \
-Wl,--dynamic-linker=/lib64/ld64.so.1
qppc_arch = powerpc
qppc_root_packages = vppinfra vlib vlib-api vnet svm \
vpp vpp-api-test
vnet_configure_args_qppc = \
--without-libssl
vpp_configure_args_qppc = \
--without-libssl
vlib_configure_args_qppc = --with-pre-data=128
qppc_march=powerpc64
# native tool chain additions for this platform
qppc_native_tools = vppapigen
qppc_uses_dpdk = no
qppc_debug_TAG_CFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_debug_TAG_LDFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_TAG_CFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
qppc_TAG_LDFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec

View File

@ -16,11 +16,62 @@
MACHINE=$(shell uname -m)
vpp_arch = native
ifeq ($(MACHINE),$(filter $(MACHINE),x86_64 i686))
vpp_march = corei7 # Nehalem Instruction set
vpp_mtune = corei7-avx # Optimize for Sandy Bridge
else ifeq ($(MACHINE),aarch64)
ifeq ($(TARGET_PLATFORM),thunderx)
vpp_march = armv8-a+crc
vpp_mtune = thunderx
vpp_dpdk_target = arm64-thunderx-linuxapp-gcc
else
vpp_march = native
vpp_mtune = generic
endif
endif
vpp_native_tools = vppapigen
vpp_uses_dpdk = yes
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
vpp_root_packages = vpp
vpp_debug_TAG_BUILD_TYPE = debug
vpp_TAG_BUILD_TYPE = release
vpp_clang_TAG_BUILD_TYPE = release
vpp_gcov_TAG_BUILD_TYPE = gcov
vpp_coverity_TAG_BUILD_TYPE = coverity
# DPDK configuration parameters
# vpp_uses_dpdk_mlx5_pmd = yes
# vpp_uses_external_dpdk = yes
# vpp_dpdk_inc_dir = /usr/include/dpdk
# vpp_dpdk_lib_dir = /usr/lib
# vpp_dpdk_shared_lib = yes
# load balancer plugin is not portable on 32 bit platform
ifeq ($(MACHINE),i686)
vpp_configure_args_vpp = --disable-lb-plugin
endif
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
-fPIC -Werror -fprofile-arcs -ftest-coverage
vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
-fPIC -Werror -coverage
vpp_coverity_TAG_CFLAGS = -g -O2 -march=$(MARCH) -mtune=$(MTUNE) \
-fPIC -Werror -D__COVERITY__
vpp_coverity_TAG_LDFLAGS = -g -O2 -march=$(MARCH) -mtune=$(MTUNE) \
-fPIC -Werror -D__COVERITY__

View File

@ -39,7 +39,7 @@
######################################################################
# Scripts require non-POSIX parts of bash
SHELL := $(shell which bash)
SHELL := /bin/bash
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
@ -190,7 +190,7 @@ ARCH_TARGET_tmp = $(call ifdef_fn,$(ARCH)_target,$(ARCH)-$(OS))
TARGET = $(call ifdef_fn,$(PLATFORM)_target,$(ARCH_TARGET_tmp))
TARGET_PREFIX = $(if $(not_native),$(TARGET)-,)
# CPU microarchitecture detection.
# CPU microarchitecture detection.
# Either set <platform>_march in build-data/platforms/<platform>.mk,
# or detect and use the build-host instruction set
@ -236,18 +236,16 @@ PACKAGE = $*
# Build/install tags. This lets you have different CFLAGS/CPPFLAGS/LDFLAGS
# for e.g. debug versus optimized compiles. Each tag has its own set of build/install
# areas.
TAG =
TAG =
TAG_PREFIX = $(if $(TAG),$(TAG)-)
# yes you need the space
tag_var_with_added_space_fn = $(if $($(TAG)_TAG_$(1)),$($(TAG)_TAG_$(1)) )
# TAG=debug for debugging
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
BUILD_PREFIX_package = build-$(TAG_PREFIX)
@ -260,7 +258,13 @@ tool_or_package_fn = $(if $(is_build_tool),tool,package)
# Directory where packages are built & installed
BUILD_DIR = $(MU_BUILD_ROOT_DIR)/$(BUILD_PREFIX_$(call tool_or_package_fn))$(ARCH)
## BURT
# we will deprecate INSTALL_DIR shortly for DFLT_INSTALL_DIR
INSTALL_DIR = $(MU_BUILD_ROOT_DIR)/$(INSTALL_PREFIX)$(ARCH)
# DFLT_INSTALL_DIR used in platforms.mk for $(PLATFORM)_DESTDIR_BASE
DFLT_INSTALL_DIR := $(MU_BUILD_ROOT_DIR)/$(INSTALL_PREFIX)$(ARCH)
## BURT
PLATFORM_IMAGE_DIR = $(MU_BUILD_ROOT_DIR)/$(IMAGES_PREFIX)$(PLATFORM)
@ -309,18 +313,12 @@ endif
# Always prefer our own tools to those installed on system.
# Note: ccache-bin must be before tool bin.
#
# Removed LD_LIBRARY_PATH from BUILD_ENV (drb, 10/31/17):
# export LD_LIBRARY_PATH=$(TOOL_INSTALL_DIR)/lib64:$(TOOL_INSTALL_DIR)/lib
# Reported to cause trouble. Only of historical interest, since we no longer
# build a full tool chain from source.
BUILD_ENV = \
export CCACHE_DIR=$(CCACHE_DIR) ; \
export PATH=$(wildcard /usr/lib*/ccache):$(TOOL_INSTALL_DIR)/bin:$${PATH} ; \
$(if $(call configure_var_fn,PATH), export PATH=$${PATH}:$(call configure_var_fn,PATH);,) \
export PATH=$(TOOL_INSTALL_DIR)/ccache-bin:$(TOOL_INSTALL_DIR)/bin:$${PATH} ; \
export PATH="`echo $${PATH} | sed -e s/[.]://`" ; \
$(if $(not_native),export CONFIG_SITE=$(MU_BUILD_ROOT_DIR)/config.site ;,) \
export LD_LIBRARY_PATH=$(TOOL_INSTALL_DIR)/lib64:$(TOOL_INSTALL_DIR)/lib ; \
set -eu$(BUILD_DEBUG) ; \
set -o pipefail
@ -333,6 +331,16 @@ package_dir_fn = \
package_mk_fn = $(call package_dir_fn,$(1))/$(1).mk
### BURT
#next version
#pkgPhaseDependMacro = $(foreach x,configure build install, \
$(eval $(1)_$(x)_depend := $($(1)_depend:%=%-$(x))))
#version equivalent to original code
pkgPhaseDependMacro = $(eval $(1)_configure_depend := $($(1)_depend:%=%-install))
### BURT
# Pick up built-root/pre-package-include.mk for all source directories
$(foreach d,$(SOURCE_PATH_BUILD_ROOT_DIRS), \
$(eval -include $(d)/pre-package-include.mk))
@ -365,10 +373,10 @@ NATIVE_TOOLS_$(IS_LINUX) += $(NATIVE_TOOLS_LINUX)
CROSS_TOOLS_$(IS_LINUX) += glibc gcc
# must be first for bootstrapping
NATIVE_TOOLS = findutils $(MAKE)
NATIVE_TOOLS = findutils make
# basic tools needed for build system
NATIVE_TOOLS += git automake autoconf libtool texinfo tar
NATIVE_TOOLS += git automake autoconf libtool texinfo bison flex tar
# needed to compile gcc
NATIVE_TOOLS += mpfr gmp mpc
@ -416,7 +424,7 @@ find_filter += -and -not -path '*/.mu_build_*'
find_newer_filtered_fn = \
(! -f $(1) \
|| -n $(call find_newer_files_fn,$(1),$(3)) \
|| -n "`find -L $(2) \
|| -n "`find -H $(2) \
-type f \
-and -newer $(1) \
-and \( $(4) \) \
@ -540,8 +548,6 @@ configure_ldflags_fn = \
CONFIGURE_ENV = \
$(if $(call configure_var_fn,CPPFLAGS), \
CPPFLAGS="$(CPPFLAGS) $(call configure_var_fn,CPPFLAGS)") \
$(if $(call configure_var_fn,CXXFLAGS), \
CXXFLAGS="$(CXXFLAGS) $(call configure_var_fn,CXXFLAGS)") \
$(if $(call configure_var_fn,CFLAGS), \
CFLAGS="$(CFLAGS) $(call configure_var_fn,CFLAGS)") \
$(if $(call configure_var_fn,CCASFLAGS), \
@ -550,6 +556,7 @@ CONFIGURE_ENV = \
LDFLAGS="$(LDFLAGS) $(call configure_ldflags_fn)") \
$(if $($(PACKAGE)_configure_env),$($(PACKAGE)_configure_env))
### BURT
# only partially used now (used in a few .mk files)
ifeq ($(is_build_tool),yes)
prefix = $(PACKAGE_INSTALL_DIR)
@ -567,6 +574,10 @@ libexecdir = $($(PLATFORM)_LIBEXECDIR)
destdirMacro = $($(PLATFORM)_DESTDIR_BASE)$(ppdMacro)
DESTDIR = $(call destdirMacro,$(PACKAGE))
endif
### BURT
### dbarach
image_extra_dependencies = $($(PLATFORM)_image_extra_dependencies)
### dbarach
configure_package_gnu = \
s=$(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR) ; \
@ -614,10 +625,10 @@ check_platform = \
-a ! -x "`which 2> /dev/null $${target_gcc}`" ] ; then \
$(call build_msg_fn, \
No cross-compiler found for platform $(PLATFORM) target $(TARGET); \
try $(MAKE) PLATFORM=$(PLATFORM) install-tools) ; \
try make PLATFORM=$(PLATFORM) install-tools) ; \
exit 1 ; \
fi
configure_check_timestamp = \
@$(BUILD_ENV) ; \
$(check_platform) ; \
@ -625,10 +636,6 @@ configure_check_timestamp = \
mkdir -p $(PACKAGE_INSTALL_DIR) ; \
conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \
dirs="$(call package_mk_fn,$(PACKAGE)) \
$(SOURCE_PATH_BUILD_DATA_DIRS)/platforms/$(PLATFORM).mk \
$(wildcard $(call find_source_fn,$(PACKAGE_SOURCE))/cmake) \
$(shell find $(call find_source_fn,$(PACKAGE_SOURCE)) \
-name CMakeLists.txt) \
$(wildcard $(call find_source_fn, \
$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)/configure) \
$(MU_BUILD_ROOT_DIR)/config.site" ; \
@ -650,20 +657,11 @@ configure_check_timestamp = \
# /proc/cpuinfo does not exist on platforms without a /proc and on some
# platforms, notably inside containers, it has no content. In those cases
# we assume there's 1 processor; we use 2*ncpu for the -j option.
#
# On FreeBSD we can call nproc to get the number of processors.
#
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
# for file presence and content; for now this will have to do.
ifndef MAKE_PARALLEL_JOBS
ifeq ($(shell uname), FreeBSD)
MAKE_PARALLEL_JOBS = $(shell nproc)
else
MAKE_PARALLEL_JOBS = $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
$(shell grep -c ^processor /proc/cpuinfo), 2)
endif # FreeBSD
endif
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,-j $(MAKE_PARALLEL_JOBS))
MAKE_PARALLEL_JOBS = -j $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
$(shell expr 2 '*' $$(grep -c ^processor /proc/cpuinfo)), 2)
MAKE_PARALLEL_FLAGS = $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
# Make command shorthand for packages & tools.
PACKAGE_MAKE = \
@ -772,7 +770,7 @@ find_source_for_package = \
exit 1; \
fi ; \
$(call build_msg_fn,Fix file dates in $${g}/$(PACKAGE_SOURCE)) ; \
: the timestamp-adjustment script used to be invoked at this point ; \
(cd $${s} ; $(MU_BUILD_ROOT_DIR)/autowank --touch) ; \
fi ; \
s=`cd $${s} && pwd` ; \
$(call build_msg_fn,Source found in $${s})
@ -807,10 +805,10 @@ pull-all:
$(call build_msg_fn,Git pull build tools) ; \
$(call tool_make_target_fn,pull-all) ; \
$(call build_msg_fn,Git pull packages for platform $(PLATFORM)) ; \
$(MAKE) PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
make PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
.PHONY: %-diff
%-diff:
%-diff:
@$(BUILD_ENV) ; \
d=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
$(call build_msg_fn,Git diff $(PACKAGE)) ; \
@ -819,12 +817,12 @@ pull-all:
else \
$(call build_msg_fn, $(PACKAGE) not a git directory) ; \
fi
# generate diffs for everything in source path
.PHONY: diff-all
diff-all:
diff-all:
@$(BUILD_ENV) ; \
$(call build_msg_fn,Generate diffs) ; \
for r in $(ABSOLUTE_SOURCE_PATH); do \
@ -922,7 +920,7 @@ basic_system_image_install = \
mkdir -p bin lib mnt proc root sbin sys tmp etc ; \
mkdir -p usr usr/{bin,sbin} usr/lib ; \
mkdir -p var var/{lib,lock,log,run,tmp} ; \
mkdir -p var/lock/subsys var/lib/urandom
mkdir -p var/lock/subsys var/lib/urandom
.PHONY: basic_system-image_install
basic_system-image_install: # linuxrc-install
@ -932,7 +930,7 @@ basic_system-image_install: # linuxrc-install
ROOT_PACKAGES = $(if $($(PLATFORM)_root_packages),$($(PLATFORM)_root_packages),$(default_root_packages))
.PHONY: install-packages
install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
@$(BUILD_ENV) ; \
set -eu$(BUILD_DEBUG) ; \
d=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM) ; \
@ -943,7 +941,11 @@ install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
basic_system \
$(ROOT_PACKAGES)) || exit 1; \
$(call build_msg_fn, Relocating ELF executables to run in $${d}) ; \
scripts/set-rpath $${d} $${d}/$(arch_lib_dir) ; \
find $${d} -type f \
-exec elftool quiet in '{}' out '{}' \
set-interpreter \
$${d}/$(arch_lib_dir)/$(DYNAMIC_LINKER) \
set-rpath $${d}/$(arch_lib_dir):$${d}/lib ';' ; \
: strip symbols from files ; \
if [ $${strip_symbols:-no} = 'yes' ] ; then \
$(call build_msg_fn, Stripping symbols from files) ; \
@ -954,7 +956,7 @@ install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
>& /dev/null ; \
else \
$(call build_msg_fn, NOT stripping symbols) ; \
fi
fi
# readonly root squashfs image
# Note: $(call build_msg_fn) does not seem to work inside of fakeroot so we use echo
@ -969,16 +971,20 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot $(SHELL) -c "{ \
fakeroot /bin/bash -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
basic_system \
$(ROOT_PACKAGES)) ; \
: $(MAKE) dev directory ; \
: make dev directory ; \
$(linuxrc_makedev) ; \
echo @@@@ Relocating ELF executables to run in / @@@@ ; \
scripts/set-rpath /$(arch_lib_dir):/lib ; \
find $${d} -type f \
-exec elftool quiet in '{}' out '{}' \
set-interpreter \
/$(arch_lib_dir)/$(DYNAMIC_LINKER) \
set-rpath /$(arch_lib_dir):/lib ';' ; \
: strip symbols from files ; \
if [ '$${strip_symbols:-yes}' = 'yes' ] ; then \
echo @@@@ Stripping symbols from files @@@@ ; \
@ -1061,7 +1067,7 @@ rw-image: rw-image-check-type ro-image
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot $(SHELL) -c "{ \
fakeroot /bin/bash -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \
@ -1094,7 +1100,7 @@ ccache-install:
$(MAKE) -C $(MU_BUILD_ROOT_DIR) ccache-build
mkdir -p $(TOOL_INSTALL_DIR)/ccache-bin
ln -sf $(MU_BUILD_ROOT_DIR)/build-tool-native/ccache/ccache \
$(TOOL_INSTALL_DIR)/ccache-bin/$(TARGET_PREFIX)gcc
$(TOOL_INSTALL_DIR)/ccache-bin/$(TARGET_PREFIX)gcc
TOOL_MAKE = $(MAKE) is_build_tool=yes
@ -1158,4 +1164,7 @@ distclean:
rm -rf $(MU_BUILD_ROOT_DIR)/*.deb
rm -rf $(MU_BUILD_ROOT_DIR)/*.rpm
rm -rf $(MU_BUILD_ROOT_DIR)/*.changes
rm -rf $(MU_BUILD_ROOT_DIR)/*.buildinfo
rm -rf $(MU_BUILD_ROOT_DIR)/python
if [ -e /usr/bin/dh ];then (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean); fi
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.install
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/changelog

307
build-root/autowank Executable file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More