[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D1C2B1EC-ABE8-4D87-9227-6D0F1C1C8B77@guavus.com>
Date: Mon, 10 May 2010 14:55:40 +0000
From: Bijay Singh <Bijay.Singh@...vus.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Stephen Hemminger <shemminger@...tta.com>,
David Miller <davem@...emloft.net>,
"<bhaskie@...il.com>" <bhaskie@...il.com>,
"<bhutchings@...arflare.com>" <bhutchings@...arflare.com>,
"<netdev@...r.kernel.org>" <netdev@...r.kernel.org>
Subject: Re: TCP-MD5 checksum failure on x86_64 SMP
Hi,
I had noticed the corruption in the context and actually did what is mentioned.
I allocated the context on the stack and plugged in the md5.c functions. I was able to temporarily solve the problem, all this before I got a response on this thread.
But now I have seeing another problem, when i change the MTU on the interface from 1500 to 4470 none of the message from the peer get thru and I get hash failed message. I am wondering if this is another bug getting hit in this scenario.
Regards,
Bijay
On 08-May-2010, at 3:10 AM, Eric Dumazet wrote:
> Le vendredi 07 mai 2010 à 10:36 -0700, Stephen Hemminger a écrit :
>> On Fri, 07 May 2010 19:21:33 +0200
>> Eric Dumazet <eric.dumazet@...il.com> wrote:
>>
>>> Le vendredi 07 mai 2010 à 10:14 -0700, Stephen Hemminger a écrit :
>>>
>>>> Forget the per cpu data; the pool should just be scrapped.
>>>>
>>>> The only reason the pool exists is that the crypto hash state which
>>>> should just be moved into the md5_info (88 bytes). The pseudo
>>>> header can just be generated on the stack before passing to the crypto
>>>> code.
>>>
>>>
>>> Sure, but I'm afraid there is no generic API do do that (if we want to
>>> reuse crypto/md5.c code).
>>
>> It looks like the pool is just an optimization to avoid opening too
>> many crypto API connections. This should only be an issue if offloading
>> MD5.
>
> You mean we could allocate two contexts per socket, one for tx path, one
> for rx path, but TCP-MD5 implementors chose to use percpu allocations to
> factorize them. They should have allocated two contexts per cpu (one for
> process context, preemption disabled, one for BH context)
>
> As you said, this could be allocated on stack, with some changes to
> crypto API I guess. Since TCP is not a module, md5 is also static, so
> there is no module loading involved.
>
> struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32
> type,u32 mask)
>
> -->
>
> struct crypto_tfm *__crypto_alloc_tfm_onstack(struct crypto_alg *alg,
> u32 type, u32 mask, void *storage, size_t storage_max_length)
>
>
> Or a direct plug to crypto/md5.c functions and hand crafted context.
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists