From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by dpdk.org (Postfix) with ESMTP id 4AC76939A for ; Wed, 25 Nov 2015 17:33:11 +0100 (CET) Received: by obbbj7 with SMTP id bj7so42704384obb.1 for ; Wed, 25 Nov 2015 08:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9gGtnVoMZE951TeEpZEH6mSpOiF6Ypl6aVRilnDkMHo=; b=UF3ikboPgchKG3dfFt6Nme4pdQXJTl6zevmEvrPNBrZYct1IWhgiS4Wkxp8Chre0QT ElkVLjTfLoy6m/bj3b56BnJt1s1uKmDQokBLDjR26e0KJB1/Yw+abDuIDgoNuJqK0Thv oPBxP2/BSl+hBKSVsxfh7+Lz/Hqz4EdUPIRjwSeVzJ9lbamSsZq20ku1z2mZlLNrIoG0 zzvEJCUWIqjv7zq3ACZuelrc3mFMTm5wdS30FeYi5rX/t1n1Zo9h64FWB8DY5P7mDlsK NuBtcQnqyimbcp3zVtIsQC9u7TLpo9SCl2m7M3OZlhbYZJm+Ce42lbCTjOE92B3YnLLz Y8ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9gGtnVoMZE951TeEpZEH6mSpOiF6Ypl6aVRilnDkMHo=; b=exDaUf9mLOAsGaxEtRBQiYyBes9ITlH7G8RBIUfXLA0nM/TFMRwE4ShhwIRUZZ5DT8 8kFTz3s6AY3V3Lsc1UsSgH5Xvy6Ess9RC1v02oAfz+QPpB7ODt1Z3+dqzHvclgwUHuGI i4VHR8iHd0DOa992sIXLtfqAFMBb7LmUiigFKefww5C4umY2p9hueErtuqUDi/pM62ZN xBXx0nx2vo+Gdzy6KgNWQtjPIgdXkN1HtpYbe/w518WkhspA88WoVAfUqGGnYl5qDvOU pH6BTkTdvYcr7jkKquQZwpFWSVbnTypNQD1GIpXQXDGN20NX+rzesOUiKX/gmO8P2WtE ALlQ== X-Gm-Message-State: ALoCoQm5wqmfBXI02qpANpowaHOY9wZASVHEa1/biyeZOjZANsYrv+tBARnJtreVYmH482S4gcfU MIME-Version: 1.0 X-Received: by 10.60.70.239 with SMTP id p15mr16964791oeu.5.1448469190805; Wed, 25 Nov 2015 08:33:10 -0800 (PST) Received: by 10.76.150.99 with HTTP; Wed, 25 Nov 2015 08:33:10 -0800 (PST) In-Reply-To: <20151125082923.19bafdea@xeon-e3> References: <1448468395-15577-1-git-send-email-alejandro.lucero@netronome.com> <1448468395-15577-6-git-send-email-alejandro.lucero@netronome.com> <20151125082923.19bafdea@xeon-e3> Date: Wed, 25 Nov 2015 16:33:10 +0000 Message-ID: From: Alejandro Lucero To: Stephen Hemminger Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev Subject: Re: [dpdk-dev] [PATCH v8 5/9] nfp: adding link functionality X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 16:33:11 -0000 I tried to do that but there is some issue with the inlining. I think this is due to inline keyword being processed (also) as static by the compiler. On Wed, Nov 25, 2015 at 4:29 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Wed, 25 Nov 2015 16:19:51 +0000 > "Alejandro.Lucero" wrote: > > > +/* > > + * Atomically reads link status information from global structure > rte_eth_dev. > > + * > > + * @param dev > > + * - Pointer to the structure rte_eth_dev to read from. > > + * - Pointer to the buffer to be saved with the link status. > > + * > > + * @return > > + * - On success, zero. > > + * - On failure, negative value. > > + */ > > +static inline int > > +nfp_net_dev_atomic_read_link_status(struct rte_eth_dev *dev, > > + struct rte_eth_link *link) > > +{ > > + struct rte_eth_link *dst = link; > > + struct rte_eth_link *src = &dev->data->dev_link; > > + > > + if (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst, > > + *(uint64_t *)src) == 0) > > + return -1; > > + > > + return 0; > > +} > > + > > +/ > > Sigh, this code has been copied and pasted to every driver. > Why is it not part of standard rte_ethdev code. >