From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from inblrg01.tcs.com (inblrg01.tcs.com [121.242.48.3]) by dpdk.org (Postfix) with ESMTP id B9F705930 for ; Fri, 25 Jul 2014 17:00:44 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.01,731,1400005800"; d="scan'208";a="115698289" X-DISCLAIMER: FALSE Received: from INBLRDLPMTA2.india.tcs.com (unknown [127.0.0.1]) by INBLRDLPMTA2.india.tcs.com (Service) with ESMTP id 3136A128E12 for ; Fri, 25 Jul 2014 20:32:17 +0530 (IST) Received: from InHydM02.tcs.com (unknown [172.25.68.72]) by INBLRDLPMTA2.india.tcs.com (Service) with ESMTP id C8A14128E02 for ; Fri, 25 Jul 2014 20:32:16 +0530 (IST) Sensitivity: MIME-Version: 1.0 Importance: Normal X-Priority: 3 (Normal) In-Reply-To: References: From: Santhosh Bendalam To: Santhosh Bendalam Message-ID: Date: Fri, 25 Jul 2014 20:32:12 +0530 X-Mailer: Lotus Domino Web Server Release 8.5.3FP2 July 02, 2012 X-MIMETrack: Serialize by Notes Server on InHydM02/TCS(Release 8.5.3FP2|July 02, 2012) at 07/25/2014 20:32:12, Serialize complete at 07/25/2014 20:32:14, Itemize by Notes Server on InHydM02/TCS(Release 8.5.3FP2|July 02, 2012) at 07/25/2014 20:32:14, Serialize by Notes Server on InHydM02/TCS(Release 8.5.3FP2|July 02, 2012) at 07/25/2014 20:32:15, Serialize complete at 07/25/2014 20:32:15, Serialize by Router on InHydM02/TCS(Release 8.5.3FP2|July 02, 2012) at 07/25/2014 20:32:16, Serialize complete at 07/25/2014 20:32:16 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Regarding new feature development in dpdk-acl 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: Fri, 25 Jul 2014 15:00:45 -0000 Missed the patch. Please find the patch. diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index 9b2c21b..8a5dde8 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -85,6 +85,8 @@ =20 #define MBUF=5FSIZE (2048 + sizeof(struct rte=5Fmbuf) + RTE=5FPKTMBUF=5FHE= ADROOM) =20 +#define L3FWDACL=5FDEBUG + /* * This expression is used to calculate the number of mbufs needed * depending on user input, taking into account memory for rx and tx hardw= are @@ -135,6 +137,16 @@ static uint16=5Ft nb=5Frxd =3D RTE=5FTEST=5FRX=5FDESC=5FDEFAULT; static uint16=5Ft nb=5Ftxd =3D RTE=5FTEST=5FTX=5FDESC=5FDEFAULT; =20 +/* TCP header flags */ +#define TCPHDR=5FFIN 0x01 +#define TCPHDR=5FSYN 0x02 +#define TCPHDR=5FRST 0x04 +#define TCPHDR=5FPSH 0x08 +#define TCPHDR=5FACK 0x10 +#define TCPHDR=5FURG 0x20 +#define TCPHDR=5FECE 0x40 +#define TCPHDR=5FCWR 0x80 + /* ethernet addresses of ports */ static struct ether=5Faddr ports=5Feth=5Faddr[RTE=5FMAX=5FETHPORTS]; =20 @@ -314,6 +326,7 @@ enum { DST=5FFIELD=5FIPV4, SRCP=5FFIELD=5FIPV4, DSTP=5FFIELD=5FIPV4, + PROTO=5FFIELD=5FFLAGS, NUM=5FFIELDS=5FIPV4 }; =20 @@ -358,6 +371,15 @@ struct rte=5Facl=5Ffield=5Fdef ipv4=5Fdefs[NUM=5FFIELD= S=5FIPV4] =3D { offsetof(struct ipv4=5Fhdr, next=5Fproto=5Fid) + sizeof(uint16=5Ft), }, + { + .type =3D RTE=5FACL=5FFIELD=5FTYPE=5FBITMASK, + .size =3D sizeof(uint8=5Ft), + .field=5Findex =3D PROTO=5FFIELD=5FFLAGS, + .input=5Findex =3D RTE=5FACL=5FIPV4VLAN=5FPROTO=5FFLAGS, + .offset =3D sizeof(struct ipv4=5Fhdr) - offsetof(struct ip= v4=5Fhdr, next=5Fproto=5Fid) + + sizeof(uint16=5Ft) + sizeof(uint16=5Ft) + sizeof= (uint32=5Ft) + + sizeof (uint32=5Ft) + sizeof(uint8=5Ft), + }, }; =20 #define IPV6=5FADDR=5FLEN 16 @@ -376,6 +398,7 @@ enum { DST4=5FFIELD=5FIPV6, SRCP=5FFIELD=5FIPV6, DSTP=5FFIELD=5FIPV6, + PROTO=5FFIELD=5FFLAGS=5FIPV6, NUM=5FFIELDS=5FIPV6 }; =20 @@ -467,6 +490,15 @@ struct rte=5Facl=5Ffield=5Fdef ipv6=5Fdefs[NUM=5FFIELD= S=5FIPV6] =3D { .offset =3D sizeof(struct ipv6=5Fhdr) - offsetof(struct ipv6=5Fhdr, proto) + sizeof(uint16=5Ft), }, + { + .type =3D RTE=5FACL=5FFIELD=5FTYPE=5FBITMASK, + .size =3D sizeof(uint8=5Ft), + .field=5Findex =3D PROTO=5FFIELD=5FFLAGS=5FIPV6, + .input=5Findex =3D PROTO=5FFIELD=5FFLAGS=5FIPV6, + .offset =3D sizeof(struct ipv6=5Fhdr) - offsetof(struct ip= v6=5Fhdr, proto) + + sizeof(uint16=5Ft) + sizeof(uint16=5Ft) + sizeof (uint3= 2=5Ft) + + sizeof (uint32=5Ft) + sizeof(uint8=5Ft), + }, }; =20 enum { @@ -479,6 +511,7 @@ enum { CB=5FFLD=5FDST=5FPORT=5FDLM, CB=5FFLD=5FDST=5FPORT=5FHIGH, CB=5FFLD=5FPROTO, + CB=5FFLD=5FPROTO=5FFLAGS, CB=5FFLD=5FUSERDATA, CB=5FFLD=5FNUM, }; @@ -536,6 +569,8 @@ print=5Fone=5Fipv4=5Frule(struct acl4=5Frule *rule, int= extra) rule->field[DSTP=5FFIELD=5FIPV4].mask=5Frange.u16, rule->field[PROTO=5FFIELD=5FIPV4].value.u8, rule->field[PROTO=5FFIELD=5FIPV4].mask=5Frange.u8); + + printf(" Proto flags: %hu ", rule->field[PROTO=5FFIELD=5FFLAGS].va= lue.u8); if (extra) printf("0x%x-0x%x-0x%x ", rule->data.category=5Fmask, @@ -589,6 +624,9 @@ print=5Fone=5Fipv6=5Frule(struct acl6=5Frule *rule, int= extra) rule->field[DSTP=5FFIELD=5FIPV6].mask=5Frange.u16, rule->field[PROTO=5FFIELD=5FIPV6].value.u8, rule->field[PROTO=5FFIELD=5FIPV6].mask=5Frange.u8); + + printf(" Proto flags: %hu ", rule->field[PROTO=5FFIELD=5FFLAGS].va= lue.u8); + if (extra) printf("0x%x-0x%x-0x%x ", rule->data.category=5Fmask, @@ -700,14 +738,19 @@ prepare=5Fone=5Fpacket(struct rte=5Fmbuf **pkts=5Fin,= struct acl=5Fsearch=5Ft *acl, { struct ipv4=5Fhdr *ipv4=5Fhdr; struct rte=5Fmbuf *pkt =3D pkts=5Fin[index]; - + struct tcp=5Fhdr *tcp=5Fhdr; int type =3D pkt->ol=5Fflags & (PKT=5FRX=5FIPV4=5FHDR | PKT=5FRX=5FIPV6= =5FHDR); - - if (type =3D=3D PKT=5FRX=5FIPV4=5FHDR) { + printf ("\n bendalam pkt->ol=5Fflags: %d\n", pkt->ol=5Fflags); + printf("\n From prepare=5Fone=5Fpacket -1\n"); + //if (type =3D=3D PKT=5FRX=5FIPV4=5FHDR) { + if (1) { =20 ipv4=5Fhdr =3D (struct ipv4=5Fhdr *)(rte=5Fpktmbuf=5Fmtod(pkt, unsigned char *) + sizeof(struct ether=5Fhdr)); =20 + tcp=5Fhdr =3D (struct tcp=5Fhdr *)(rte=5Fpktmbuf=5Fmtod(pk= t, unsigned char *) + + sizeof(struct ether=5Fhdr) + sizeof(struct = ipv4=5Fhdr)); + /* Check to make sure the packet is valid (RFC1812) */ if (is=5Fvalid=5Fipv4=5Fpkt(ipv4=5Fhdr, pkt->pkt.pkt=5Flen) >=3D 0) { =20 @@ -715,10 +758,28 @@ prepare=5Fone=5Fpacket(struct rte=5Fmbuf **pkts=5Fin,= struct acl=5Fsearch=5Ft *acl, --(ipv4=5Fhdr->time=5Fto=5Flive); ++(ipv4=5Fhdr->hdr=5Fchecksum); =20 + printf("\n From prepare=5Fone=5Fpacket -2\n"); +#if 0 + if(tcp=5Fhdr->tcp=5Fflags & TCPHDR=5FSYN) + { + + printf("\n tcp Flag is SYN: %x \n",tcp=5Fhdr->tcp= =5Fflags); + rte=5Fpktmbuf=5Ffree(pkt); + return; + }=20 + else + { + printf("\n other tcp Flags are %x \n",tcp=5Fhdr->= tcp=5Fflags); + + }=20 +#endif /* Fill acl structure */ acl->data=5Fipv4[acl->num=5Fipv4] =3D MBUF=5FIPV4=5F2PROTO(pkt); acl->m=5Fipv4[(acl->num=5Fipv4)++] =3D pkt; =20 + printf ("\n tcp=5Fhdr src port is %x and dst port is %x",tcp=5Fhdr->src= =5Fport,=20 + = tcp=5Fhdr->dst=5Fport); + } else { /* Not a valid IPv4 packet */ rte=5Fpktmbuf=5Ffree(pkt); @@ -745,7 +806,8 @@ prepare=5Fone=5Fpacket(struct rte=5Fmbuf **pkts=5Fin, s= truct acl=5Fsearch=5Ft *acl, =20 int type =3D pkt->ol=5Fflags & (PKT=5FRX=5FIPV4=5FHDR | PKT=5FRX=5FIPV6= =5FHDR); =20 - if (type =3D=3D PKT=5FRX=5FIPV4=5FHDR) { +// if (type =3D=3D PKT=5FRX=5FIPV4=5FHDR) { + if (1) { =20 /* Fill acl structure */ acl->data=5Fipv4[acl->num=5Fipv4] =3D MBUF=5FIPV4=5F2PROTO(pkt); @@ -793,20 +855,25 @@ prepare=5Facl=5Fparameter(struct rte=5Fmbuf **pkts=5F= in, struct acl=5Fsearch=5Ft *acl, static inline void send=5Fone=5Fpacket(struct rte=5Fmbuf *m, uint32=5Ft res) { + dump=5Facl4=5Frule(m, res); if (likely((res & ACL=5FDENY=5FSIGNATURE) =3D=3D 0 && res !=3D 0)) { /* forward packets */ + dump=5Facl4=5Frule(m, res); + printf("@@@@@@@@ forwarding pkt !!!! resid:%x", res); send=5Fsingle=5Fpacket(m, (uint8=5Ft)(res - FWD=5FPORT=5FSHIFT)); } else{ /* in the ACL list, drop it */ #ifdef L3FWDACL=5FDEBUG if ((res & ACL=5FDENY=5FSIGNATURE) !=3D 0) { - if (m->ol=5Fflags & PKT=5FRX=5FIPV4=5FHDR) +// if (m->ol=5Fflags & PKT=5FRX=5FIPV4=5FHDR) + if (1) dump=5Facl4=5Frule(m, res); else dump=5Facl6=5Frule(m, res); } #endif + printf("@@@@@@@@@@@@@@@@Packet Drop !!!!!!!! resid: %x\n",= res); rte=5Fpktmbuf=5Ffree(m); } } @@ -958,10 +1025,17 @@ parse=5Fcb=5Fipv6=5Frule(char *str, struct rte=5Facl= =5Frule *v, int has=5Fuserdata) GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO], v->field[PROTO=5FFIELD=5FIPV6].mas= k=5Frange.u8, 0, UINT8=5FMAX, 0); =20 + GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO=5FFLAGS], v->field[PROTO=5FFI= ELD=5FFLAGS=5FIPV6].value.u8, + 0, UINT8=5FMAX, '/'); + GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO=5FFLAGS],=20 + v->field[PROTO=5FFIELD=5FFLAGS=5FIPV6].mask=5Frange.u8, + 0, UINT8=5FMAX, 0); + if (has=5Fuserdata) GET=5FCB=5FFIELD(in[CB=5FFLD=5FUSERDATA], v->data.userdata, 0, UINT32=5FMAX, 0); =20 + return 0; } =20 @@ -1057,9 +1131,18 @@ parse=5Fcb=5Fipv4vlan=5Frule(char *str, struct rte= =5Facl=5Frule *v, int has=5Fuserdata) GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO], v->field[PROTO=5FFIELD=5FIPV4].mas= k=5Frange.u8, 0, UINT8=5FMAX, 0); =20 + GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO=5FFLAGS], v->field[PROTO=5FFI= ELD=5FFLAGS].value.u8, + 0, UINT8=5FMAX, '/'); + GET=5FCB=5FFIELD(in[CB=5FFLD=5FPROTO=5FFLAGS], v->field[PROTO=5FFIELD=5FF= LAGS].mask=5Frange.u8, + 0, UINT8=5FMAX, 0); + if (has=5Fuserdata) + { GET=5FCB=5FFIELD(in[CB=5FFLD=5FUSERDATA], v->data.userdata, 0, UINT32=5FMAX, 0); + printf("\nbendalam In parser.. User data: %u\n", v->data.userdata); + } + =20 return 0; } @@ -1136,6 +1219,7 @@ add=5Frules(const char *rule=5Fpath, rule=5Fpath, i, ROUTE=5FLEAD=5FCHAR, ACL=5FLEAD=5FCHAR); =20 if (parser(buff + 1, next, s =3D=3D ROUTE=5FLEAD=5FCHAR) !=3D 0) +// if (parser(buff + 1, next, 1) !=3D 0) rte=5Fexit(EXIT=5FFAILURE, "%s Line %u: parse rules error\n", rule=5Fpath, i); @@ -1499,10 +1583,12 @@ main=5Floop(=5F=5Fattribute=5F=5F((unused)) void *d= ummy) if (nb=5Frx > 0) { struct acl=5Fsearch=5Ft acl=5Fsearch; =20 + printf("\n bendalam IPv4 pkt received: before prepare=5Facl\n"); prepare=5Facl=5Fparameter(pkts=5Fburst, &acl=5Fsearch, nb=5Frx); =20 if (acl=5Fsearch.num=5Fipv4) { + printf("\n bendalam IPv4 pkt received\n"); CLASSIFY(acl=5Fconfig.acx=5Fipv4[socketid], acl=5Fsearch.data=5Fipv4, acl=5Fsearch.res=5Fipv4, @@ -1982,6 +2068,7 @@ MAIN(int argc, char **argv) =20 /* init EAL */ ret =3D rte=5Feal=5Finit(argc, argv); + rte=5Fset=5Flog=5Flevel(RTE=5FLOG=5FDEBUG); if (ret < 0) rte=5Fexit(EXIT=5FFAILURE, "Invalid EAL parameters\n"); argc -=3D ret; diff --git a/lib/librte=5Facl/Makefile b/lib/librte=5Facl/Makefile index 4fe4593..2ab4d34 100644 --- a/lib/librte=5Facl/Makefile +++ b/lib/librte=5Facl/Makefile @@ -34,7 +34,8 @@ include $(RTE=5FSDK)/mk/rte.vars.mk # library name LIB =3D librte=5Facl.a =20 -CFLAGS +=3D -O3 +#CFLAGS +=3D -O3 +CFLAGS +=3D -O0 -g=20 CFLAGS +=3D $(WERROR=5FFLAGS) -I$(SRCDIR) =20 # all source are stored in SRCS-y diff --git a/lib/librte=5Facl/acl=5Frun.c b/lib/librte=5Facl/acl=5Frun.c index e3d9fc1..95afa04 100644 --- a/lib/librte=5Facl/acl=5Frun.c +++ b/lib/librte=5Facl/acl=5Frun.c @@ -820,6 +820,16 @@ search=5Fsse=5F2(const struct rte=5Facl=5Fctx *ctx, co= nst uint8=5Ft **data, mm=5Fshuffle=5Finput64.m, mm=5Fones=5F16.m, mm=5Fbytes64.m, mm=5Ftype=5Fquad=5Frange64.m, flows.trans, &indicies); +#if 0 + /* Gather 4 bytes of input data for each stream. */ + input =3D MM=5FINSERT32(input, GET=5FNEXT=5F4BYTES(parms, = 1), 0); + input =3D MM=5FINSERT32(input, GET=5FNEXT=5F4BYTES(parms, = 1), 0); + + input =3D transition2(mm=5Findex=5Fmask64.m, input, + mm=5Fshuffle=5Finput64.m, mm=5Fones=5F16.m, + mm=5Fbytes64.m, mm=5Ftype=5Fquad=5Frange64.m, + flows.trans, &indicies); +#endif =20 /* Check for any matches. */ acl=5Fmatch=5Fcheck=5Fx2(0, ctx, parms, &flows, &indicies, diff --git a/lib/librte=5Facl/rte=5Facl.c b/lib/librte=5Facl/rte=5Facl.c index ea3ce3a..763dc72 100644 --- a/lib/librte=5Facl/rte=5Facl.c +++ b/lib/librte=5Facl/rte=5Facl.c @@ -168,6 +168,7 @@ rte=5Facl=5Fadd=5Frules(struct rte=5Facl=5Fctx *ctx, co= nst struct rte=5Facl=5Frule *rules, uint32=5Ft i; int32=5Ft rc; =20 + RTE=5FLOG(ERR, ACL, "\n --------HARSHA----------1"); if (ctx =3D=3D NULL || rules =3D=3D NULL || 0 =3D=3D ctx->rule=5Fsz) return -EINVAL; =20 diff --git a/lib/librte=5Facl/rte=5Facl.h b/lib/librte=5Facl/rte=5Facl.h index afc0f69..8127c3f 100644 --- a/lib/librte=5Facl/rte=5Facl.h +++ b/lib/librte=5Facl/rte=5Facl.h @@ -362,6 +362,7 @@ struct rte=5Facl=5Fipv4vlan=5Frule { uint16=5Ft src=5Fport=5Fhigh; /**< L4 source port high. */ uint16=5Ft dst=5Fport=5Flow; /**< L4 destination port low. */ uint16=5Ft dst=5Fport=5Fhigh; /**< L4 destination port high. */ + uint8=5Ft proto=5Fflags; /**< L4 protocol flags. */ }; =20 /** @@ -375,6 +376,7 @@ enum { RTE=5FACL=5FIPV4VLAN=5FDST=5FFIELD, RTE=5FACL=5FIPV4VLAN=5FSRCP=5FFIELD, RTE=5FACL=5FIPV4VLAN=5FDSTP=5FFIELD, + RTE=5FACL=5FIPV4VLAN=5FPROTO=5FFLAGS=5FFIELD, RTE=5FACL=5FIPV4VLAN=5FNUM=5FFIELDS }; =20 @@ -398,6 +400,7 @@ enum { RTE=5FACL=5FIPV4VLAN=5FSRC, RTE=5FACL=5FIPV4VLAN=5FDST, RTE=5FACL=5FIPV4VLAN=5FPORTS, + RTE=5FACL=5FIPV4VLAN=5FPROTO=5FFLAGS, RTE=5FACL=5FIPV4VLAN=5FNUM }; =20 Warm Regards, Santhosh Kumar Bendalam, Assistant Consultant, Tata Consultancy Services Limited | Synergy Park, Hyderabad, Andhra Pradesh= , India | +91-9949950400 -----"dev" wrote: -----=20 To: dev@dpdk.org From: Santhosh Bendalam=20 Sent by: "dev"=20 Date: 07/25/2014 08:30PM Subject: [dpdk-dev] Regarding new feature development in dpdk-acl Hi All, I am trying to add new acl rule support to filter the packets based on TCP = flags. I have followed the structure updates as per DPDK Programmers guide.= I have attached the code diff along with this mail. Some how packet filtering is not happening with our modifications.=20 Input configuration file used is (Here we are trying to restrict SYN+FIN fl= ag) @20.0.0.0/24 40.0.0.0/24 0 : 65535 0 : 65535 6/0xfe 0x3/0xFF R20.0.0.0/24 40.0.0.0/24 0 : 65535 0 : 65535 6/0xfe 0x0/0x00 1 R40.0.0.0/24 20.0.0.0/24 0 : 65535 0 : 65535 6/0xfe 0x0/0x00 1 Could you please share your thoughts on this problem. Warm Regards, Santhosh Kumar Bendalam, Assistant Consultant, Tata Consultancy Services Limited =3D=3D=3D=3D=3D-----=3D=3D=3D=3D=3D-----=3D=3D=3D=3D=3D Notice: The information contained in this e-mail message and/or attachments to it may contain=20 confidential or privileged information. If you are=20 not the intended recipient, any dissemination, use,=20 review, distribution, printing or copying of the=20 information contained in this e-mail message=20 and/or attachments to it are strictly prohibited. If=20 you have received this communication in error,=20 please notify us by reply e-mail or telephone and=20 immediately and permanently delete the message=20 and any attachments. Thank you >From mhall@mhcomputing.net Fri Jul 25 17:27:44 2014 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.46.186]) by dpdk.org (Postfix) with ESMTP id BEC6C592E for ; Fri, 25 Jul 2014 17:27:44 +0200 (CEST) Received: from 182-192-223-21.pools.spcsdns.net (66-87-118-182.pools.spcsdns.net [66.87.118.182]) by mail.mhcomputing.net (Postfix) with ESMTPSA id A906680C4EE; Fri, 25 Jul 2014 08:28:40 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <53D26C42.3060907@fixup.fi> References: <20140724075918.GA21277@mhcomputing.net> <53D18EFF.8080804@fixup.fi> <1432797.FfhxlLyX1P@xps13> <53D26C42.3060907@fixup.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: Matthew Hall Date: Fri, 25 Jul 2014 07:44:37 -0700 To: Antti Kantee , Thomas Monjalon , dev@dpdk.org Message-ID: <8d2a5eff-ea7c-4035-95ec-1e391c1cda38@email.android.com> Subject: Re: [dpdk-dev] symbol conflicts between netinet/in.h, arpa/inet.h, and rte_ip.h 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: Fri, 25 Jul 2014 15:27:45 -0000 If the bare metal mode is getting yanked, then I think we can go with Antti's advice and just yank the conflicting symbols and use the system versions. -- Sent from my mobile device. On July 25, 2014 7:40:02 AM PDT, Antti Kantee wrote: >On 25/07/14 10:43, Thomas Monjalon wrote: >>> On 24/07/14 07:59, Matthew Hall wrote: >>>> I ran into some weird symbol conflicts between system netinet/in.h >and DPDK >>>> rte_ip.h. They have a lot of duplicated definitions for stuff like >IPPROTO_IP >>>> and so on. This breaks when you want to use inet_pton from >arpa/inet.h, >>>> because it includes netinet/in.h to define struct in_addr. >> [...] >>> Again, I recommend steering away from any tightrope approaches that >>> "know" which types are non-conflicting, or pick out half-and-half >from >>> the host and IP stack. "Do, or do not, there is no half-and-half" >> >> The general problem here is that DPDK is conflicting with libc. >> So the obvious question would be: "why DPDK needs to redefine libc >stuff"? >> I don't see any obvious answer since bare metal is planned to be >removed. >> (see http://dpdk.org/ml/archives/dev/2014-June/003868.html) > >One reason is if you want DPDK to be a portable network programming >environment. Especially in that case you do not want definitions based > >on hackish assumptions of some particular version of some particular >host implementation. However, I'm not trying to argue if DPDK should >or >shouldn't be that, just that you should either dramatically improve the > >current implementation or nuke it.