From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BF0A2A0096 for ; Mon, 3 Jun 2019 06:04:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B4302BE9; Mon, 3 Jun 2019 06:04:48 +0200 (CEST) Received: from vmx6666.tatacommunications.com (vmx6666.tatacommunications.com [115.114.148.229]) by dpdk.org (Postfix) with ESMTP id 6266CF64 for ; Mon, 3 Jun 2019 06:04:45 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.60,545,1549909800"; d="scan'208,217";a="644857463" Received: from inp44vdag05.vsnl.co.in ([121.244.253.39]) by mx6-2.tatacommunications.com with ESMTP; 03 Jun 2019 09:34:43 +0530 Received: from inp44vdag04.vsnl.co.in (2002:79f4:fd11::79f4:fd11) by inp44vdag05.vsnl.co.in (2002:79f4:fd27::79f4:fd27) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 3 Jun 2019 09:34:43 +0530 Received: from inp44vpex002.vsnl.co.in (10.132.13.23) by inp44vdag04.vsnl.co.in (121.244.253.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2 via Frontend Transport; Mon, 3 Jun 2019 09:34:43 +0530 Received: from APC01-HK2-obe.outbound.protection.outlook.com (104.47.124.55) by mail.tatacommunications.com (10.132.13.23) with Microsoft SMTP Server (TLS) id 14.3.382.0; Mon, 3 Jun 2019 09:34:43 +0530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tatacommunications.onmicrosoft.com; s=selector1-tatacommunications-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rC83X3XJvjsJp98oTbodqgFMdz5cQxFCGa1OaGEa6GQ=; b=qx9ydw4GfYpwldW8LDCU0APti3WD+tDVvaPaGVyJKeFaW1ulkTWdRD33v3hhzLqhXVFy1E0De+J6L5IOPNatq+NM/rTwoRk1Pb0+gogevE6x+YuXF0zuPwWsr8MTpILLFYTZMPI47mOfPrEN5Xs1uvdZct55+ZAEwnB4cyryqYI= Received: from SG2PR04MB3596.apcprd04.prod.outlook.com (20.178.156.202) by SG2PR04MB2971.apcprd04.prod.outlook.com (20.177.13.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.17; Mon, 3 Jun 2019 04:04:41 +0000 Received: from SG2PR04MB3596.apcprd04.prod.outlook.com ([fe80::591d:901:942f:e6d7]) by SG2PR04MB3596.apcprd04.prod.outlook.com ([fe80::591d:901:942f:e6d7%6]) with mapi id 15.20.1943.018; Mon, 3 Jun 2019 04:04:41 +0000 From: Prashanth Fernando To: "users@dpdk.org" Thread-Topic: Clone logic doesn't seem to work (using DPDK 17-11.1) Thread-Index: AdUZwV2nFWTUvykUT46dTFKm4IM4QA== Date: Mon, 3 Jun 2019 04:04:41 +0000 Message-ID: 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=prashanth.fernando@tatacommunications.com; x-originating-ip: [2405:201:e804:2e7b:986b:8f69:dbb5:da33] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c77b2052-2c1e-421f-47ef-08d6e7d89ac8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:SG2PR04MB2971; x-ms-traffictypediagnostic: SG2PR04MB2971: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0057EE387C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(366004)(376002)(136003)(189003)(199004)(2501003)(86362001)(2906002)(74316002)(6916009)(316002)(256004)(71190400001)(71200400001)(14444005)(8676002)(1730700003)(2351001)(99286004)(44832011)(102836004)(8936002)(6506007)(9326002)(81166006)(81156014)(6116002)(790700001)(68736007)(476003)(486006)(186003)(46003)(7736002)(7696005)(55016002)(6436002)(66946007)(25786009)(52536014)(5640700003)(478600001)(66446008)(76116006)(14454004)(5660300002)(66476007)(33656002)(64756008)(9686003)(53936002)(73956011)(54896002)(6306002)(66556008); DIR:OUT; SFP:1101; SCL:1; SRVR:SG2PR04MB2971; H:SG2PR04MB3596.apcprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: tatacommunications.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: EuuFN7x+VfOFmvToHL1c7YuwrlZKhbCkqyIKjFer0tPvu347FKYiQNlCwd5sz0EhJ8tLpS7iMgNUrPjsEBd/ArJS9Io6L9fmRRYzpmv1/ixfeVVzv4X5hNxZ8GnsOM/ooWGoREqiu2k+PS2PEFSKSnHJlAvVrSKcnO4FjBpsOpBLG1CSgIS8Gl4Y/LMb6H3s8ge3fQKyDeBw+5FWk+wKyZAC/NGIwJeTjt2/FrL6trKW5mqQyZIJFtAVABvDJ5qtbUFou9rKejT+U0dmYMN7J9bm3nPaLZhBvjM4Cq4b6sGKjHEsGWzcEG5uAyQWSajTLKL9heE3d28jtMdSkZ4nZtX6/iQaXV+SCSa5m55kl+2eyQ629zAAgsU/ndfIS+X2wLq3Om2L+lAF9Ft4dkfIjbLR8BOO647JPE64JIJgQts= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c77b2052-2c1e-421f-47ef-08d6e7d89ac8 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2019 04:04:41.4113 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 20210462-2c5e-4ec8-b3e2-0be950f292ca X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: prashanth.fernando@tatacommunications.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR04MB2971 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Clone logic doesn't seem to work (using DPDK 17-11.1) X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi, I am trying UDP replication in DPDK-17.11.1. For replication I a trying to have a linked buffer, the header buffer will = contain Ethernet/Ip header and the rest will be in second segment. When I tx the packet, I see only the Ethernet/IP header(first segment) the = rest of the contents (in the second segment) is missing. I am tx the packet using rte_port_ring_writer_tx(). Not sure what I am missing, can you please let me know on how to debug this= issue. Tx_Logic in f_run function if (likely ((mc =3D clone_out_pkt(m)) !=3D NULL)) { update_headers_in_clone (mc, ð_head, &in_hdr); if (port_out_id =3D=3D 4) port_out_id =3D 0; struct rte_port_out *port_out =3D &p->ports_out[port_out_id]; /* Output port user actions */ if (port_out->f_action =3D=3D NULL) /* Output port TX */ port_out->ops.f_tx(port_out->h_port, mc); port_out_id++; } Clone Logic static inline struct rte_mbuf * clone_out_pkt(struct rte_mbuf *pkt) { struct rte_mbuf *hdr; /* Create new mbuf for the header. */ if (unlikely ((hdr =3D rte_pktmbuf_alloc(header_pool)) =3D=3D NULL)= ) return NULL; /* If requested, then make a new clone packet. */ if (unlikely ((pkt =3D rte_pktmbuf_clone(pkt, clone_pool)) =3D=3D N= ULL)) { rte_pktmbuf_free(hdr); return NULL; } /* prepend new header */ hdr->next =3D pkt; /* update header's fields */ hdr->pkt_len =3D (uint16_t)(pkt->pkt_len); hdr->nb_segs =3D pkt->nb_segs + 1; } Tks, Prashanth