All of lore.kernel.org
 help / color / mirror / Atom feed
* extra layer below inet layer.
@ 2007-06-07  4:40 Tej Parkash
  2007-06-07  5:25 ` Stephen Hemminger
  2007-06-07 10:30 ` kalash nainwal
  0 siblings, 2 replies; 4+ messages in thread
From: Tej Parkash @ 2007-06-07  4:40 UTC (permalink / raw)
  To: netdev

hi

i just want to have something like tcp layer sitting below inet layer.
so that i can directly offload everything to NIC
and i want it to be placed dynamically. so depending on the nic i can
offload the feature or can make it normal flow.
i.e. both layer should exist and normal functionality should not break.

this code is in af_inet.c

static struct inet_protosw inetsw_array[] =
{
       {
               .type =       SOCK_STREAM,
               .protocol =   IPPROTO_TCP,
               .prot =       &tcp_prot,
               .ops =        &inet_stream_ops,
               .capability = -1,
               .no_check =   0,
               .flags =      INET_PROTOSW_PERMANENT |
                             INET_PROTOSW_ICSK,
       },

       {
               .type =       SOCK_DGRAM,
               .protocol =   IPPROTO_UDP,
               .prot =       &udp_prot,
               .ops =        &inet_dgram_ops,
               .capability = -1,
               .no_check =   UDP_CSUM_DEFAULT,
               .flags =      INET_PROTOSW_PERMANENT,
      },


      {
              .type =       SOCK_RAW,
              .protocol =   IPPROTO_IP,        /* wild card */
              .prot =       &raw_prot,
              .ops =        &inet_sockraw_ops,
              .capability = CAP_NET_RAW,
              .no_check =   UDP_CSUM_DEFAULT,
              .flags =      INET_PROTOSW_REUSE,
      }
};

i was just going through the code i found that if i can regsiter above
kind of registration dynamically i will be able to do that.
i have tried to do that but since normal tcp registered this at boot
up time i am not able to unregister this dynamically

so is it possible to unregister tcp and register my protocol dynamically.

thanks
TEJ

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

* Re: extra layer below inet layer.
  2007-06-07  4:40 extra layer below inet layer Tej Parkash
@ 2007-06-07  5:25 ` Stephen Hemminger
  2007-06-07 10:30 ` kalash nainwal
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-06-07  5:25 UTC (permalink / raw)
  To: Tej Parkash; +Cc: netdev

On Thu, 7 Jun 2007 10:10:44 +0530
"Tej Parkash" <tejparkash.d@gmail.com> wrote:

> hi
> 
> i just want to have something like tcp layer sitting below inet layer.
> so that i can directly offload everything to NIC
> and i want it to be placed dynamically. so depending on the nic i can
> offload the feature or can make it normal flow.
> i.e. both layer should exist and normal functionality should not break.
>
NIC protocol offloading is a contentious subject since it bypasses
all the security and restricts usefulness of the device for VLAN's,
bonding, bridging, etc.


-- 
Stephen Hemminger <shemminger@linux-foundation.org>

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

* Re: extra layer below inet layer.
  2007-06-07  4:40 extra layer below inet layer Tej Parkash
  2007-06-07  5:25 ` Stephen Hemminger
@ 2007-06-07 10:30 ` kalash nainwal
  2007-06-07 10:33   ` kalash nainwal
  1 sibling, 1 reply; 4+ messages in thread
From: kalash nainwal @ 2007-06-07 10:30 UTC (permalink / raw)
  To: Tej Parkash; +Cc: netdev

On 6/7/07, Tej Parkash <tejparkash.d@gmail.com> wrote:
> hi
>
> i just want to have something like tcp layer sitting below inet layer.
> so that i can directly offload everything to NIC
> and i want it to be placed dynamically. so depending on the nic i can
> offload the feature or can make it normal flow.
> i.e. both layer should exist and normal functionality should not break.
>
> this code is in af_inet.c
>
> static struct inet_protosw inetsw_array[] =
> {
>        {
>                .type =       SOCK_STREAM,
>                .protocol =   IPPROTO_TCP,
>                .prot =       &tcp_prot,
>                .ops =        &inet_stream_ops,
>                .capability = -1,
>                .no_check =   0,
>                .flags =      INET_PROTOSW_PERMANENT |
>                              INET_PROTOSW_ICSK,
>        },
>
>        {
>                .type =       SOCK_DGRAM,
>                .protocol =   IPPROTO_UDP,
>                .prot =       &udp_prot,
>                .ops =        &inet_dgram_ops,
>                .capability = -1,
>                .no_check =   UDP_CSUM_DEFAULT,
>                .flags =      INET_PROTOSW_PERMANENT,
>       },
>
>
>       {
>               .type =       SOCK_RAW,
>               .protocol =   IPPROTO_IP,        /* wild card */
>               .prot =       &raw_prot,
>               .ops =        &inet_sockraw_ops,
>               .capability = CAP_NET_RAW,
>               .no_check =   UDP_CSUM_DEFAULT,
>               .flags =      INET_PROTOSW_REUSE,
>       }
> };
>
> i was just going through the code i found that if i can regsiter above
> kind of registration dynamically i will be able to do that.
> i have tried to do that but since normal tcp registered this at boot
> up time i am not able to unregister this dynamically
>
> so is it possible to unregister tcp and register my protocol dynamically.

inet_unregister_protosw()/inet_register_protosw().

-Kalash

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

* Re: extra layer below inet layer.
  2007-06-07 10:30 ` kalash nainwal
@ 2007-06-07 10:33   ` kalash nainwal
  0 siblings, 0 replies; 4+ messages in thread
From: kalash nainwal @ 2007-06-07 10:33 UTC (permalink / raw)
  To: Tej Parkash; +Cc: netdev

> >
> > so is it possible to unregister tcp and register my protocol dynamically.
>
> inet_unregister_protosw()/inet_register_protosw().

oops...can't unregister tcp (permanent protocol).

>
> -Kalash
>

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

end of thread, other threads:[~2007-06-07 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07  4:40 extra layer below inet layer Tej Parkash
2007-06-07  5:25 ` Stephen Hemminger
2007-06-07 10:30 ` kalash nainwal
2007-06-07 10:33   ` kalash nainwal

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.