DPDK usage discussions
 help / color / Atom feed
* [dpdk-users] IP Reassembly with more 4 packets crash
@ 2019-08-13  3:07 Abhijeet Baruah
  2019-08-13  3:29 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Abhijeet Baruah @ 2019-08-13  3:07 UTC (permalink / raw)
  To: users

Hi,

I have looked at previous mails on this mailing list and also elsewhere on
Google and could not find any information related to this.

Whenever I have to reassemble a valid IP packet with more than 4 fragments,
I see a crash. Stack trace below. I assume the number 4 comes
from RTE_LIBRTE_IP_FRAG_MAX_FRAG.

(gdb) bt
#0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry=0x7ffff6eeee10,
tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
    stale=stale@entry=0x7ffff6eeedc0) at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
#1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
tms=2602613353715115)
    at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
#2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
(tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
out>,
    ip_hdr=<optimized out>) at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160

(gdb) f 0
#0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry=0x7ffff6eeee10,
tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
    stale=stale@entry=0x7ffff6eeedc0) at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
379 if (ip_frag_key_cmp(key, &p1[i].key) == 0)

(gdb) f 1
#1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
tms=2602613353715115)
    at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
286 if ((pkt = ip_frag_lookup(tbl, key, tms, &free, &stale)) == NULL) {

(gdb) f 2
#2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
(tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
out>,
    ip_hdr=<optimized out>) at
/usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160
160 if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {

Is this a known issue? Are there any workaround?

Regards,
Abhijeet

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] IP Reassembly with more 4 packets crash
  2019-08-13  3:07 [dpdk-users] IP Reassembly with more 4 packets crash Abhijeet Baruah
@ 2019-08-13  3:29 ` Stephen Hemminger
  2019-08-13  4:59   ` Abhijeet Baruah
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-08-13  3:29 UTC (permalink / raw)
  To: Abhijeet Baruah; +Cc: users

On Tue, 13 Aug 2019 08:37:09 +0530
Abhijeet Baruah <abhijeet080808@gmail.com> wrote:

> Hi,
> 
> I have looked at previous mails on this mailing list and also elsewhere on
> Google and could not find any information related to this.
> 
> Whenever I have to reassemble a valid IP packet with more than 4 fragments,
> I see a crash. Stack trace below. I assume the number 4 comes
> from RTE_LIBRTE_IP_FRAG_MAX_FRAG.
> 
> (gdb) bt
> #0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry=0x7ffff6eeee10,
> tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
>     stale=stale@entry=0x7ffff6eeedc0) at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
> #1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
> dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
> tms=2602613353715115)
>     at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
> #2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
> (tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
> out>,  
>     ip_hdr=<optimized out>) at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160
> 
> (gdb) f 0
> #0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry=0x7ffff6eeee10,
> tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
>     stale=stale@entry=0x7ffff6eeedc0) at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
> 379 if (ip_frag_key_cmp(key, &p1[i].key) == 0)
> 
> (gdb) f 1
> #1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
> dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
> tms=2602613353715115)
>     at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
> 286 if ((pkt = ip_frag_lookup(tbl, key, tms, &free, &stale)) == NULL) {
> 
> (gdb) f 2
> #2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
> (tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
> out>,  
>     ip_hdr=<optimized out>) at
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160
> 160 if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {
> 
> Is this a known issue? Are there any workaround?
> 
> Regards,
> Abhijeet

Please try and reproduce with latest DPDK 19.08.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] IP Reassembly with more 4 packets crash
  2019-08-13  3:29 ` Stephen Hemminger
@ 2019-08-13  4:59   ` Abhijeet Baruah
  0 siblings, 0 replies; 3+ messages in thread
From: Abhijeet Baruah @ 2019-08-13  4:59 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

I had been making a mistake. My code was of format -

if (rte_ipv4_frag_pkt_is_fragmented(ipv4_header))
{
  rte_mbuf* assembled_msg = rte_ipv4_frag_reassemble_packet();
  if (assembled_msg != nullptr)
  {
    rte_ip_frag_free_death_row();
  }
}

The rte_ip_frag_free_death_row was NOT getting called when reassembly was
failing, as it was in my case of > 4 IP fragments. The fix is to call
rte_ip_frag_free_death_row irrespective of reassembly status.

On Tue, Aug 13, 2019 at 8:59 AM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Tue, 13 Aug 2019 08:37:09 +0530
> Abhijeet Baruah <abhijeet080808@gmail.com> wrote:
>
> > Hi,
> >
> > I have looked at previous mails on this mailing list and also elsewhere
> on
> > Google and could not find any information related to this.
> >
> > Whenever I have to reassemble a valid IP packet with more than 4
> fragments,
> > I see a crash. Stack trace below. I assume the number 4 comes
> > from RTE_LIBRTE_IP_FRAG_MAX_FRAG.
> >
> > (gdb) bt
> > #0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry
> =0x7ffff6eeee10,
> > tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
> >     stale=stale@entry=0x7ffff6eeedc0) at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
> > #1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
> > dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
> > tms=2602613353715115)
> >     at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
> > #2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
> > (tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
> > out>,
> >     ip_hdr=<optimized out>) at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160
> >
> > (gdb) f 0
> > #0  ip_frag_lookup (tbl=tbl@entry=0x7fff7a32ce80, key=key@entry
> =0x7ffff6eeee10,
> > tms=tms@entry=2602613353715115, free=free@entry=0x7ffff6eeedb8,
> >     stale=stale@entry=0x7ffff6eeedc0) at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:379
> > 379 if (ip_frag_key_cmp(key, &p1[i].key) == 0)
> >
> > (gdb) f 1
> > #1  0x00007ffff7c021f6 in ip_frag_find (tbl=tbl@entry=0x7fff7a32ce80,
> > dr=dr@entry=0x7fff7a32c900, key=key@entry=0x7ffff6eeee10,
> > tms=2602613353715115)
> >     at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/ip_frag_internal.c:286
> > 286 if ((pkt = ip_frag_lookup(tbl, key, tms, &free, &stale)) == NULL) {
> >
> > (gdb) f 2
> > #2  0x00007ffff7c00280 in rte_ipv4_frag_reassemble_packet
> > (tbl=0x7fff7a32ce80, dr=0x7fff7a32c900, mb=0x7fff8b71b480, tms=<optimized
> > out>,
> >     ip_hdr=<optimized out>) at
> >
> /usr/src/debug/dpdk-17.11.2-6.fc30.x86_64/lib/librte_ip_frag/rte_ipv4_reassembly.c:160
> > 160 if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {
> >
> > Is this a known issue? Are there any workaround?
> >
> > Regards,
> > Abhijeet
>
> Please try and reproduce with latest DPDK 19.08.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13  3:07 [dpdk-users] IP Reassembly with more 4 packets crash Abhijeet Baruah
2019-08-13  3:29 ` Stephen Hemminger
2019-08-13  4:59   ` Abhijeet Baruah

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox