History log of /dpdk/examples/vhost/main.c (Results 126 – 150 of 186)
Revision Date Author Comments
# 691693c6 05-Feb-2016 Jijiang Liu <jijiang.liu@intel.com>

examples/vhost: remove IPv4 header definition

Remove the ipv4_hdr structure defination in vhost sample.

The same structure has already defined in the rte_ip.h file, so we
remove the defination fr

examples/vhost: remove IPv4 header definition

Remove the ipv4_hdr structure defination in vhost sample.

The same structure has already defined in the rte_ip.h file, so we
remove the defination from the sample, and include that header file.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

show more ...


# 693f715d 27-Jan-2016 Huawei Xie <huawei.xie@intel.com>

remove extra parentheses in return statement

fix the error reported by checkpatch:
"ERROR: return is not a function, parentheses are not required"

remove parentheses in return like:
"return (lo

remove extra parentheses in return statement

fix the error reported by checkpatch:
"ERROR: return is not a function, parentheses are not required"

remove parentheses in return like:
"return (logical expressions)"

remove parentheses in return a function like:
"return (rte_mempool_lookup(...))"

Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after return")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# f17eb179 10-Dec-2015 Bernard Iremonger <bernard.iremonger@intel.com>

examples/vhost: reduce number of hugepages needed

Add #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed.
Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages
required

examples/vhost: reduce number of hugepages needed

Add #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed.
Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages
required by the vhost-switch program.

To change MAX_QUEUES add '-D MAX_QUEUES=512' to the EXTRA_CFLAGS variable,
before building the application.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# 1befe9ca 09-Dec-2015 Pablo de Lara <pablo.de.lara.guarch@intel.com>

examples/vhost: fix strict aliasing

Fixes following error on gcc 4.4.7:

examples/vhost/main.c: In function ‘new_device’:
rte_ring.h:740: error:
dereferencing pointer ‘mbuf.486’ does break stric

examples/vhost: fix strict aliasing

Fixes following error on gcc 4.4.7:

examples/vhost/main.c: In function ‘new_device’:
rte_ring.h:740: error:
dereferencing pointer ‘mbuf.486’ does break strict-aliasing rules
examples/vhost/main.c:1503: note: initialized from here
...
rte_ring.h:740: error:
dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules
examples/vhost/main.c:1804: note: initialized from here

Fixes: d19533e8 ("examples/vhost: copy old vhost example")

Reported-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# 4c7bcd79 02-Dec-2015 Jianfeng Tan <jianfeng.tan@intel.com>

examples/vhost: fix statistics

This issue was discovered under the case of software vm2vm
fowarding. When pkts are received from virtio device 0 and
tx_route to virtio device 1, tx of device 0 is no

examples/vhost: fix statistics

This issue was discovered under the case of software vm2vm
fowarding. When pkts are received from virtio device 0 and
tx_route to virtio device 1, tx of device 0 is not updated.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

show more ...


# badb3688 25-Nov-2015 Ferruh Yigit <ferruh.yigit@intel.com>

eal/linux: fix build with glibc < 2.12

pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pt

eal/linux: fix build with glibc < 2.12

pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pthread_setname_np"

This patch adds "rte_thread_setname" macro and set it according
glibc >= 2.12 check, thread naming disabled for older glibc versions,
glibc versions that support "pthread_setname_np" will keep using this
function.

Fixes: 67b6d3039e9e ("eal: set name to threads")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 67b6d303 29-Jul-2015 Ravi Kerur <rkerur@gmail.com>

eal: set name to threads

This patch adds support for pthread_setname_np on Linux and
pthread_set_name_np on FreeBSD.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Stephen Hemminger <stephe

eal: set name to threads

This patch adds support for pthread_setname_np on Linux and
pthread_set_name_np on FreeBSD.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: add name in tep_termination example]

show more ...


# 9702b2b5 09-Sep-2015 Yuanhan Liu <yuanhan.liu@linux.intel.com>

vhost: fix wrong usage of eventfd_t

According to eventfd man page:

typedef uint64_t eventfd_t;

int eventfd_read(int fd, eventfd_t *value);
int eventfd_write(int fd, eventfd_t value);

vhost: fix wrong usage of eventfd_t

According to eventfd man page:

typedef uint64_t eventfd_t;

int eventfd_read(int fd, eventfd_t *value);
int eventfd_write(int fd, eventfd_t value);

eventfd_t is defined for the second arg(value), but not for fd.

Here I redefine those fd fields to `int' type, which also removes
the redundant (int) cast. And as the man page stated, we should
cast 1 to eventfd_t type for eventfd_write().

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# c83d2d00 06-Jul-2015 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: fix driver unregistering

The following commit broke vhost sample when it runs in second time:
292959c71961acde0cda6e77e737bb0a4df1559c

It should call api to unregister vhost driver

examples/vhost: fix driver unregistering

The following commit broke vhost sample when it runs in second time:
292959c71961acde0cda6e77e737bb0a4df1559c

It should call api to unregister vhost driver when sample exit/quit, then
the socket file will be removed(by calling unlink), and thus make vhost sample
work correctly in the second time startup.

Test report: http://dpdk.org/ml/archives/dev/2015-July/020896.html

Fixes: 292959c71961 ("vhost: cleanup unix socket")

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# 29c0f3c8 06-Jul-2015 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: fix comment and log

It fixes the wrong log info when failing to unregister vhost driver.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xi

examples/vhost: fix comment and log

It fixes the wrong log info when failing to unregister vhost driver.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# 0e433e5f 04-Jun-2015 Stephen Hemminger <shemming@brocade.com>

examples: fix whitespace

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


# e6eff1ba 04-May-2015 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: fix build with debug enabled

Minor fix for the referring of a pointer when debug and dump is enabled.

Fixes: 72ec8d77ac68 ("examples/vhost: rework duplicated code")

Signed-off-by:

examples/vhost: fix build with debug enabled

Minor fix for the referring of a pointer when debug and dump is enabled.

Fixes: 72ec8d77ac68 ("examples/vhost: rework duplicated code")

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>

show more ...


# 824cb29c 29-Apr-2015 Konstantin Ananyev <konstantin.ananyev@intel.com>

apps: fix default mbuf size

Latest mbuf changes (priv_size addition and related fixes)
exposed small problem with testpmd and few other sample apps:
when mbuf size is exaclty 2KB or less, that cause

apps: fix default mbuf size

Latest mbuf changes (priv_size addition and related fixes)
exposed small problem with testpmd and few other sample apps:
when mbuf size is exaclty 2KB or less, that causes
ixgbe PMD to select scattered RX even for configs with 'normal'
max packet length (max_rx_pkt_len == ETHER_MAX_LEN).
To overcome that problem and unify the code, new macro was created
to represent recommended minimal buffer length for mbuf.
When appropriate, samples are updated to use that macro.

Fixes: dfb03bbe2b ("app/testpmd: use standard functions to initialize
mbufs and mbuf pool")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>

show more ...


# 355e6735 22-Apr-2015 Olivier Matz <olivier.matz@6wind.com>

mbuf: fix cloning with private mbuf data

Add a new priv_size field in mbuf structure that should
be initialized at mbuf pool creation. This field contains the
size of the application private data in

mbuf: fix cloning with private mbuf data

Add a new priv_size field in mbuf structure that should
be initialized at mbuf pool creation. This field contains the
size of the application private data in mbufs.

Introduce new static inline functions rte_mbuf_from_indirect()
and rte_mbuf_to_baddr() to replace the existing macros, which
take the private size in account when attaching and detaching
mbufs.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# ea0c20ea 22-Apr-2015 Olivier Matz <olivier.matz@6wind.com>

apps: use helper to create mbuf pools

When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect

apps: use helper to create mbuf pools

When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect mbufs):
- ip_fragmentation
- ip_pipeline
- ipv4_multicast
- vhost

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# 1d493a49 22-Apr-2015 Olivier Matz <olivier.matz@6wind.com>

mbuf: fix data room size calculation in pool init

Deduct the mbuf data room size from mempool->elt_size and priv_size,
instead of using an hardcoded value that is not related to the real
buffer size

mbuf: fix data room size calculation in pool init

Deduct the mbuf data room size from mempool->elt_size and priv_size,
instead of using an hardcoded value that is not related to the real
buffer size.

To use rte_pktmbuf_pool_init(), the user can either:
- give a NULL parameter to rte_pktmbuf_pool_init(): in this case, the
private size is assumed to be 0, and the room size is
mp->elt_size - sizeof(struct rte_mbuf).
- give the rte_pktmbuf_pool_private filled with appropriate
data_room_size and priv_size values.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# 176582b8 07-Apr-2015 Stephen Hemminger <stephen@networkplumber.org>

examples: remove useless null checks before rte_free

rte_free handles getting passed a NULL pointer.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tux

examples: remove useless null checks before rte_free

rte_free handles getting passed a NULL pointer.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

show more ...


# 64ab9717 06-Mar-2015 Huawei Xie <huawei.xie@intel.com>

vhost: fix file descriptors naming

Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd.
It is functional correct, but causes confusion.
Exchange kickfd and callfd to avo

vhost: fix file descriptors naming

Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd.
It is functional correct, but causes confusion.
Exchange kickfd and callfd to avoid confusion.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>

show more ...


# 435eb142 14-Feb-2015 Stephen Hemminger <stephen@networkplumber.org>

examples: remove unneeded casts

*alloc() routines return void * and therefore cast is not needed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.

examples: remove unneeded casts

*alloc() routines return void * and therefore cast is not needed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: reverse num and size parameters in vhost calloc]

show more ...


# 4769bc5a 18-Feb-2015 Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>

mbuf: remove build option to disable refcnt

This patch removes all references to RTE_MBUF_REFCNT, setting the refcnt
field in the mbuf struct permanently.

Signed-off-by: Sergio Gonzalez Monroy <ser

mbuf: remove build option to disable refcnt

This patch removes all references to RTE_MBUF_REFCNT, setting the refcnt
field in the mbuf struct permanently.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# e8b9ef87 18-Feb-2015 Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>

mbuf: introduce indirect attached flag

Currently for mbufs with refcnt, we cannot free mbufs with external memory
buffers (ie. vhost zero copy), as they are recognized as indirect
attached mbufs and

mbuf: introduce indirect attached flag

Currently for mbufs with refcnt, we cannot free mbufs with external memory
buffers (ie. vhost zero copy), as they are recognized as indirect
attached mbufs and therefore we free the direct mbuf it points to,
resulting in an error in the case of external memory buffers.

We solve the issue by introducing the IND_ATTACHED_MBUF flag, which indicates
that the mbuf is an indirect attached mbuf pointing to another mbuf.
When we free an mbuf, we only free the direct mbuf if the flag is set.
Freeing an mbuf with external buffer is the same as freeing a non attached mbuf.
The flag is set during attach and clear on detach.

So in the case of vhost zero copy where we have mbufs with external
buffers, by default we just free the mbuf and it is up to the user to deal with
the external buffer.

This patch would allow the removal of the RTE_MBUF_REFCNT config option,
setting refcnt for all mbufs permanently.

The patch also modifies the vhost example as it was using the
RTE_MBUF_INDIRECT macro to detect if it was an mbuf with external buffer.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

show more ...


# e3d61d16 09-Feb-2015 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: add vlan strip command line option

Support turn on/off RX VLAN strip on host, this let guest get the chance of
using its software VLAN strip functionality.

Signed-off-by: Changchun

examples/vhost: add vlan strip command line option

Support turn on/off RX VLAN strip on host, this let guest get the chance of
using its software VLAN strip functionality.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# 8b9bb988 09-Feb-2015 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: avoid inserting vlan twice

Check if it has already been vlan-tagged packet, if true, avoid inserting a
duplicated vlan tag into it.

This is a possible case when guest has the capabi

examples/vhost: avoid inserting vlan twice

Check if it has already been vlan-tagged packet, if true, avoid inserting a
duplicated vlan tag into it.

This is a possible case when guest has the capability of inserting vlan tag.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>

show more ...


# 51ec3ae2 30-Jan-2015 Huawei Xie <huawei.xie@intel.com>

examples/vhost: fix crash when linking device to VMDQ fails

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>


# f0adccd4 12-Dec-2014 Ouyang Changchun <changchun.ouyang@intel.com>

examples/vhost: fix vlan offload

The following commit break vm2vm hard mode test cases:
commit db4014f2b65cb31bf ("use factorized default Rx/Tx configuration")

Investigation show that it needs enab

examples/vhost: fix vlan offload

The following commit break vm2vm hard mode test cases:
commit db4014f2b65cb31bf ("use factorized default Rx/Tx configuration")

Investigation show that it needs enabling vlan offload since it is turn off
by default in some drivers, and Tx need it, especially when vm2vm is in hard mode.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Tested-by: Jingguo Fu <jingguox.fu@intel.com>

show more ...


12345678