From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Matti Suominen <matti.suominen@wapice.com>
Cc: "Lassi Niemistö" <lassi.niemisto@wapice.com>,
"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] A fix to few generic issues in rttcp stack
Date: Mon, 2 May 2016 09:10:34 +0200 [thread overview]
Message-ID: <20160502071034.GD1761@hermes.click-hack.org> (raw)
In-Reply-To: <4b738c3a791c4b80af77c3ae52f304bd@EDB3.wapice.localdomain>
On Mon, May 02, 2016 at 06:32:46AM +0000, Matti Suominen wrote:
> Hi and sorry for delay.
>
> Yes, we are using rtnetproxy and I am now testing fallback handler. I'm
> not sure am I using it right way but it seems to work correctly. Code
> snippet at end of message.
>
> Matti Suominen
> Wapice Oy
> www.wapice.com
>
> On Sun, Apr 03, 2016 at 09:09:48PM +0200, Gilles Chanteperdrix wrote:
>
> > I am going to merge your patch for the time being. However, I have a
> > question about using rttcp in parallel with Linux tcp: are you using
> > the rtnetproxy module? If yes, then testing for
> > CONFIG_XENO_DRIVERS_NET_ADDON_PROXY and the rt_ip_fallback_handler
> > pointer would be the way to go.
>
>
> --- tcp.c ---
> static struct rtsocket *rt_tcp_dest_socket(struct rtskb *skb)
> {
> struct tcphdr *th = skb->h.th;
>
> u32 saddr = skb->nh.iph->saddr;
> u32 daddr = skb->nh.iph->daddr;
> u32 sport = th->source;
> u32 dport = th->dest;
>
> u32 data_len;
>
> if (tcp_v4_check(skb->len, saddr, daddr,
> csum_partial(skb->data, skb->len, 0))) {
> rtdm_printk("rttcp: invalid TCP packet checksum, dropped\n");
> return NULL; /* Invalid checksum, drop the packet */
> }
>
> /* find the destination socket */
> if ((skb->sk = rt_tcp_v4_lookup(daddr, dport)) == NULL) {
> /*
> rtdm_printk("Not found addr:0x%08x, port: 0x%04x\n", daddr, dport);
> */
> #ifdef CONFIG_RTNET_ADDON_PROXY
> if (rt_ip_fallback_handler) {
> /* If a fallback handler for IP protocol has been installed,
> * call it. */
> rt_ip_fallback_handler(skb);
> }
> #endif
You do not need to call rt_ip_fallback_handler, it will be called by
ip_input.c when dest_socket returns NULL. However, you need to
return, otherwise the RST|ACK is sent, which is what you wanted to
avoid.
--
Gilles.
https://click-hack.org
next prev parent reply other threads:[~2016-05-02 7:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 10:33 [Xenomai] A fix to few generic issues in rttcp stack Matti Suominen
2016-03-31 10:44 ` Gilles Chanteperdrix
2016-03-31 16:22 ` Gilles Chanteperdrix
2016-04-01 9:36 ` Matti Suominen
2016-04-01 10:40 ` Gilles Chanteperdrix
2016-04-03 19:09 ` Gilles Chanteperdrix
2016-04-30 6:49 ` Gilles Chanteperdrix
2016-05-02 6:32 ` Matti Suominen
2016-05-02 7:10 ` Gilles Chanteperdrix [this message]
2016-05-03 4:54 ` Matti Suominen
2016-05-03 5:55 ` Gilles Chanteperdrix
2016-06-13 14:01 ` [Xenomai] PowerPC hardware watchpoints unstable with GDB and Xenomai Lassi Niemistö
2016-06-13 14:30 ` Gilles Chanteperdrix
2016-06-13 15:14 ` Lassi Niemistö
2016-06-13 15:20 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160502071034.GD1761@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=lassi.niemisto@wapice.com \
--cc=matti.suominen@wapice.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.