From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4C29A0C47; Tue, 15 Jun 2021 14:47:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D56D41159; Tue, 15 Jun 2021 14:47:44 +0200 (CEST) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mails.dpdk.org (Postfix) with ESMTP id 2FD7F40140 for ; Tue, 15 Jun 2021 14:47:43 +0200 (CEST) Received: by mail-io1-f51.google.com with SMTP id b14so28231394iow.13 for ; Tue, 15 Jun 2021 05:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aLEl1Qckb+LsqfKv3mZdz/XRJJV9maYPKqYWURpufMc=; b=LxiazaPt2Zgv/rTTK/nIW2tm1KaL0zw1PLHTILVD7yOAvhIdliLkWVzMj5PiHQSGIU BS1vndaJV2YrZUcHlM/e/SIX7qS9sxrGTQxV4eLeG6ySc14jh+CT2V9ZxLjPX4PWigGX dyTgKITPOoFp1PLbU/ix/20FNe0EJg0ffN+rXGjwXoDPEmC2U6/wjWBxIgJOcXdNHB33 TksVs4lnzIXD6UARTRfiwZje+T15co/we6NaMXMCVFwbgxyxlp0fSyjt2tJmWmsbu902 yOALovELUvyIBt9pLkW3WfKrgTP79U2W7L9akj2gQ5bgtURVigi/bjmYCb4MkfXd4I7/ TqHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aLEl1Qckb+LsqfKv3mZdz/XRJJV9maYPKqYWURpufMc=; b=sIIcQvSgKE0YHq8aqLl6YQ9O6Z6MzR7oo5u6n97+qZR/XtM9C8QlzWA5lBrsX5SVvA cLRInA7tKO8WlYN39YyV1qUXUEd3rcisORcqpqKdh+agaCey5G06zNrKPxvQ6vV0GXFP 8a98GvGfV2qS/4H7X/07ozvIsMHI3+bXYZZuyf2/A4sSYZHOKcHv5H3HLKrk1YAf789/ 8wUogumqTnOB5Q5x4LPD8khV6Jk/q9uVXkE37CzXQ96kHffJwkOtDp/j2CUvCVT9/UD3 Y/Ri0QGIHAzBcfNaFWROWgaBoJE+lHf9F3i+iO4iiPSt93+tthtoo8eIWzKaqrqk3ndX 4Gxw== X-Gm-Message-State: AOAM533LUp/4PedY8vyzzjoM7YKKTS74CdPNJBLBhbqBc8VR5eHTp3bN 8QHMfnGPWNtuPAlNJgYVx8vrn8DqObkbQVi9pFETh7QQl6ykuQ== X-Google-Smtp-Source: ABdhPJxuHAUIiyC57WQSSGODjMRUhWL6ebDMcLgs2fGSAfhZTDmlNjy5ygNrT677WzPza7PqDAMaMAQhcjd4slDwUz0= X-Received: by 2002:a6b:3e88:: with SMTP id l130mr17880977ioa.59.1623761262517; Tue, 15 Jun 2021 05:47:42 -0700 (PDT) MIME-Version: 1.0 References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210607175943.31690-1-ndabilpuram@marvell.com> <20210607175943.31690-52-ndabilpuram@marvell.com> In-Reply-To: <20210607175943.31690-52-ndabilpuram@marvell.com> From: Jerin Jacob Date: Tue, 15 Jun 2021 18:17:26 +0530 Message-ID: To: Nithin Dabilpuram Cc: dpdk-dev , Jerin Jacob , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh , Kiran Kumar K , Satheesh Paul , Ashwin Sekhar Thalakalath Kottilveetil Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 51/62] net/cnxk: add ethdev firmware version get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Jun 7, 2021 at 11:39 PM Nithin Dabilpuram wrote: > > From: Satha Rao > > Add callback to get ethdev firmware version. > > Signed-off-by: Satha Rao > +int > +cnxk_nix_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, > + size_t fw_size) > +{ > + struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev); > + const char *str = roc_npc_profile_name_get(&dev->npc); > + uint32_t size = strlen(str) + 1; > + > + if (fw_size > size) > + fw_size = size; > + > + strlcpy(fw_version, str, fw_size); use rte_strlcpy instead. > + > + if (fw_size < size) > + return size; > + > + return 0; > +} > + > void > cnxk_nix_rxq_info_get(struct rte_eth_dev *eth_dev, uint16_t qid, > struct rte_eth_rxq_info *qinfo) > -- > 2.8.4 >