From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF25EA0487 for ; Tue, 2 Jul 2019 09:49:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A18F91B945; Tue, 2 Jul 2019 09:49:00 +0200 (CEST) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by dpdk.org (Postfix) with ESMTP id A1C257CBC; Tue, 2 Jul 2019 09:48:59 +0200 (CEST) Received: by mail-io1-f48.google.com with SMTP id e5so34891898iok.4; Tue, 02 Jul 2019 00:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Ms9ZQE+A5vWAte+UUEhmj6ECHTbXP320wdMlgCkcCdw=; b=E8+AKNDv751v68X8+AUd1f+meJDwsSz69nKq9qg+IOptRc+gLMl1IgodAMZyVb+YpQ ZFcsoET5cpxQlAhlxlnVDkpKiJ7LG9PGYPvxHwAqnFmwARxDJtwHpHSSnn3ghSRmJ4Zi 8aoeYfO0ZfSBt/keOS6WlRhTy/XQ388i0a1Cg0aKcx31AigND67DKQVmVSp+sECwN5jS 38JTSGEjBBal13PcAjnk3woJCEjXIcLy+FJsAJahE23ckMxNLS4jKfLhhLosSW5GMUNy j7mj2nXO9PkNQeYN5XjYex5eExwUQGoP6tPcQD6sjXAhSvESJodFaVaY8ZvZzlsrozP0 e+lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Ms9ZQE+A5vWAte+UUEhmj6ECHTbXP320wdMlgCkcCdw=; b=oFY9L1KlXzIuV/lUK32nqt2zPVdREhYy1FwPmNDUyNEIzXZ+kOFsu/WWyie06x3KDi OQp3pMl2TUds8NADw1gIKXZv0u3Qbr1tKJY4Sy8BYiUpPIJi1ChcQSL8HLny6/+MAFuS 6fjVCC7MNhXw59e2anIi4PGOIX2dpWBlBsxEhDNPjUHdEYIFmb3TRUhSW8wUeBCVIjRl WcycMtp9LzQNKdHlbvFiFhX0Wf34zsxCNJDSaGvLTMzrA1vrmhvRwxp0LcPkaLpOV3yj 0klRDvZNjaAJ9hJwnMgCjMzmMe0WokKAee3bODHa5x69RQqwDgBTh4kdSPfyd0iL4e9W i1Aw== X-Gm-Message-State: APjAAAVLyzbAtK8CeSksF0zEd5qC/Bm1tMmkuTdUlJkcmObxOWb4z2zC /ojU5qRSEmFVObqrw8vYmS5No/+XJlvNsQ1fqdX/vkrY X-Google-Smtp-Source: APXvYqwVdiBaz/1NCSG7N+Et7mO1U5E1KNLy6E6JR44Wy8B/S9augP7z085f5oZP+nGvsnCe16Jc2MdZ3Vw6meMVD18= X-Received: by 2002:a02:cc8e:: with SMTP id s14mr4529130jap.142.1562053738857; Tue, 02 Jul 2019 00:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20190628083820.66680042@hermes.lan> In-Reply-To: From: satyavalli rama Date: Tue, 2 Jul 2019 13:18:46 +0530 Message-ID: To: dev-request@dpdk.org, users-request@dpdk.org, dev@dpdk.org, users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Unable to Forward the Packet after UDP Payload Modification 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" > > I tried to create a completely new packet with my received mbuf, but stil= l >> I'm unable to forward packets with the appended payload, (Im able to >> replace the RX payload but I'm unable to add or append additional payloa= d >> to the RX pkts).. >> >> If I'm changing IP Header Total Length or Checksum, the packets are not >> getting transmitted.. >> >> Kindly help me... >> >> Thanks >> Satya >> >> On Mon, Jul 1, 2019, 11:08 satyavalli rama >> wrote: >> >>> >>> >>> On Sat, Jun 29, 2019, 14:07 satyavalli rama >>> wrote: >>> >>>> I've modified a data of 12 bytes to the udp payload, and the same ive >>>> triednto add to the the IP header total length and udp dgram length, b= ut >>>> still packets are dropping or Not getting forwaded... >>>> Plz help me.. >>>> >>>> On Fri, Jun 28, 2019, 21:08 Stephen Hemminger < >>>> stephen@networkplumber.org> wrote: >>>> >>>>> On Thu, 27 Jun 2019 23:00:35 +0530 >>>>> satyavalli rama wrote: >>>>> >>>>> > Hi >>>>> > >>>>> > >>>>> > With Scapy we are sending UDP Packets to =E2=80=98P0=E2=80=99 of DP= DK - VM -1 as >>>>> below >>>>> > >>>>> > >>>>> >>>sendp(Ether(src=3D"52:00:00:00:00:4a",dst=3D"50:00:00:00:00:8F")/I= P(dst=3D"20.20.20.20",proto=3D17)/UDP(sport=3D4009,dport=3D4019)/Raw(load= =3D('Helllo >>>>> Basha')), iface=3D"ens9", loop=3D1, count=3D10, inter=3D1.0002) >>>>> > >>>>> > >>>>> > I'm modifying MAC address in l2fwd_simple_forward (52:00:00:00:AB:C= D) >>>>> > and calling the below API after mac updation, in the =E2=80=98l2fwd= =E2=80=99 DPDK >>>>> > Sample application. >>>>> > >>>>> > But I'm unable to receive the =E2=80=98Appended Data=E2=80=99 on th= e Destination >>>>> Port. >>>>> > P0 itself is dropping our packets... >>>>> > >>>>> > Without Appending the Payload/Data we are able to see our packets o= n >>>>> > the Destination Port. >>>>> > >>>>> > Please let me know whether this issue is with respect to appending = or >>>>> > buffering or checksum related... >>>>> > >>>>> > static void >>>>> > >>>>> > pkt_modify(struct rte_mbuf *m, unsigned dest_portid) >>>>> > >>>>> > { >>>>> > >>>>> > struct ether_hdr *eth; >>>>> > >>>>> > struct ipv4_hdr *ipv4; >>>>> > >>>>> > struct udp_hdr *udp; >>>>> > >>>>> > char *udpData; >>>>> > >>>>> > int len =3D 0; >>>>> > >>>>> > const char *mess =3D "Eureka"; >>>>> > >>>>> > char *newData =3D NULL; >>>>> > >>>>> > eth =3D rte_pktmbuf_mtod(m, struct ether_hdr *); >>>>> > >>>>> > ipv4 =3D rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,sizeof(struct >>>>> ether_hdr)); >>>>> > >>>>> > udp =3D rte_pktmbuf_mtod_offset(m, struct udp_hdr *, sizeof(struct >>>>> > ether_hdr)+sizeof(struct ipv4_hdr)); >>>>> > >>>>> > len =3D m->data_len; >>>>> > >>>>> > udpData =3D rte_pktmbuf_mtod_offset(m, char *, len); >>>>> > >>>>> > newData =3D rte_pktmbuf_append(m, 6); >>>>> > >>>>> > if (newData !=3D NULL) >>>>> > >>>>> > rte_memcpy(newData, mess, 6); >>>>> > >>>>> > >>>>> > len =3D m->data_len; >>>>> > >>>>> > udpData =3D rte_pktmbuf_mtod_offset(m, char *, sizeof(struct >>>>> > ether_hdr)+sizeof(struct ipv4_hdr)+ >>>>> > >>>>> > sizeof(struct udp_hdr)); >>>>> > >>>>> > return ; >>>>> > >>>>> > } >>>>> > >>>>> > >>>>> > Please help me on figuring out this.... >>>>> > >>>>> > Thanks, >>>>> > >>>>> > Satya Valli. >>>>> >>>>> You aren't changing the ip header length or checksum. >>>>> So your message at the end just looks like additional L2 trailer. >>>>> >>>>