d/control: add librte-mempool-ring to the list of default libs 55/17155/1
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 30 Jan 2019 08:07:12 +0000 (09:07 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 30 Jan 2019 08:07:12 +0000 (09:07 +0100)
The mempool API as linked and becoming a dependency only is the frontent
API/ABI for the mempool. Just as with the PMDs it needs an
implementation in the default driver directory to work.

While testing OVS-DPDK I found that when adding a dpdk based port
allocations fail:
sudo ovs-vsctl set Open_vSwitch . other_config:dpdk-init=true
sudo ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x1e
sudo ovs-vsctl set Open_vSwitch . other_config:dpdk-alloc-mem=2048
sudo systemctl restart openvswitch-switch
sudo ovs-vsctl add-port ovsdpdkbr0 dpdk0 -- set Interface dpdk0 \
  type=dpdk options:dpdk-devargs=0000:04:00.0
ovs-vsctl: Error detected while setting up 'dpdk0': could not add network
  device dpdk0 to ofproto (No such device).  See ovs-vswitchd log for details.
ovs-vsctl: The default log directory is "/var/log/openvswitch".

And in the log I found:
2019-01-30T07:23:55.917Z|00098|dpdk|ERR|MBUF: error setting mempool handler
2019-01-30T07:23:55.917Z|00099|netdev_dpdk|ERR|Failed to create mempool
  "ovs62a2ca2f00021580262144" with a request of 262144 mbufs
2019-01-30T07:23:55.917Z|00100|netdev_dpdk|ERR|Failed to create memory pool
  for netdev dpdk0, with MTU 1500 on socket 0: Invalid argument
2019-01-30T07:23:55.917Z|00101|dpif_netdev|ERR|Failed to set interface dpdk0
  new configuration

Installing one of the actual mempool implementations fixed the issue.
This is similar to this discussion:
  http://mails.dpdk.org/archives/users/2017-June/002032.html
Since per upstream documentation
  https://doc.dpdk.org/guides/prog_guide/mempool_lib.html
the default mempool implementation is the ring based one we should add
librte-mempool-ring to the default Recommends.

Recommends (vs Depends) with the same argument as with the PMDs.
That allows an administrator of a very special system to not only
install his own mempool implementation, but also to remove the
librte-mempool-ring in case that would conflict with his required setup.

Change-Id: Iacd3ee7a4378a3b5d4294c8e762dc50809f0b22b
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/control

index 93febc5..1381ea6 100644 (file)
@@ -45,6 +45,7 @@ Depends: hwdata,
          ${python3:Depends},
          ${shlibs:Depends},
 Recommends: librte-mempool18.11,
+            librte-mempool-ring18.11,
             librte-pmd-af-packet18.11,
             librte-pmd-bond18.11,
             librte-pmd-e1000-18.11,