>
> I tried to create a completely new packet with my received mbuf, but still
>> 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 payload
>> 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 <satyavalli.r...@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Sat, Jun 29, 2019, 14:07 satyavalli rama <satyavalli.r...@gmail.com>
>>> 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, but
>>>> still packets are dropping or Not getting forwaded...
>>>> Plz help me..
>>>>
>>>> On Fri, Jun 28, 2019, 21:08 Stephen Hemminger <
>>>> step...@networkplumber.org> wrote:
>>>>
>>>>> On Thu, 27 Jun 2019 23:00:35 +0530
>>>>> satyavalli rama <satyavalli.r...@gmail.com> wrote:
>>>>>
>>>>> > Hi
>>>>> >
>>>>> >
>>>>> > With Scapy we are sending UDP Packets to ‘P0’ of DPDK - VM -1 as
>>>>> below
>>>>> >
>>>>> >
>>>>> >>>sendp(Ether(src="52:00:00:00:00:4a",dst="50:00:00:00:00:8F")/IP(dst="20.20.20.20",proto=17)/UDP(sport=4009,dport=4019)/Raw(load=('Helllo
>>>>> Basha')), iface="ens9", loop=1, count=10, inter=1.0002)
>>>>> >
>>>>> >
>>>>> > I'm modifying MAC address in l2fwd_simple_forward (52:00:00:00:AB:CD)
>>>>> > and calling the below API after mac updation, in the ‘l2fwd’ DPDK
>>>>> > Sample application.
>>>>> >
>>>>> > But I'm unable to receive the ‘Appended Data’ on the Destination
>>>>> Port.
>>>>> > P0 itself is dropping our packets...
>>>>> >
>>>>> > Without Appending the Payload/Data we are able to see our packets on
>>>>> > 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 = 0;
>>>>> >
>>>>> > const char *mess = "Eureka";
>>>>> >
>>>>> > char *newData = NULL;
>>>>> >
>>>>> > eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
>>>>> >
>>>>> > ipv4 = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,sizeof(struct
>>>>> ether_hdr));
>>>>> >
>>>>> > udp = rte_pktmbuf_mtod_offset(m, struct udp_hdr *, sizeof(struct
>>>>> > ether_hdr)+sizeof(struct ipv4_hdr));
>>>>> >
>>>>> > len = m->data_len;
>>>>> >
>>>>> > udpData = rte_pktmbuf_mtod_offset(m, char *, len);
>>>>> >
>>>>> > newData = rte_pktmbuf_append(m, 6);
>>>>> >
>>>>> > if (newData != NULL)
>>>>> >
>>>>> > rte_memcpy(newData, mess, 6);
>>>>> >
>>>>> >
>>>>> > len = m->data_len;
>>>>> >
>>>>> > udpData = 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.
>>>>>
>>>>

Reply via email to