rhel: Fix build failures because of libraries in /usr/lib.

Reported-by: Igor Sever <igor@xorops.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Get rid of mirror_mask_ffs() function.

There's no need for it because we have the equivalent (actually more
convenient) function raw_ctz(), which works with any integer type.

Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Alin Serdean <aserdean@cloudbasesolutions.com>
CC: Gurucharan Shetty <shettyg@nicira.com>
datapath: Fix deadlock during stats update.

Stats-read needs to lock stats but same lock is taken in stats
update in irq context. Therefore it needs to disable irq to
avoid following deadlock :-

BUG: soft lockup - CPU#1 stuck for 23s! [ovs-vswitchd:1425]
CPU 1
Pid: 1425, comm: ovs-vswitchd Tainted: G           O 3.2.39-server-nn23 #1 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
RIP: 0010:[<ffffffff8103db22>]  [<ffffffff8103db22>] __ticket_spin_lock+0x22/0x30
RSP: 0018:ffff88003fd03b30  EFLAGS: 00000297
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000050
RDX: 0000000000000002 RSI: ffff88003d0a9900 RDI: ffff88003ae19598
RBP: ffff88003fd03b30 R08: 0000000000000000 R09: ffff88003ad44048
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88003fd03aa8
R13: ffffffff8164e5de R14: ffff88003fd03b30 R15: ffff88003ae19580
FS:  00007ffb0b428940(0000) GS:ffff88003fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c0ef94000 CR3: 00000000250e2000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process ovs-vswitchd (pid: 1425, threadinfo ffff88002514a000, task ffff8800250aae00)
Stack:
 ffff88003fd03b40 ffffffff8164596e ffff88003fd03b70 ffffffffa027622d
 ffff88003d0a9900 ffffe8ffffd03800 ffff8800297f5a80 ffff88003fd03ba8
 ffff88003fd03c60 ffffffffa02759af ffff88003fd03de0 ffff88003fd03e4c
Call Trace:
 <IRQ>
 [<ffffffff8164596e>] _raw_spin_lock+0xe/0x20
 [<ffffffffa027622d>] ovs_flow_stats_update+0x5d/0x100 [openvswitch]
 [<ffffffffa02759af>] ovs_dp_process_received_packet+0x8f/0x130 [openvswitch]
 [<ffffffffa027c0ca>] ovs_vport_receive+0x2a/0x30 [openvswitch]
 [<ffffffffa027db18>] netdev_frame_hook+0xb8/0x120 [openvswitch]
 [<ffffffffa027da60>] ? free_port_rcu+0x30/0x30 [openvswitch]
 [<ffffffff81539318>] __netif_receive_skb+0x1c8/0x620
 [<ffffffff8153a4c0>] netif_receive_skb+0x80/0x90
 [<ffffffff8115f14c>] ? ksize+0x1c/0xc0
 [<ffffffff8153a610>] napi_skb_finish+0x50/0x70
 [<ffffffff8153ac15>] napi_gro_receive+0xf5/0x140
 [<ffffffffa00368ae>] vmxnet3_rq_rx_complete+0x51e/0x7c0 [vmxnet3]
 [<ffffffff8101ac90>] ? nommu_map_sg+0xe0/0xe0
 [<ffffffffa0036da5>] vmxnet3_poll_rx_only+0x45/0xc0 [vmxnet3]
 [<ffffffff8153ae64>] net_rx_action+0x134/0x290
 [<ffffffff8103db0d>] ? __ticket_spin_lock+0xd/0x30
 [<ffffffff8106e1a8>] __do_softirq+0xa8/0x210
 [<ffffffff8164596e>] ? _raw_spin_lock+0xe/0x20
 [<ffffffff8164fd6c>] call_softirq+0x1c/0x30
 [<ffffffff81016215>] do_softirq+0x65/0xa0
 [<ffffffff8106e58e>] irq_exit+0x8e/0xb0
 [<ffffffff81650633>] do_IRQ+0x63/0xe0
 [<ffffffff81645e2e>] common_interrupt+0x6e/0x6e

-----------
Bug #21853
Reported-by: Pawan Shukla <shuklap@vmware.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
xenserver: Fix build failures because of libraries in /usr/lib.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
entropy: Add Windows support.

Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>