Hello,

We are encountering issues with the latest Memif API changes within CSIT. We 
are using VAT console for configuring Memif.

Current API:

vat# help memif_create
usage: memif_create [id <id>] [socket-id <id>] [ring_size <size>] [buffer_size 
<size>] [hw_addr <mac_address>] [secret <string>] [mode ip] <master|slave>
vat# help memif_socket_filename_add_del
usage: memif_socket_filename_add_del [add|del] id <id> filename <file>


Trying to configure Memif:

vat# memif_dump
Sending ping id=714
memif0/0: sw_if_index 3 mac 02:fe:db:be:87:29
   id 0 socket-id 0 role slave
   ring_size 1 buffer_size 0
   state down link down

vat# memif_socket_filename_add_del add id 0 filename /tmp/memif
Invalid socket idmemif_socket_filename_add_del error: Misc

vat# memif_socket_filename_add_del add id 1 filename /tmp/memif
memif_socket_filename_add_del error: Misc

vat# memif_create id 0 socket-id 1 master
memif_create error: Invalid argument



vpp# create memif socket id 0 filename /tmp/memif
command deprecated. Please use 'create interface memif' instead.


vpp# sh ver
vpp v18.04-rc0~253-g76447a7~b3733 built by jenkins on 
ubuntu1604-basebuild-8c-32g-2493 at Wed Feb 21 08:39:53 UTC 2018

Can you please help how to properly configure Memif over VAT (it was working 
before)?

Thank you.

Peter Mikus
Engineer – Software
Cisco Systems Limited

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Jon Loeliger
Sent: Monday, January 22, 2018 5:59 PM
To: vpp-dev <vpp-dev@lists.fd.io>
Subject: [vpp-dev] Upcoming memif API and CLI changes.

Folks,

Just a heads-up that I have submitted a patch that alters both the
API and the CLI for the memif functions.  That patch is being reviewed
and will (hopefully) be merge soon.

Prior to the patch, the memif CLI supported a create and a delete
command roughly like this:

    vppctl# create memif id <id> filename <socket-filename> (master|slave) ...

After the patch, the management of the <socket-filename> will be through
a separate API call and a corresponding CLI command:

    vppctl# create memif socket id <socket-id> filename <socket-filename>

Then in the memif interface command, one references the <socket-id> instead:

    vppctl# create interface memif id <id> socket-id <socket-id> (master|slave) 
...

Note that in addition to the <socket-id> replacing the <socket-filename>, the 
command
itself has changed from "create memif" to "create interface memif".

To flesh-out the patch, dump/details API calls were added for the new socket 
id-filename
table, and VAT learned direct API call mechanisms for the new APIs as well.

HTH,
jdl

Reply via email to