Re: [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-30 Thread Matan Barak
On 12/30/2015 7:57 AM, Or Gerlitz wrote: On 12/23/2015 2:56 PM, Matan Barak wrote: +__be16 ib_ud_ip4_csum(struct ib_ud_header *header) +{ +struct iphdr iph; + +iph.ihl= 5; +iph.version= 4; +iph.tos= header->ip4.tos; +iph.tot_len= header->ip4.tot_len;

Re: [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-29 Thread Or Gerlitz
On 12/23/2015 2:56 PM, Matan Barak wrote: +__be16 ib_ud_ip4_csum(struct ib_ud_header *header) +{ + struct iphdr iph; + + iph.ihl = 5; + iph.version = 4; + iph.tos = header->ip4.tos; + iph.tot_len = header->ip4.tot_len; + iph.id

[PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-23 Thread Matan Barak
From: Moni Shoua ib_ud_header_init() is used to format InfiniBand headers in a buffer up to (but not with) BTH. For RoCE UDP ENCAP it is required that this function would be able to build also IP and UDP headers. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak --- drivers/infiniband/core