[ovs-discuss] Help adding SCTP support to OVS

Jesse Gross jesse at nicira.com
Wed Aug 3 04:26:56 UTC 2011


On Wed, Aug 3, 2011 at 5:43 AM, Aaron Rosen <arosen at clemson.edu> wrote:
> Hello,
>
> I would like to add SCTP support to OVS but I'm running into a couple
> difficulties.

Thanks, it is always great to have support for more protocols.

> After making my chances for sctp when I go to load openvswitch_mod.ko
> I get the following message from dmesg:
>  openvswitch_mod: Unknown symbol sctp_statistics (err 0)

This is because that symbol is not exported for use in modules.  It is
presumably being invoked by this line in set_tp_port();
SCTP_INC_STATS_BH(SCTP_MIB_CHECKSUMERRORS);

I'm guessing that's just for testing?  I'm not sure why you're
validating the checksum before modifying the packet.

> SCTP has near the same packet header as TCP and UDP as the first 4
> bytes of the header contain the source/dest ports.  One of the major
> differences though is that SCTP has a 4byte checksum vs UDP/TCP's 2. I
> see in datapath/action.c you handle UDP/TCP the same here. I've added
> some code here which checks OVS_CB(skb)->flow->key.ip.proto to check
> for the protocol type and then perform the checksum correctly for each
> type.

I would look through the checksum update code carefully.  As you say,
it is probably the largest differentiating factor from TCP/UDP.  For
example, it appears to miss data in frags (as oppose to the
frag_lists, which, confusingly, is what is traversed by
skb_walk_frags()).

> In lib/dpif-netdev.c, dp_netdev_set_addr() I'm not exactly sure how to
> update the checksum here.

The function that you're invoking computes an IP style one's
complement checksum.  However, SCTP uses CRC32.  If you want to be
able to modify SCTP packets, you'll have to implement that.



More information about the discuss mailing list