From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130087.outbound.protection.outlook.com [40.107.13.87]) by dpdk.org (Postfix) with ESMTP id DA5541B49D for ; Wed, 19 Dec 2018 11:26:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hb+SAuvp6xTnjRDGqYMpyHA7fc3BiMkqEoQgnqsrTD4=; b=ZdKU4Sz9HH8ePmatJ39yw/iE1TT/u+a2le28n25eXq1EVOq6Zw2LvxTYq6sgM8gThAFXKHWYi1m3XHCrxC2iTi+4Wj13naEpVPOIMtWkW9ghcZVxp/W1T9v0c0RpMszcjYMuj7ktdHlxePs/LAK82NaTJ0nxPa3FBWom1dVBCGA= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB3053.eurprd08.prod.outlook.com (52.133.14.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.19; Wed, 19 Dec 2018 10:26:11 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::b5a5:e179:34f1:7d21]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::b5a5:e179:34f1:7d21%5]) with mapi id 15.20.1446.018; Wed, 19 Dec 2018 10:26:10 +0000 From: "Gavin Hu (Arm Technology China)" To: Jens Freimann , Maxime Coquelin CC: "dev@dpdk.org" , "tiwei.bie@intel.com" , "zhihong.wang@intel.com" , nd , nd Thread-Topic: [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offload helpers Thread-Index: AQHUkVg67vTgUTUVbUqXXG8IrjGbI6WF1sIAgAAQMsA= Date: Wed, 19 Dec 2018 10:26:10 +0000 Message-ID: References: <20181211134804.10318-1-maxime.coquelin@redhat.com> <20181211134804.10318-2-maxime.coquelin@redhat.com> <20181219092504.5t6c5mxwwvkfpkmm@jenstp.localdomain> In-Reply-To: <20181219092504.5t6c5mxwwvkfpkmm@jenstp.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB3053; 6:Xoq6DtOv3Ago4/tgTu8Hg4ZuoN6Qm+/DV7ZF7CXV5s2T3YCQ3625QlvU55pxjaKR0Hd/sUP3USfHPB3omP+jK//tZFIQnBA/dB4QID92p3BILamg28/1W9q0bq3SUlrzGE1a0P/mcQyQwPVlGEwudbPOgCwx4iaq7ukZx2aljLcqryg5Z7zXNnIDKF+1r7bYbrzQe4oePHamNh++v+UszPNmjbx5ys23cawTeWFsW9CDPLeMU7/IhH6cd0II6DdbRFYrBdeSVm/5EeEVySnCB8yGuxtdIB1zwYsVzRgLpf1mjHSgJFqXo8I4kFd0/HNFfOcbBGANTeuOwrzC31Rw8f7dpbhs4FGaoVOJhCVZIYpxe28kSAKoFhNE+sTaNLOJYhiZljVRA70+plj+Fr3Lh26tGjrxeQLJSytEG6UIWBBiYQjJB6be9g4hWx3SbQs/qCmPLQ/INKnqBKPTANmMFA==; 5:HH33/89VaeW87GxyiOsVWL4f+Sy1bGKaOphmM0lKYZSrzow+heMUcwS2m43bU04rr5OglWUSb0fRg9XSYMp4maLSQswYgvN8Hf86UGAhUkEYXoPt1vePZANQJBwf4T8GxaDcF0RL/NuW3i/mX/8VPdBNs0mEfDfUzJZYjCEPaCk=; 7:TB9fRKNdUWNQX58n9NmEfwHvO23/NGIIecFS2mJEayZl44K2vzDCGFwaCtO/8+v0R5cJAE+9CGRO/8zJx1NMbb7Yb/mCCSe/1iC38nRee4F7Sdbogy+ATKIzRwZkz5tM8vznXi47yH63ubjvrfm1Vg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: fe9f0e65-525f-407d-6114-08d6659c6560 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB3053; x-ms-traffictypediagnostic: VI1PR08MB3053: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:VI1PR08MB3053; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB3053; x-forefront-prvs: 0891BC3F3D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(136003)(13464003)(189003)(199004)(9686003)(305945005)(86362001)(74316002)(8936002)(256004)(68736007)(81166006)(72206003)(25786009)(14444005)(105586002)(106356001)(6116002)(14454004)(55016002)(2906002)(81156014)(33656002)(3846002)(316002)(6506007)(97736004)(7736002)(7696005)(55236004)(186003)(53546011)(478600001)(446003)(486006)(102836004)(26005)(4326008)(5660300001)(99286004)(6436002)(71190400001)(71200400001)(54906003)(11346002)(76176011)(6246003)(229853002)(476003)(66066001)(53936002)(110136005)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3053; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: i+5U3sZsNrdim/G44BQJzraPwZ2C3jME5Cl0axDBopl2WR6mFdSCttxp03jF3TydtNkVJjxeCfXX5khgz19tQiG7DTevmBQVHTwJo2+Y8lTRWNa6UbUKUVN47mtf7DRhuTrzdRTO/eoDmQRBm5Tam+EDcaIn7r5hT/JqRWnfPDql2xj4Vw+rQMl39O92qaURC3dPwDVhJWovs4R+3qiRP/7edPtsAe0gMVfV06NevNo4n6xrV6fd6PTO4hbhqmobrLt5zalL5zWhA7EtL6MMbkBIq3cC59+HiUfxJiC9EceszWFqeuISF8/hem/yP37S spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe9f0e65-525f-407d-6114-08d6659c6560 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2018 10:26:10.6850 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3053 Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offload helpers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 10:26:13 -0000 > -----Original Message----- > From: dev On Behalf Of Jens Freimann > Sent: Wednesday, December 19, 2018 5:25 PM > To: Maxime Coquelin > Cc: dev@dpdk.org; tiwei.bie@intel.com; zhihong.wang@intel.com > Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offl= oad > helpers >=20 > On Tue, Dec 11, 2018 at 02:48:02PM +0100, Maxime Coquelin wrote: > >Signed-off-by: Maxime Coquelin > >--- > > drivers/net/virtio/virtio_rxtx.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > >diff --git a/drivers/net/virtio/virtio_rxtx.c > >b/drivers/net/virtio/virtio_rxtx.c > >index eb891433e..e1c270b1c 100644 > >--- a/drivers/net/virtio/virtio_rxtx.c > >+++ b/drivers/net/virtio/virtio_rxtx.c > >@@ -741,7 +741,7 @@ virtio_dev_tx_queue_setup_finish(struct > rte_eth_dev *dev, > > return 0; > > } > > > >-static void > >+static inline void > > virtio_discard_rxbuf(struct virtqueue *vq, struct rte_mbuf *m) { > > int error; > >@@ -757,7 +757,7 @@ virtio_discard_rxbuf(struct virtqueue *vq, struct > rte_mbuf *m) > > } > > } > > > >-static void > >+static inline void > > virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m) > >{ > > int error; > >@@ -769,7 +769,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, > struct rte_mbuf *m) > > } > > } > > > >-static void > >+static inline void > > virtio_update_packet_stats(struct virtnet_stats *stats, struct > >rte_mbuf *mbuf) { > > uint32_t s =3D mbuf->pkt_len; > >@@ -811,7 +811,7 @@ virtio_rx_stats_updated(struct virtnet_rx *rxvq, > >struct rte_mbuf *m) } > > > > /* Optionally fill offload information in structure */ -static int > >+static inline int > > virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr) { > > struct rte_net_hdr_lens hdr_lens; >=20 > since these are all static functions, does declaring them inline actually= help > or are they inlined anyway by the compiler? >=20 > regards, > Jens By disassembling the code, static function calls translate to "bl XXX", tha= t means they are not inline. Inline is not always working, maybe __rte_always_inline is required here?=20 /Gavin