From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 5F2C2C4FE for ; Tue, 28 Apr 2015 11:16:06 +0200 (CEST) Received: by wgen6 with SMTP id n6so143791154wge.3 for ; Tue, 28 Apr 2015 02:16:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=siN8Op+d8JTssijBlmMdT/FDV58sjlGN0XF6fpx8Lqc=; b=UAFi3mTzgAjQHQTyFkswbTnK17irK069GJmsAS66PNA2yhwhy8GbgkQozYwg5kqwEP qdoEVlirvYtmtART+MaAjzjjIP5LSBtLXRgh4T5SnzcwsCxGgeQIBpfqEtNOqz6Amzyu MY0QlpB1vX3oxV43ZTxSBGlTFP4IVh/uQsxl8L7lPY9DBwCwJAdS/x//oOKUWyTrDtsc f+loEVgSfzi7MP3e54ux1ID8Rd4wPGmjm9Qoung1RvPWNSgr3+FtuzlkVS4BbhS/IN+e 4d/jGeIfsxVJ2wdcLgNNeZkRbr6ZkeZYAQl9gAvmSggmqmcKtZIV0Gp9vli50SAqK96T FWtw== X-Gm-Message-State: ALoCoQkreO9mMDTM1izED1sXIZjaLQzI6tmF3FFqnsYomh+Dg9arHzzVKRnD7mBzOBt1btaXKNOj X-Received: by 10.180.108.147 with SMTP id hk19mr27035582wib.51.1430212565248; Tue, 28 Apr 2015 02:16:05 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id bi3sm15424028wib.5.2015.04.28.02.16.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 02:16:04 -0700 (PDT) From: Thomas Monjalon To: Olivier Matz Date: Tue, 28 Apr 2015 11:15:23 +0200 Message-ID: <1741418.9S7PXYUXiU@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1429696650-9043-4-git-send-email-olivier.matz@6wind.com> References: <1429610122-30943-1-git-send-email-olivier.matz@6wind.com> <1429696650-9043-1-git-send-email-olivier.matz@6wind.com> <1429696650-9043-4-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v6 03/13] mbuf: add accessors to get data room size and private size 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: Tue, 28 Apr 2015 09:16:06 -0000 2015-04-22 11:57, Olivier Matz: > This code retrieving the pool private area is duplicated in many > places, we can use of function for it. >=20 > Signed-off-by: Olivier Matz > Acked-by: Neil Horman [...] > --- a/lib/librte_pmd_pcap/rte_eth_pcap.c > +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c > @@ -136,9 +136,7 @@ eth_pcap_rx(void *queue, > =09const u_char *packet; > =09struct rte_mbuf *mbuf; > =09struct pcap_rx_queue *pcap_q =3D queue; > -=09struct rte_pktmbuf_pool_private *mbp_priv; > =09uint16_t num_rx =3D 0; > -=09uint16_t buf_size; > =20 > =09if (unlikely(pcap_q->pcap =3D=3D NULL || nb_pkts =3D=3D 0)) > =09=09return 0; > @@ -157,8 +155,7 @@ eth_pcap_rx(void *queue, > =09=09=09break; > =20 > =09=09/* Now get the space available for data in the mbuf */ > -=09=09mbp_priv =3D rte_mempool_get_priv(pcap_q->mb_pool); > -=09=09buf_size =3D (uint16_t) (mbp_priv->mbuf_data_room_size - > +=09=09buf_size =3D (uint16_t)(rte_pktmbuf_data_room_size(pcap_q->mb_= pool) - > =09=09=09=09RTE_PKTMBUF_HEADROOM); > =20 > =09=09if (header.len <=3D buf_size) { It doesn't compile because buf_size is removed by error: lib/librte_pmd_pcap/rte_eth_pcap.c: In function =E2=80=98eth_pcap_rx=E2= =80=99: lib/librte_pmd_pcap/rte_eth_pcap.c:158:3: error: =E2=80=98buf_size=E2=80= =99 undeclared (first use in this function) I fix it while applying patches.