compat: backport ethtool_rxfh_indir_default()

This was added via commit 278bc429:

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 278bc429
v3.3-rc1~182^2~191

commit 278bc4296bd64ffd1d3913b487dc8a520e423a7a
Author: Ben Hutchings <bhutchings@solarflare.com>
Date:   Thu Dec 15 13:56:49 2011 +0000

    ethtool: Define and apply a default policy for RX flow hash indirection

    All drivers that support modification of the RX flow hash indirection
    table initialise it in the same way: RX rings are assigned to table
    entries in rotation.  Make that default policy explicit by having them
    call a ethtool_rxfh_indir_default() function.

    In the ethtool core, add support for a zero size value for
    ETHTOOL_SRXFHINDIR, which resets the table to this default.

    Partly-suggested-by: Matt Carlson <mcarlson@broadcom.com>
    Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
    Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport ethtool to mii advertisment conversion helpers

Commit 28011cf1 added ethtool to mii advertisment conversion helpers.
We backport these here.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 28011cf1
v3.3-rc1~182^2~564

commit 28011cf19b75df9d3f35489a7599a97ec0b3f1a0
Author: Matt Carlson <mcarlson@broadcom.com>
Date:   Wed Nov 16 18:36:59 2011 -0500

    net: Add ethtool to mii advertisment conversion helpers

    Translating between ethtool advertisement settings and MII
    advertisements are common operations for ethernet drivers.  This patch
    adds a set of helper functions that implements the conversion.  The
    patch then modifies a couple of the drivers to use the new functions.

    Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
    Signed-off-by: Michael Chan <mchan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport BQL helpers

This backports the addition of Byte Queue Limit functional
helpers. BQL was added as of v3.3 but some Linux distributions
have backported BQL to their v3.2 kernels or older. To
address this we assume that they also enabled CONFIG_BQL
and test for that and simply avoid adding the BWL work
if CONFIG_BQL is defined.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains c5d67bd7
v3.3-rc1~182^2~426

commit c5d67bd78c5dc540e3461c36fb3d389fbe0de4c3
Author: Tom Herbert <therbert@google.com>
Date:   Mon Nov 28 16:32:52 2011 +0000

    net: Add netdev interfaces for recording sends/comp

    Add interfaces for drivers to call for recording number of packets and
    bytes at send time and transmit completion.  Also, added a function to
    "reset" a queue.  These will be used by Byte Queue Limits.

    Signed-off-by: Tom Herbert <therbert@google.com>
    Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

real    2m2.691s
user    8m34.724s
sys     2m7.708s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: define NETIF_F_RXCSUM

We can't really backport this so just define it.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains e83d360d
v2.6.39-rc1~468^2~336

commit e83d360d9a7e5d71d55c13e96b19109a2ea23bf0
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date:   Tue Feb 15 16:59:18 2011 +0000

    net: introduce NETIF_F_RXCSUM

    Introduce NETIF_F_RXCSUM to replace device-private flags for RX checksum
    offload. Integrate it with ndo_fix_features.

    ethtool_op_get_rx_csum() is removed altogether as nothing in-tree uses it.

    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Signed-off-by: David S. Miller <davem@davemloft.net>

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake

Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

real    1m59.783s
user    8m11.111s
sys     1m56.675s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fix addition of NETIF_F_RXCSUM

This needs to be defined to something and although
ckmake passed, no code was using it so we were unable
to test it at compile time really.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport PCI MSI-X entry definitions

The PCI MSI-X entries were moved to uapi headers on v2.6.38
to allow drivers to use it. Older kernels will need this.

mcgrof@frijol ~/linux-stable (git::linux-3.2.y)$ git describe --contains 00aaaef9
v2.6.38-rc1~55^2~15

commit 00aaaef9a51a1a25c5d6d52ce510772f149a0eb0
Author: Sheng Yang <sheng@linux.intel.com>
Date:   Thu Nov 11 15:46:54 2010 +0800

    PCI: MSI: Move MSI-X entry definition to pci_regs.h

    Then it can be used by others.

    Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
    Signed-off-by: Sheng Yang <sheng@linux.intel.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport alloc_etherdev_mqs()

This backports support for alloc_netdev_mqs(). The routine adds
support for specifying different TX queues and RX queues. In older
kernels we were only able to request the equal amount of queues for
both TX and RX. To backport this simply ignore the RX queue count.

The commit that added alloc_netdev_mq() with equal amount of TX
and RX queues was added via f25f4e44 onto kernel v2.6.23.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains  36909ea4
v2.6.38-rc1~50^2~46

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains f25f4e44
v2.6.23-rc1~1109^2~115

commit 36909ea43814cba34f7c921e99cba33d770a54e1
Author: Tom Herbert <therbert@google.com>
Date:   Sun Jan 9 19:36:31 2011 +0000

    net: Add alloc_netdev_mqs function

    Added alloc_netdev_mqs function which allows the number of transmit and
    receive queues to be specified independenty.  alloc_netdev_mq was
    changed to a macro to call the new function.  Also added
    alloc_etherdev_mqs with same purpose.

    Signed-off-by: Tom Herbert <therbert@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f25f4e44808f0f6c9875d94ef1c41ef86c288eb2
Author: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date:   Fri Jul 6 13:36:20 2007 -0700

    [CORE] Stack changes to add multiqueue hardware support API

    Add the multiqueue hardware device support API to the core network
    stack.  Allow drivers to allocate multiple queues and manage them at
    the netdev level if they choose to do so.

    Added a new field to sk_buff, namely queue_mapping, for drivers to
    know which tx_ring to select based on OS classification of the flow.

    Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
    Signed-off-by: Patrick McHardy <kaber@trash.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport definition of PCI_MSIX_ENTRY_CTRL_MASKBIT

This backports the addition of PCI_MSIX_ENTRY_CTRL_MASKBIT.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 8d805286968811223cca002134ba3d81244d5313
v2.6.38-rc1~55^2~14

commit 8d805286968811223cca002134ba3d81244d5313
Author: Sheng Yang <sheng@linux.intel.com>
Date:   Thu Nov 11 15:46:55 2010 +0800

    PCI: Add mask bit definition for MSI-X table

    Then we can use it instead of magic number 1.

    Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Cc: Matthew Wilcox <willy@linux.intel.com>
    Signed-off-by: Sheng Yang <sheng@linux.intel.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport PTR_RET()

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fa9ee9c4
v2.6.39-rc1~267

commit fa9ee9c4b9885dfdf8eccac19b8b4fc8a7c53288
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Tue Mar 22 16:34:05 2011 -0700

    include/linux/err.h: add a function to cast error-pointers to a return value

    PTR_RET() can be used if you have an error-pointer and are only interested
    in the eventual error value, but not the pointer.  Yields the usual 0 for
    no error, -ESOMETHING otherwise.

    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport netif_set_real_num_tx_queues()

This was added as of v2.6.35. We implement a slightly
modified version given that this was later changed
to return int through commit e6484930. The changes
on e6484930 however were added due to some internal
changes on core networking, we'll leave in place
a simpler implementation for older kernels.

Note that for older kernels than 2.6.27 we use
the netdev egress_subqueue_count to set the TX
queue count. Commit fd2ea0a7 added real_num_tx_queues
to the netdevice when Multiqueue was added.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains f0796d5c73e59786d09a1e617689d1d415f2db44
v2.6.35-rc5~14^2~14

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 3171d026
v2.6.37-rc1~147^2~339

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fd2ea0a7
v2.6.27-rc1~964^2~78

commit f0796d5c73e59786d09a1e617689d1d415f2db44
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Thu Jul 1 13:21:57 2010 +0000

    net: decreasing real_num_tx_queues needs to flush qdisc

    Reducing real_num_queues needs to flush the qdisc otherwise
    skbs with queue_mappings greater then real_num_tx_queues can
    be sent to the underlying driver.

    The flow for this is,

    dev_queue_xmit()
        dev_pick_tx()
                skb_tx_hash()  => hash using real_num_tx_queues
                skb_set_queue_mapping()
        ...
        qdisc_enqueue_root() => enqueue skb on txq from hash
    ...
    dev->real_num_tx_queues -= n
    ...
    sch_direct_xmit()
        dev_hard_start_xmit()
                ndo_start_xmit(skb,dev) => skb queue set with old hash

    skbs are enqueued on the qdisc with skb->queue_mapping set
    0 < queue_mappings < real_num_tx_queues.  When the driver
    decreases real_num_tx_queues skb's may be dequeued from the
    qdisc with a queue_mapping greater then real_num_tx_queues.

    This fixes a case in ixgbe where this was occurring with DCB
    and FCoE. Because the driver is using queue_mapping to map
    skbs to tx descriptor rings we can potentially map skbs to
    rings that no longer exist.

    Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
    Tested-by: Ross Brattain <ross.b.brattain@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit e6484930d7c73d324bccda7d43d131088da697b9
Author: Tom Herbert <therbert@google.com>
Date:   Mon Oct 18 18:04:39 2010 +0000

    net: allocate tx queues in register_netdevice

    This patch introduces netif_alloc_netdev_queues which is called from
    register_device instead of alloc_netdev_mq.  This makes TX queue
    allocation symmetric with RX allocation.  Also, queue locks allocation
    is done in netdev_init_one_queue.  Change set_real_num_tx_queues to
    fail if requested number < 1 or greater than number of allocated
    queues.

    Signed-off-by: Tom Herbert <therbert@google.com>
    Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit fd2ea0a79faad824258af5dcec1927aa24d81c16
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Jul 17 01:56:23 2008 -0700

    net: Use queue aware tests throughout.

    This effectively "flips the switch" by making the core networking
    and multiqueue-aware drivers use the new TX multiqueue structures.

    Non-multiqueue drivers need no changes.  The interfaces they use such
    as netif_stop_queue() degenerate into an operation on TX queue zero.
    So everything "just works" for them.

    Code that really wants to do "X" to all TX queues now invokes a
    routine that does so, such as netif_tx_wake_all_queues(),
    netif_tx_stop_all_queues(), etc.

    pktgen and netpoll required a little bit more surgery than the others.

    In particular the pktgen changes, whilst functional, could be largely
    improved.  The initial check in pktgen_xmit() will sometimes check the
    wrong queue, which is mostly harmless.  The thing to do is probably to
    invoke fill_packet() earlier.

    The bulk of the netpoll changes is to make the code operate solely on
    the TX queue indicated by by the SKB queue mapping.

    Setting of the SKB queue mapping is entirely confined inside of
    net/core/dev.c:dev_pick_tx().  If we end up needing any kind of
    special semantics (drops, for example) it will be implemented here.

    Finally, we now have a "real_num_tx_queues" which is where the driver
    indicates how many TX queues are actually active.

    With IGB changes from Jeff Kirsher.

    Signed-off-by: David S. Miller <davem@davemloft.net>

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

real    1m51.110s
user    4m58.571s
sys     1m39.282s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport netif_set_real_num_rx_queues()

netif_set_real_num_rx_queues() was added on v2.6.37 but
requires CONFIG_RPS support which was added on v2.6.35.
A few updates were done on the net core though to support
changing the number of RX queues if the device was already
registered. We can't support this on older kernels though
so the best we can do is for kernels >= 2.6.35 simply try
to update the num_rx_queues and if the device is registered
fail.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 62fe0b40
v2.6.37-rc1~147^2~340

commit 62fe0b40abb3484413800edaef9b087a20059acf
Author: Ben Hutchings <bhutchings@solarflare.com>
Date:   Mon Sep 27 08:24:33 2010 +0000

    net: Allow changing number of RX queues after device allocation

    For RPS, we create a kobject for each RX queue based on the number of
    queues passed to alloc_netdev_mq().  However, drivers generally do not
    determine the numbers of hardware queues to use until much later, so
    this usually represents the maximum number the driver may use and not
    the actual number in use.

    For TX queues, drivers can update the actual number using
    netif_set_real_num_tx_queues().  Add a corresponding function for RX
    queues, netif_set_real_num_rx_queues().

    Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

real    2m5.270s
user    8m51.501s
sys     2m1.576s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: rename MDIO exported symbols

compat-drivers now has support for carrying over the
MDIO module. To help it avoid clashes with already in
place drivers that rely on the older MDIO module we
rename the exported symbols of the shinier module with
a compat_ prefix.

An alternative to this strategy is to have compat-drivers
work under a separate namespace but we have yet to receive
patches for that, although we hear someone did it.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backplane mode negotiation ethtool definitions

This backports the ethtool definitions implemented on
commit 894b19a6.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 894b19a6
v2.6.31-rc1~14^2~577

commit 894b19a6b343ce3589237167a56e6df0fe72ef0d
Author: Ben Hutchings <bhutchings@solarflare.com>
Date:   Wed Apr 29 08:25:57 2009 +0000

    ethtool/mdio: Support backplane mode negotiation

    Compile-tested only.

    Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport napi_gro_receive()

Just call netif_receive_skb() for kernels older than
v2.6.29. If Enterprise Linux distributions decided to
backport GRO support onto a kernel older than 2.6.29,
they'll likely want #ifdef this out accordingly.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains d565b0a1
v2.6.29-rc1~581^2~181

commit d565b0a1a9b6ee7dff46e1f68b26b526ac11ae50
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Mon Dec 15 23:38:52 2008 -0800

    net: Add Generic Receive Offload infrastructure

    This patch adds the top-level GRO (Generic Receive Offload) infrastructure.
    This is pretty similar to LRO except that this is protocol-independent.
    Instead of holding packets in an lro_mgr structure, they're now held in
    napi_struct.

    For drivers that intend to use this, they can set the NETIF_F_GRO bit and
    call napi_gro_receive instead of netif_receive_skb or just call netif_rx.
    The latter will call napi_receive_skb automatically.  When napi_gro_receive
    is used, the driver must either call napi_complete/napi_rx_complete, or
    call napi_gro_flush in softirq context if the driver uses the primitives
    __napi_complete/__napi_rx_complete.

    Protocols will set the gro_receive and gro_complete function pointers in
    order to participate in this scheme.

    In addition to the packet, gro_receive will get a list of currently held
    packets.  Each packet in the list has a same_flow field which is non-zero
    if it is a potential match for the new packet.  For each packet that may
    match, they also have a flush field which is non-zero if the held packet
    must not be merged with the new packet.

    Once gro_receive has determined that the new skb matches a held packet,
    the held packet may be processed immediately if the new skb cannot be
    merged with it.  In this case gro_receive should return the pointer to
    the existing skb in gro_list.  Otherwise the new skb should be merged into
    the existing packet and NULL should be returned, unless the new skb makes
    it impossible for any further merges to be made (e.g., FIN packet) where
    the merged skb should be returned.

    Whenever the skb is merged into an existing entry, the gro_receive
    function should set NAPI_GRO_CB(skb)->same_flow.  Note that if an skb
    merely matches an existing entry but can't be merged with it, then
    this shouldn't be set.

    If gro_receive finds it pointless to hold the new skb for future merging,
    it should set NAPI_GRO_CB(skb)->flush.

    Held packets will be flushed by napi_gro_flush which is called by
    napi_complete and napi_rx_complete.

    Currently held packets are stored in a singly liked list just like LRO.
    The list is limited to a maximum of 8 entries.  In future, this may be
    expanded to use a hash table to allow more flows to be held for merging.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport unsigned netlink attribute accessors

These were added upstream in commit
4778e0be16c291ba6d9d55eeff3a6764fc84a071.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>