Merged,
Maxim.

On 05/15/16 00:41, Bill Fischofer wrote:


On Fri, May 13, 2016 at 6:40 AM, Matias Elo <matias....@nokia.com <mailto:matias....@nokia.com>> wrote:

    Clang build fails due to a missing field in initializer
    error. This is a known clang bug
    (https://llvm.org/bugs/show_bug.cgi?id=21689). Circumvent
    this by using memset() instead.

    Signed-off-by: Matias Elo <matias....@nokia.com
    <mailto:matias....@nokia.com>>


Reviewed-by: Bill Fischofer <bill.fischo...@linaro.org <mailto:bill.fischo...@linaro.org>>

    ---
     platform/linux-generic/pktio/dpdk.c | 12 +++++++++---
     1 file changed, 9 insertions(+), 3 deletions(-)

    diff --git a/platform/linux-generic/pktio/dpdk.c
    b/platform/linux-generic/pktio/dpdk.c
    index e6af8fb..831dc26 100644
    --- a/platform/linux-generic/pktio/dpdk.c
    +++ b/platform/linux-generic/pktio/dpdk.c
    @@ -177,11 +177,13 @@ static int dpdk_netdev_is_valid(const char *s)

     static uint32_t dpdk_vdev_mtu_get(uint8_t port_id)
     {
    -       struct rte_eth_dev_info dev_info = {0};
    +       struct rte_eth_dev_info dev_info;
            struct ifreq ifr;
            int sockfd;
            uint32_t mtu;

    +       memset(&dev_info, 0, sizeof(struct rte_eth_dev_info));
    +
            rte_eth_dev_info_get(port_id, &dev_info);
            if_indextoname(dev_info.if_index, ifr.ifr_name);

    @@ -219,11 +221,13 @@ static uint32_t dpdk_mtu_get(pktio_entry_t
    *pktio_entry)

     static int dpdk_vdev_promisc_mode_get(uint8_t port_id)
     {
    -       struct rte_eth_dev_info dev_info = {0};
    +       struct rte_eth_dev_info dev_info;
            struct ifreq ifr;
            int sockfd;
            int mode;

    +       memset(&dev_info, 0, sizeof(struct rte_eth_dev_info));
    +
            rte_eth_dev_info_get(port_id, &dev_info);
            if_indextoname(dev_info.if_index, ifr.ifr_name);

    @@ -240,11 +244,13 @@ static int
    dpdk_vdev_promisc_mode_get(uint8_t port_id)

     static int dpdk_vdev_promisc_mode_set(uint8_t port_id, int enable)
     {
    -       struct rte_eth_dev_info dev_info = {0};
    +       struct rte_eth_dev_info dev_info;
            struct ifreq ifr;
            int sockfd;
            int mode;

    +       memset(&dev_info, 0, sizeof(struct rte_eth_dev_info));
    +
            rte_eth_dev_info_get(port_id, &dev_info);
            if_indextoname(dev_info.if_index, ifr.ifr_name);

    --
    1.9.1

    _______________________________________________
    lng-odp mailing list
    lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
    https://lists.linaro.org/mailman/listinfo/lng-odp




_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to