lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Apr 2013 06:45:32 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, Alexander Duyck <alexander.h.duyck@...el.com>,
	netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 02/11] ixgbe: Mask off check of frag_off as we only
 want fragment offset

On Fri, 2013-04-12 at 06:28 -0700, Eric Dumazet wrote:

> I wonder if you could use core functions instead of all this...
> 
> A simple wrapper would be :

Or more something like :

static noinline unsigned int ixgbe_get_headlen(unsigned char *data,
                                                u32 maxlen)
{
    struct skb fake;
    unsigned int res;

    if (maxlen < ETH_HLEN)
	return maxlen;

    fake->data = data + ETH_HLEN;
    fake->head = data;
    fake->data_len = 0;
    fake->len = maxlen - ETH_HLEN;
    skb_reset_network_header(&fake);
    res = __skb_get_poff(&fake);
    return res ? res + ETH_HLEN : maxlen;
}



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ