[dpdk-dev] Can the empty struct rte_eth_txmode be enhanced?

lxu lxu4net at qq.com
Wed Jun 12 06:54:51 CEST 2013


Hello all,I'm trying to write a C++ DPDK example. Everything is fine until I tried to enable RSS feature. It wasn't work.After hardy works, I found it's because empty structure rte_eth_txmode. In gcc the size of rte_eth_txmode is 0. But in g++ it's 1. I known the empty structure is a gcc extension. But it isn't be permitted by C99 (6.7.2.1/7 "Structure and union specifiers": "If the struct-declaration-list contains no named members, the behavior is undefined"). Can we change the struct rte_eth_txmode ? Such as : struct rte_eth_txmode { int reserve[]; };   /* sizeof(struct rte_eth_txmode) == 0 in gcc and g++ */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dpdk.org/ml/archives/dev/attachments/20130612/08df08bd/attachment.html>


More information about the dev mailing list