- 03 Dec, 2020 24 commits
-
-
Florian Westphal authored
RFC 8684 says: If the token is unknown or the host wants to refuse subflow establishment (for example, due to a limit on the number of subflows it will permit), the receiver will send back a reset (RST) signal, analogous to an unknown port in TCP, containing an MP_TCPRST option (Section 3.6) with an "MPTCP specific error" reason code. mptcp-next doesn't support MP_TCPRST yet, this can be added in another change. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Florian Westphal authored
The Multipath-TCP standard (RFC 8684) says that an MPTCP host should send a TCP reset if the token in a MP_JOIN request is unknown. At this time we don't do this, the 3whs completes and the 'new subflow' is reset afterwards. There are two ways to allow MPTCP to send the reset. 1. override 'send_synack' callback and emit the rst from there. The drawback is that the request socket gets inserted into the listeners queue just to get removed again right away. 2. Send the reset from the 'route_req' function instead. This avoids the 'add&remove request socket', but route_req lacks the skb that is required to send the TCP reset. Instead of just adding the skb to that function for MPTCP sake alone, Paolo suggested to merge init_req and route_req functions. This saves one indirection from syn processing path and provides the skb to the merged function at the same time. 'send reset on unknown mptcp join token' is added in next patch. Suggested-by: Paolo Abeni <pabeni@redhat.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Florian Westphal authored
A followup change to tcp_request_sock_op would have to drop the 'const' qualifier from the 'route_req' function as the 'security_inet_conn_request' call is moved there - and that function expects a 'struct sock *'. However, it turns out its also possible to add a const qualifier to security_inet_conn_request instead. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: James Morris <jamorris@linux.microsoft.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Thomas Karlsson authored
Background: Broadcast and multicast packages are enqueued for later processing. This queue was previously hardcoded to 1000. This proved insufficient for handling very high packet rates. This resulted in packet drops for multicast. While at the same time unicast worked fine. The change: This patch make the queue length adjustable to accommodate for environments with very high multicast packet rate. But still keeps the default value of 1000 unless specified. The queue length is specified as a request per macvlan using the IFLA_MACVLAN_BC_QUEUE_LEN parameter. The actual used queue length will then be the maximum of any macvlan connected to the same port. The actual used queue length for the port can be retrieved (read only) by the IFLA_MACVLAN_BC_QUEUE_LEN_USED parameter for verification. This will be followed up by a patch to iproute2 in order to adjust the parameter from userspace. Signed-off-by: Thomas Karlsson <thomas.karlsson@paneda.se> Link: https://lore.kernel.org/r/dd4673b2-7eab-edda-6815-85c67ce87f63@paneda.seSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jonas Bonn authored
device_type may be declared as const. Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Link: https://lore.kernel.org/r/20201202122324.564918-1-jonas@norrbonn.seSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Bongsu Jeon says: ==================== nfc: s3fwrn5: Support a UART interface S3FWRN82 is the Samsung's NFC chip that supports the UART communication. Before adding the UART driver module, I did refactoring the s3fwrn5_i2c module to reuse the common blocks. ==================== Link: https://lore.kernel.org/r/1606909661-3814-1-git-send-email-bongsu.jeon@samsung.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Bongsu Jeon authored
Since S3FWRN82 NFC Chip, The UART interface can be used. S3FWRN82 uses NCI protocol and supports I2C and UART interface. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Bongsu Jeon authored
Extract the common phy blocks to reuse it. The UART module will use the common blocks. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Bongsu Jeon authored
The delay of 20ms is enough to enable and wake up the Samsung's nfc chip. Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Bongsu Jeon authored
Since S3FWRN82 NFC Chip, The UART interface can be used. S3FWRN82 supports I2C and UART interface. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linuxJakub Kicinski authored
Saeed Mahameed says: ==================== mlx5-next-2020-12-02 Low level mlx5 updates required by both netdev and rdma trees. * tag 'mlx5-next-2020-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Treat host PF vport as other (non eswitch manager) vport net/mlx5: Enable host PF HCA after eswitch is initialized net/mlx5: Rename peer_pf to host_pf net/mlx5: Make API mlx5_core_is_ecpf accept const pointer net/mlx5: Export steering related functions net/mlx5: Expose other function ifc bits net/mlx5: Expose IP-in-IP TX and RX capability bits net/mlx5: Update the hardware interface definition for vhca state net/mlx5: Update the list of the PCI supported devices net/mlx5: Avoid exposing driver internal command helpers net/mlx5: Add ts_cqe_to_dest_cqn related bits net/mlx5: Add misc4 to mlx5_ifc_fte_match_param_bits net/mlx5: Check dr mask size against mlx5_match_param size net/mlx5: Add sampler destination type net/mlx5: Add sample offload hardware bits and structures ==================== Link: https://lore.kernel.org/r/20201203011010.213440-1-saeedm@nvidia.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Michael Grzeschik says: ==================== net: dsa: microchip: make ksz8795 driver more versatile This series changes the ksz8795 driver to use more dynamic variables instead of static defines. The purpose is to prepare the driver to be used with other microchip switches with a similar layout. ==================== Link: https://lore.kernel.org/r/20201201204506.13473-1-m.grzeschik@pengutronix.deSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The value of the define VLAN_TABLE_ENTRIES can be derived from num_vlans. This patch is using the variable num_vlans instead and removes the extra define. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
To get the driver working with other chips using different port counts the dyn_mac_table should be flushed depending on the amount of available ports. This patch remove the extra define TOTOAL_PORT_NUM and is making use of the dynamic port_cnt variable instead. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The variable mib_port_cnt has the same meaning as port_cnt. This driver removes the extra variable and is using port_cnt everywhere instead. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The ksz8795 driver is using port_cnt differently to the other microchip DSA drivers. It sets it to the external physical port count, than the whole port count (including the cpu port). This patch is aligning the variables purpose with the other microchip drivers. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The variable num_ports is already assigned in the init function. The drivers individual init function already handles the different purpose of port_cnt vs port_cnt + 1. This patch removes the extra assignment of the variable. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The driver is currently hard coded to SWITCH_PORT_NUM being (TOTAL_PORT_NUM - 1) which is limited to 4 user ports for the ksz8795. The phy_port_cnt is referring to its user ports. The patch removes the extra define and use the assigned variable phy_port_cnt instead so the driver can be used on different switches. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The variable mib_cnt is assigned with TOTAL_SWITCH_COUNTER_NUM. This value can also be derived from the array size of mib_names. This patch uses this calculated value instead, removes the extra define and uses mib_cnt everywhere possible instead of the static define TOTAL_SWITCH_COUNTER_NUM. Keeping it in a separate variable instead of using ARRAY_SIZE everywhere instead makes the driver more flexible for future use of devices with different amount of counters. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The extra define SWITCH_COUNTER_NUM is a copy of the KSZ8795_COUNTER_NUM define. This patch initializes reg_mib_cnt with KSZ8795_COUNTER_NUM, makes use of reg_mib_cnt everywhere instead and removes the extra define. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
This patch moves all variable assignments to the init function. It leaves the detect function for its single purpose to detect which chip version is found. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The port_cnt assignment will be done again in the init function. This patch removes the previous assignment in the detect function. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Michael Grzeschik authored
The variable last_port is not used anywhere, this patch removes it. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
Jon Hunter reported observing a build bug in the IPA driver: https://lore.kernel.org/netdev/5b5d9d40-94d5-5dad-b861-fd9bef8260e2@nvidia.com The problem is that the QMB0 max read value set for IPA v4.5 (16) is too large to fit in the 4-bit field. The actual value we want is 0, which requests that the hardware use the maximum it is capable of. Reported-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20201202141502.21265-1-elder@linaro.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
- 02 Dec, 2020 16 commits
-
-
Eric Dumazet authored
If a packet is ready in receive queue, and application isssues a recvmsg()/recvfrom()/recvmmsg() request asking for zero bytes, we hang in mptcp_recvmsg(). Fixes: ea4ca586 ("mptcp: refine MPTCP-level ack scheduling") Signed-off-by: Eric Dumazet <edumazet@google.com> Tested-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Link: https://lore.kernel.org/r/20201202171657.1185108-1-eric.dumazet@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Dan Carpenter authored
These debugfs never return NULL so all this code will never be run. In the normal case, (and in this case particularly), the debugfs functions are not supposed to be checked for errors so all this error checking code can be safely deleted. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X8c6vpapJDYI2eWI@mwandaSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Frieder Schrempf authored
There are other NXP NCI compatible NFC controllers such as the PN7150 that use an integrated firmware and therefore do not have a GPIO to select firmware downloading mode. To support this kind of controller, let's make the firmware GPIO optional. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201201113921.6572-1-frieder.schrempf@kontron.deSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Heiner Kallweit authored
On chip versions supporting tally counter reset we currently update the counters after a reset although we know all counters are zero. Skip this unnecessary step. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/526618b2-b1bf-1844-b82a-dab2df7bdc8f@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Alex Elder says: ==================== net: ipa: IPA v4.5 aggregation and Qtime This series updates some IPA register definitions that change in substantive ways for IPA v4.5. One register defines parameters used by an endpoint to aggregate multiple packets into a buffer. The size and position of most fields in that register have changed with this new hardware version, and consequently the function that programs it needs to be done a bit differently. The first patch takes care of this. Second, IPA v4.5 introduces a unified time keeping component to be used in several places by the IPA hardware. A main clock divider provides a fundamental tick rate, and several timestamped features now define their granularity based on that. There is also a set of "pulse generators" derived from the main tick, and these are used to implement timers used for aggregation and head-of-line block avoidance. The second patch adds IPA register updates to support Qtime along with its configuration, and the last two patches configure the timers that use it. ==================== Link: https://lore.kernel.org/r/20201130233712.29113-1-elder@linaro.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
Extend ipa_reg_init_hol_block_timer_val() so it properly calculates the head-of-line block timeout to use for IPA v4.5. Introduce hol_block_timer_qtime_val() to compute the value to use for IPA v4.5, where Qtime is used as the basis of the timer. Call that function from hol_block_timer_val() for IPA v4.5. Both of these are private functions, so shorten their names a bit so they don't take up so much space on the line. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
Change aggr_time_limit_encoded() to properly calculate the aggregation time limit to use for IPA v4.5. Older IPA versions program the AGGR_GRANULARITY field of the of the COUNTER_CFG register to set the granularity of the aggregation timer, which we configure to be 500 microseconds. Instead, IPA v4.5 selects between two possible granularity values derived from the 19.2 MHz Qtime clock. These granularities are 100 microseconds or 1 millisecond per tick. We use the smaller granularity if possible, unless the desired period is too large to be specified that way. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
IPA v4.5 introduces a new unified timer architecture driven on the 19.2 MHz SoC crystal oscillator (XO). It is independent of the IPA core clock and avoids some duplication. Lower-resolution time stamps are derived from this by using only the high-order bits of the 19.2 MHz Qtime clock. And timers are derived from this based on "pulse generators" configured to fire at a fixed rate based on the Qtime clock. This patch introduces ipa_qtime_config(), which configures the Qtime mechanism for use. It also adds to the IPA register definitions related to timers and time stamping. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
IPA v4.5 significantly changes the format of the configuration register used for endpoint aggregation. The AGGR_BYTE_LIMIT field is now larger, and the positions of other fields are shifted. This complicates the way we have to access this register because functions like u32_encode_bits() require their field mask argument to be constant. A further complication is that we want to know the maximum value representable by at least one of these fields, and that too requires a constant field mask. This patch adds support for IPA v4.5 endpoint aggregation registers in a way that continues to support "legacy" IPA hardware. It does so in a way that keeps field masks constant. First, for each variable field mask, we define an inline function whose return value is either the legacy value or the IPA v4.5 value. Second, we define functions for these fields that encode a value to use in each field based on the IPA version (this approach is already used elsewhere). The field mask provided is supplied by the function mentioned above. Finally, for the aggregation byte limit fields where we want to know the maximum representable value, we define a function that returns that maximum, computed from the appropriate field mask. We can no longer verify at build time that our buffer size is in the range that can be represented by the aggregation byte limit field. So remove the test done by a BUILD_BUG_ON() call in ipa_endpoint_validate_build(), and implement a comparable check at the top of ipa_endpoint_data_valid(). Doing that makes ipa_endpoint_validate_build() contain a single line BUILD_BUG_ON() call, so just remove that function and move the remaining line into ipa_endpoint_data_valid(). One final note: the aggregation time limit value for IPA v4.5 needs to be computed differently. That is handled in an upcoming patch. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Karsten Graul says: ==================== net/smc: Add support for generic netlink API Up to version 4 this patch series was using the sock_diag netlink infrastructure. This version is using the generic netlink API. Generic netlink API offers a better type safety between kernel and userspace communication. Using the generic netlink API the smc module can now provide information about SMC linkgroups, links and devices (both for SMC-R and SMC-D). v2: Add missing include to uapi header smc_diag.h. v3: Apply code style recommendations from review comments. Instead of using EXPORTs to allow the smc_diag module to access data of the smc module, introduce struct smc_diag_ops and let smc_diag access the required data using function pointers. v4: Address checkpatch.pl warnings. Do not use static inline for functions. v5: Use generic netlink API instead of the sock_diag netlink infrastructure. v6: Integrate more review comments from Jakub. v7: Use nla_nest_start() with the new family. Use .maxattr=1 in the genl family and define one entry for attribute 1 in the policy to reject this attritbute for all commands. All other possible attributes are rejected because NL_VALIDATE_STRICT is set for the policy implicitely, which includes NL_VALIDATE_MAXTYPE. Setting policy[0].strict_start_type=1 does not work here because there is no valid attribute defined for this family, only plain commands. For any type > maxtype (which is .maxattr) validate_nla() would return 0 to userspace instead of -EINVAL. What helps here is __nla_validate_parse() which checks for type > maxtype and returns -EINVAL when NL_VALIDATE_MAXTYPE is set. This requires the one entry for type == .maxattr with .type = NLA_REJECT in the nla_policy. When a future command wants to allow attributes then it can easily specify a dedicated .policy for this new command in the genl_ops array. This dedicated policy overlays the global policy specified in the genl_family structure. ==================== Link: https://lore.kernel.org/r/20201201192049.53517-1-kgraul@linux.ibm.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Introduce get link command which loops through all available links of all available link groups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Introduce get linkgroup command which loops through all available SMCR linkgroups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Guvenc Gulce authored
Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-