- 17 11月, 2020 12 次提交
-
-
由 Paolo Abeni 提交于
We must not close the subflows before all the MPTCP level data, comprising the DATA_FIN has been acked at the MPTCP level, otherwise we could be unable to retransmit as needed. __mptcp_wr_shutdown() shutdown is responsible to check for the correct status and close all subflows. Is called by the output path after spooling any data and at shutdown/close time. In a similar way, __mptcp_destroy_sock() is responsible to clean-up the MPTCP level status, and is called when the msk transition to TCP_CLOSE. The protocol level close() does not force anymore the TCP_CLOSE status, but orphan the msk socket and all the subflows. Orphaned msk sockets are forciby closed after a timeout or when all MPTCP-level data is acked. There is a caveat about keeping the orphaned subflows around: the TCP stack can asynchronusly call tcp_cleanup_ulp() on them via tcp_close(). To prevent accessing freed memory on later MPTCP level operations, the msk acquires a reference to each subflow socket and prevent subflow_ulp_release() from releasing the subflow context before __mptcp_destroy_sock(). The additional subflow references are released by __mptcp_done() and the async ULP release is detected checking ULP ops. If such field has been already cleared by the ULP release path, the dangling context is freed directly by __mptcp_done(). Co-developed-by: NDavide Caratti <dcaratti@redhat.com> Signed-off-by: NDavide Caratti <dcaratti@redhat.com> Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
Track the next MPTCP sequence number used on xmit, currently always equal to write_next. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
Preparation patch to track the data pending in the msk write queue. No functional change introduced here Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
The current argument list is pretty long and quite unreadable, move many of them into a specific struct. Later patches will add more stuff to such struct. Additionally drop the 'timeo' argument, now unused. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
remove some of code duplications an allow preventing rescheduling on close. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
unlocked version of protocol level close, will be used by MPTCP to allow decouple orphaning and subflow level close. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
mptcp_push_pending() is called even on orphaned msk (and orphaned subflows), if there is outstanding data at close() time. To cope with the above MPTCP needs to handle explicitly the allocation failure on xmit. The newly introduced do_tcp_sendfrag() allows that, just plug it. We can additionally drop a couple of sanity checks, duplicate in the TCP code. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Paolo Abeni 提交于
Will be needed by the next patch, as MPTCP needs to handle directly the error/memory-allocation-needed path. No functional changes intended. Additionally let MPTCP code access the tcp_remove_empty_skb() helper. Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jakub Kicinski 提交于
Francis Laniel says: ==================== Fix inefficiences and rename nla_strlcpy This patch set answers to first three issues listed in: https://github.com/KSPP/linux/issues/110 To sum up, the patch contributions are the following: 1. the first patch fixes an inefficiency where some bytes in dst were written twice, one with 0 the other with src content. 2. The second one modifies nla_strlcpy to return the same value as strscpy, i.e. number of bytes written or -E2BIG if src was truncated. It also modifies code that calls nla_strlcpy and checks for its return value. 3. The third renames nla_strlcpy to nla_strscpy. Unfortunately, I did not find how to create struct nlattr objects so I tested my modifications on simple char* and with GDB using tc to get to tcf_proto_check_kind. ==================== Link: https://lore.kernel.org/r/20201115170806.3578-1-laniel_francis@privacyrequired.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Francis Laniel 提交于
Calls to nla_strlcpy are now replaced by calls to nla_strscpy which is the new name of this function. Signed-off-by: NFrancis Laniel <laniel_francis@privacyrequired.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Francis Laniel 提交于
nla_strlcpy now returns -E2BIG if src was truncated when written to dst. It also returns this error value if dstsize is 0 or higher than INT_MAX. For example, if src is "foo\0" and dst is 3 bytes long, the result will be: 1. "foG" after memcpy (G means garbage). 2. "fo\0" after memset. 3. -E2BIG is returned because src was not completely written into dst. The callers of nla_strlcpy were modified to take into account this modification. Signed-off-by: NFrancis Laniel <laniel_francis@privacyrequired.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Francis Laniel 提交于
Before this commit, nla_strlcpy first memseted dst to 0 then wrote src into it. This is inefficient because bytes whom number is less than src length are written twice. This patch solves this issue by first writing src into dst then fill dst with 0's. Note that, in the case where src length is higher than dst, only 0 is written. Otherwise there are as many 0's written to fill dst. For example, if src is "foo\0" and dst is 5 bytes long, the result will be: 1. "fooGG" after memcpy (G means garbage). 2. "foo\0\0" after memset. Signed-off-by: NFrancis Laniel <laniel_francis@privacyrequired.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 16 11月, 2020 1 次提交
-
-
由 Heiner Kallweit 提交于
Improve the following in rtl8169_start_xmit: - tp->cur_tx can be accessed in parallel by rtl_tx(), therefore annotate the race by using WRITE_ONCE - avoid checking stop_queue a second time by moving the doorbell check - netif_stop_queue() uses atomic operation set_bit() that includes a full memory barrier on some platforms, therefore use smp_mb__after_atomic to avoid overhead Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/80085451-3eaf-507a-c7c0-08d607c46fbc@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 15 11月, 2020 27 次提交
-
-
由 Lev Stipakov 提交于
Commit d3fd6548 ("net: core: add dev_sw_netstats_tx_add") has added function "dev_sw_netstats_tx_add()" to update net device per-cpu TX stats. Use this function instead of own code. While on it, remove xfrmi_get_stats64() and replace it with dev_get_tstats64(). Signed-off-by: NLev Stipakov <lev@openvpn.net> Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20201113215939.147007-1-lev@openvpn.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Lev Stipakov 提交于
Commit d3fd6548 ("net: core: add dev_sw_netstats_tx_add") has added function "dev_sw_netstats_tx_add()" to update net device per-cpu TX stats. Use this function instead of own code. While on it, remove internal_get_stats() and replace it with dev_get_tstats64(). Signed-off-by: NLev Stipakov <lev@openvpn.net> Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20201113215336.145998-1-lev@openvpn.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jakub Kicinski 提交于
Ido Schimmel says: ==================== mlxsw: Preparations for nexthop objects support - part 1/2 This patch set contains small and non-functional changes aimed at making it easier to support nexthop objects in mlxsw. Follow up patches can be found here [1]. Patches #1-#4 add a type field to the nexthop group struct instead of the existing protocol field. This will be used later on to add a nexthop object type, which can contain both IPv4 and IPv6 nexthops. Patches #5-#7 move the IPv4 FIB info pointer (i.e., 'struct fib_info') from the nexthop group struct to the route. The pointer will not be available when the nexthop group is a nexthop object, but it needs to be accessible to routes regardless. Patch #8 is the biggest change, but it is an entirely cosmetic change and should therefore be easy to review. The motivation and the change itself are explained in detail in the commit message. Patches #9-#12 perform small changes so that two functions that are currently split between IPv4 and IPv6 could be consolidated in patches Patch #15 removes an outdated comment. [1] https://github.com/idosch/linux/tree/submit/nexthop_objects ==================== Link: https://lore.kernel.org/r/20201113160559.22148-1-idosch@idosch.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Since commit 21151f64 ("mlxsw: Add new FIB entry type for reject routes") this comment is no longer correct. Remove it. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
The two functions are identical, so consolidate them to mlxsw_sp_nexthop_type_fini(). Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
The two functions are now identical, so consolidate them to mlxsw_sp_nexthop_type_init(). Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Remove it as it is unused. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Instead of passing the nexthop and resolving the nexthop netdev from it, pass the nexthop netdev directly. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Instead of passing the route and resolving the nexthop netdev from it, pass the nexthop netdev directly. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
The overlay protocol (i.e., IPv4/IPv6) that is being encapsulated has no impact on whether a certain IP tunnel can be offloaded or not. Only the underlay protocol matters. Therefore, remove the unused overlay protocol parameter from the callback. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Currently, the individual nexthops member in the group and attributes of the group (e.g., its type) are stored in the same struct (i.e., 'struct mlxsw_sp_nexthop_group'). This is fine since the individual nexthops cannot change during the lifetime of the group. With nexthop objects this is no longer the case. An existing nexthop group can be replaced to use a new set of nexthops. Creating a new struct whenever a group is replaced entails replacing the group pointer of all the routes (i.e., 'struct mlxsw_sp_fib_entry') using the group. Avoid this inefficient step by splitting the nexthop group configuration to a different struct (i.e., 'struct mlxsw_sp_nexthop_group_info'). When a nexthop group is replaced a new group info struct is created and the individual rotues do not need to be touched. Illustration after the change: mlxsw_sp_fib_entry mlxsw_sp_nexthop_group mlxsw_sp_nexthop_group_info +-------------------+ +----------------------+ +---------------------------+ | nh_group; +--> nhgi; +--> | | | | | | | +-------------------+ +----------------------+ +---------------------------+ No functional changes intended. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Instead of storing the FIB info as 'priv' when the nexthop group represents an IPv4 nexthop group, simply store it as a FIB info with a proper comment. When nexthop objects are supported, this field will become a union with the nexthop object's identifier. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Not used anywhere. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
When needed, IPv4 routes fetch the FIB info (i.e., 'struct fib_info') from their associated nexthop group. This will not work when the nexthop group represents a nexthop object (i.e., 'struct nexthop'), as it will only have access to the nexthop's identifier. Instead, store the FIB info in the route itself. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
As explained in the previous patch, nexthop objects can have both IPv4 and IPv6 nexthops in the same group. Therefore, move the neighbour table to be a property of the nexthop instead of the nexthop group. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Both IPv4 and IPv6 nexthop groups are hashed in the same table. The protocol field is used to indicate how the hash should be computed for each group. When nexthop group objects are supported, the hash will be computed for them based on the nexthop identifier. To differentiate between all the nexthop group types, encode the type of the group in the key instead of the protocol. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
Currently, the type (i.e., IPv4/IPv6) of the nexthop group is derived from the neighbour table associated with the group. This is problematic when nexthop objects are taken into account, as a nexthop group object can contain both IPv4 and IPv6 nexthops. Instead, add a new field that indicates the type of the group and initialize it during the group's creation. Currently, the types are IPv4 ('struct fib_info') and IPv6 ('struct fib6_info'). In the future another type will be added for nexthop objects ('struct nexthop'). Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Ido Schimmel 提交于
When comparing a key with a nexthop group in rhastable's obj_cmpfn() callback, make sure that the key and nexthop group are of the same type (i.e., IPv4 / IPv6). The bug is not currently visible because IPv6 nexthop groups do not populate the FIB info pointer and IPv4 nexthop groups do not set the ifindex for the individual nexthops. Signed-off-by: NIdo Schimmel <idosch@nvidia.com> Reviewed-by: NJiri Pirko <jiri@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Alex Shi 提交于
We don't use the parameter result actually, so better to remove it and skip a gcc warning for unused variable. Signed-off-by: NAlex Shi <alex.shi@linux.alibaba.com> Link: https://lore.kernel.org/r/1605239517-49707-1-git-send-email-alex.shi@linux.alibaba.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Eric Dumazet 提交于
These functions do not need to be exported. Signed-off-by: NEric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20201113113553.3411756-1-eric.dumazet@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jakub Kicinski 提交于
Eric Dumazet says: ==================== tcp: avoid indirect call in __sk_stream_memory_free() Small improvement for CONFIG_RETPOLINE=y, when dealing with TCP sockets. ==================== Link: https://lore.kernel.org/r/20201113150809.3443527-1-eric.dumazet@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Eric Dumazet 提交于
Signed-off-by: NEric Dumazet <edumazet@google.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Eric Dumazet 提交于
Both IPv4 and IPv6 needs it via a function pointer. Following patch will avoid the indirect call. Signed-off-by: NEric Dumazet <edumazet@google.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Oliver Herms 提交于
This patch adds an IPv4 routes encapsulation attribute to the result of netlink RTM_GETROUTE requests (e.g. ip route get 192.0.2.1). Signed-off-by: NOliver Herms <oliver.peter.herms@gmail.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20201113085517.GA1307262@twsSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jakub Kicinski 提交于
Shannon Nelson says: ==================== ionic updates These updates are a bit of code cleaning and a minor bit of performance tweaking. v3: convert ionic_lif_quiesce() to void v2: added void cast on call to ionic_lif_quiesce() lowered batching threshold added patch to flatten calls to ionic_lif_rx_mode added patch to change from_ndo to can_sleep ==================== Link: https://lore.kernel.org/r/20201112182208.46770-1-snelson@pensando.ioSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Shannon Nelson 提交于
With a few more uses of true and false in function calls, we need to give them some useful names so we can tell from the calling point what we're doing. Signed-off-by: NShannon Nelson <snelson@pensando.io> Reviewed-by: NSaeed Mahameed <saeedm@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Shannon Nelson 提交于
Instead of having two different ways of expressing the same sleepability concept, using opposite logic, we can rework the from_ndo to can_sleep for a more consistent usage. Fixes: 1800eee1 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: NShannon Nelson <snelson@pensando.io> Reviewed-by: NSaeed Mahameed <saeedm@nvidia.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-