From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id A209B29AC for ; Thu, 1 Mar 2018 00:42:57 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id u5so1673630pfh.6 for ; Wed, 28 Feb 2018 15:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FYEsMaL7d0dKSM3dtaQx5LSxSylN2AyU+jgsi9P77Jg=; b=Gfuo8a75qUs43+1K254crq9bDeFkNzPUohAhUO5xpHoxYLBNI51tZL1r+3xEnJURnf uB9V3VJd8Zcq54Fvwfyz2lCXraL2tvtK7n/XNNwDs+GNlzifxcWggknp6zdNSmSwNUMo mHMaJMpOddskvDh9rVYO7rbWX381c8D61Og+NSNOQGX9NJT/jSsX73awPV5R3DBughw9 VcEz3BbJh0Za/myOnY+T+BdMeKNPQ7d069F7Ih5mlGqnaRKwVIJYT5eoBoHr/DRiN78+ MV359UwJjaXEX7CyFepjonuEEtC6D5bcLxS91i2nJ3qXkEoMmBq/5SWRTTFClwNVG10s Ys6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FYEsMaL7d0dKSM3dtaQx5LSxSylN2AyU+jgsi9P77Jg=; b=umOY0cK7FkyXJzAQeF3B2mcRzZZKihCD3dAKhOmxyPVlRjsRHHCUiNDkLFbwtsq2nX NzbKZrEpUMi1k4TD1z7hSd9UtOh48ZPINF9T1kGYa41sSCkcQUb+MgcK5ftDYbLvgqkm Uh5mD1fy+wLijCb5YXSmVggAj+x+kxKZXwSOYyAVAz/CWM4PWSv0sR/FBKscL44YlC8u p0AkW213BX9XCob80t75MnS7hwkRTcG34pcJMAhDT9PfhHzLWqMez5hPxY9MT/B37yJR 5hV9CD5zV0S3+MgAkP04TfnwQDzPaumV71Wcu6CF5J5U7kO5Xhq1EZ17w+E18IzOe/p0 PE5A== X-Gm-Message-State: APf1xPCCLrI3EoOxw06FGrzh7yWfxehkKUKyDgI4KEvOjZfYAFOrTv6p h8AppeyBnFBMS9/15AwICGMKlg== X-Google-Smtp-Source: AH8x225pxhuRCluMLV9tXM1UY2uhp/c6RzEbqhQiYBbaefbeBqJsx/Y+d+d2/WcKeW7bZk9hBPOcMQ== X-Received: by 10.99.61.75 with SMTP id k72mr15144207pga.384.1519861376501; Wed, 28 Feb 2018 15:42:56 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id 12sm5092211pfr.147.2018.02.28.15.42.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 15:42:56 -0800 (PST) Date: Wed, 28 Feb 2018 15:42:54 -0800 From: Stephen Hemminger To: Qi Zhang Cc: dev@dpdk.org, magnus.karlsson@intei.com, bjorn.topel@intel.com Message-ID: <20180228154254.1d1343d5@xeon-e3> In-Reply-To: <20180227093306.23854-2-qi.z.zhang@intel.com> References: <20180227093306.23854-1-qi.z.zhang@intel.com> <20180227093306.23854-2-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 1/7] net/af_xdp: new PMD driver 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, 28 Feb 2018 23:42:57 -0000 On Tue, 27 Feb 2018 17:33:00 +0800 Qi Zhang wrote: > + > +static void *get_pkt_data(struct pmd_internals *internals, > + uint32_t index, > + uint32_t offset) > +{ > + return (uint8_t *)(internals->umem->buffer + > + (index << internals->umem->frame_size_log2) + > + offset); You are returning void *, cast here is unnecessary