2019-05-27 08:55:01 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-05-05 16:16:16 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-24 11:46:01 -08:00
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-28 16:49:13 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-11 20:06:54 +00:00
|
|
|
|
2007-09-26 22:10:56 -07:00
|
|
|
|
2010-06-22 12:44:11 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-08-31 19:50:58 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-04-17 22:03:10 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-03-11 20:06:54 +00:00
|
|
|
|
2018-10-19 19:11:26 -07:00
|
|
|
|
|
|
|
|
|
2022-03-02 11:55:31 -08:00
|
|
|
|
2018-10-19 19:11:26 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-02-12 00:38:38 +01:00
|
|
|
|
2013-01-25 07:44:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-17 22:03:10 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-04-17 22:03:10 +00:00
|
|
|
|
2022-02-12 00:38:38 +01:00
|
|
|
|
2019-11-07 16:27:15 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-23 06:03:08 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-11-07 16:27:14 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-07 16:27:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-28 01:56:37 -08:00
|
|
|
|
2006-10-18 20:51:57 -07:00
|
|
|
|
2010-06-22 12:44:11 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-09-23 23:51:51 +00:00
|
|
|
|
2010-06-22 12:44:11 +00:00
|
|
|
|
2014-03-13 21:26:42 -07:00
|
|
|
|
2019-11-07 16:27:22 -08:00
|
|
|
|
|
|
|
|
|
2014-03-13 21:26:42 -07:00
|
|
|
|
2019-11-07 16:27:14 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-11-07 16:27:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-18 20:51:57 -07:00
|
|
|
|
|
|
|
|
|
2009-04-17 22:03:10 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-09-27 20:33:34 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-13 14:30:00 -04:00
|
|
|
|
2006-09-27 20:33:34 -07:00
|
|
|
|
2019-04-12 13:06:14 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-09-26 22:08:12 -07:00
|
|
|
|
|
|
|
|
|
2014-02-13 11:46:28 -08:00
|
|
|
|
2010-09-23 23:51:51 +00:00
|
|
|
|
2007-09-26 22:08:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-16 16:52:41 -07:00
|
|
|
|
2010-09-23 23:51:51 +00:00
|
|
|
|
2007-09-26 22:08:12 -07:00
|
|
|
|
|
|
|
|
|
2008-11-19 21:46:18 -08:00
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
|
|
|
|
|
2010-06-14 05:59:22 +00:00
|
|
|
|
2014-02-11 17:21:26 -08:00
|
|
|
|
2008-11-19 21:46:18 -08:00
|
|
|
|
|
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
2017-02-07 15:57:20 -05:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-18 10:30:32 +02:00
|
|
|
|
2014-10-05 18:38:35 -07:00
|
|
|
|
2016-06-02 15:05:38 -03:00
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
2016-06-02 15:05:38 -03:00
|
|
|
|
2011-11-15 15:29:55 +00:00
|
|
|
|
2011-02-15 16:59:18 +00:00
|
|
|
|
2015-12-14 11:19:41 -08:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
2011-04-14 06:07:04 +00:00
|
|
|
|
2011-05-04 15:30:11 +00:00
|
|
|
|
|
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using
netdev_ops->ndo_init(). However, the release of these resources
can occur in one of two different places.
Either netdev_ops->ndo_uninit() or netdev->destructor().
The decision of which operation frees the resources depends upon
whether it is necessary for all netdev refs to be released before it
is safe to perform the freeing.
netdev_ops->ndo_uninit() presumably can occur right after the
NETDEV_UNREGISTER notifier completes and the unicast and multicast
address lists are flushed.
netdev->destructor(), on the other hand, does not run until the
netdev references all go away.
Further complicating the situation is that netdev->destructor()
almost universally does also a free_netdev().
This creates a problem for the logic in register_netdevice().
Because all callers of register_netdevice() manage the freeing
of the netdev, and invoke free_netdev(dev) if register_netdevice()
fails.
If netdev_ops->ndo_init() succeeds, but something else fails inside
of register_netdevice(), it does call ndo_ops->ndo_uninit(). But
it is not able to invoke netdev->destructor().
This is because netdev->destructor() will do a free_netdev() and
then the caller of register_netdevice() will do the same.
However, this means that the resources that would normally be released
by netdev->destructor() will not be.
Over the years drivers have added local hacks to deal with this, by
invoking their destructor parts by hand when register_netdevice()
fails.
Many drivers do not try to deal with this, and instead we have leaks.
Let's close this hole by formalizing the distinction between what
private things need to be freed up by netdev->destructor() and whether
the driver needs unregister_netdevice() to perform the free_netdev().
netdev->priv_destructor() performs all actions to free up the private
resources that used to be freed by netdev->destructor(), except for
free_netdev().
netdev->needs_free_netdev is a boolean that indicates whether
free_netdev() should be done at the end of unregister_netdevice().
Now, register_netdevice() can sanely release all resources after
ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit()
and netdev->priv_destructor().
And at the end of unregister_netdevice(), we invoke
netdev->priv_destructor() and optionally call free_netdev().
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-08 12:52:56 -04:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
net: loopback: enable BIG TCP packets
Set the driver limit to GSO_MAX_SIZE (512 KB).
This allows the admin/user to set a GSO limit up to this value.
Tested:
ip link set dev lo gso_max_size 200000
netperf -H ::1 -t TCP_RR -l 100 -- -r 80000,80000 &
tcpdump shows :
18:28:42.962116 IP6 ::1 > ::1: HBH 40051 > 63780: Flags [P.], seq 3626480001:3626560001, ack 3626560001, win 17743, options [nop,nop,TS val 3771179265 ecr 3771179265], length 80000
18:28:42.962138 IP6 ::1.63780 > ::1.40051: Flags [.], ack 3626560001, win 17743, options [nop,nop,TS val 3771179265 ecr 3771179265], length 0
18:28:42.962152 IP6 ::1 > ::1: HBH 63780 > 40051: Flags [P.], seq 3626560001:3626640001, ack 3626560001, win 17743, options [nop,nop,TS val 3771179265 ecr 3771179265], length 80000
18:28:42.962157 IP6 ::1.40051 > ::1.63780: Flags [.], ack 3626640001, win 17743, options [nop,nop,TS val 3771179265 ecr 3771179265], length 0
18:28:42.962180 IP6 ::1 > ::1: HBH 40051 > 63780: Flags [P.], seq 3626560001:3626640001, ack 3626640001, win 17743, options [nop,nop,TS val 3771179265 ecr 3771179265], length 80000
18:28:42.962214 IP6 ::1.63780 > ::1.40051: Flags [.], ack 3626640001, win 17743, options [nop,nop,TS val 3771179266 ecr 3771179265], length 0
18:28:42.962228 IP6 ::1 > ::1: HBH 63780 > 40051: Flags [P.], seq 3626640001:3626720001, ack 3626640001, win 17743, options [nop,nop,TS val 3771179266 ecr 3771179265], length 80000
18:28:42.962233 IP6 ::1.40051 > ::1.63780: Flags [.], ack 3626720001, win 17743, options [nop,nop,TS val 3771179266 ecr 3771179266], length 0
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-05-13 11:34:05 -07:00
|
|
|
|
|
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
2007-09-25 19:16:28 -07:00
|
|
|
|
2005-08-18 14:05:18 -07:00
|
|
|
|
2007-10-08 20:38:39 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.
Coccinelle patch:
@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@
(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)
v9: move comments here from the wrong commit
Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-14 16:37:24 +02:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
2007-07-30 16:37:19 -07:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
2007-07-30 16:37:19 -07:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
2007-07-30 16:37:19 -07:00
|
|
|
|
2012-08-08 21:53:36 +00:00
|
|
|
|
2007-09-26 22:10:56 -07:00
|
|
|
|
2007-10-15 12:55:33 -07:00
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-15 12:55:33 -07:00
|
|
|
|
2009-11-25 15:14:13 -08:00
|
|
|
|
2007-10-15 12:55:33 -07:00
|
|
|
|
|
|
|
|
|
2007-09-25 19:18:04 -07:00
|
|
|
|
|
|
|
|
|
2008-11-07 22:54:20 -08:00
|
|
|
|
|
|
|
|
|
2017-03-11 20:06:01 +00:00
|
|
|
|
2007-09-26 22:10:56 -07:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 23:16:31 -07:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
2019-07-02 23:16:31 -07:00
|
|
|
|
2019-07-01 14:38:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|