summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* devlink: add parameter documentation for the mlx4 driverJacob Keller2020-01-112-0/+44
| | | | | | | | | | | | The mlx5 and mlxsw drivers have driver-specific documentation for the devlink features they support. No such file was added for mlx4. Add a file to document the mlx4 devlink support. Initially it contains only the devlink parameters. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: document info versions for each driverJacob Keller2020-01-113-0/+84
| | | | | | | | | | | | | | | Add the set of info versions reported by each device driver, including a description of what the version represents, and what modes (fixed, running, stored) it reports. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Tariq Toukan <tariqt@mellanox.com> Cc: Saeed Mahameed <saeedm@mellanox.com> Cc: Leon Romanovsky <leonro@mellanox.com> Cc: Michael Chan <michael.chan@broadcom.com> Cc: Jiri Pirko <jiri@mellanox.com> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: convert driver-specific files to reStructuredTextJacob Keller2020-01-1115-70/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several drivers document what parameters they support in a devlink-params-*.txt file. This file is supposed to contain both the list of generic parameters implemented by the driver, as well as a list of driver-specific parameters and their descriptions. It would also be good if the driver documentation included other driver-specific implementations, such as info versions, devlink regions, and so forth. Convert all of these documentation files to reStructuredText, and rename them to just the driver name. Future changes will include other driver-specific implementations. Each file will contain a table for the generic parameters implemented, as well as a separate table for the driver-specific parameters. Future sections such as for devlink info versions will be added to these files. This avoids creating additional devlink-<feature>-<driver> files for each devlink feature, reducing clutter in the documentation folder. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Tariq Toukan <tariqt@mellanox.com> Cc: Saeed Mahameed <saeedm@mellanox.com> Cc: Leon Romanovsky <leonro@mellanox.com> Cc: Michael Chan <michael.chan@broadcom.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Jiri Pirko <jiri@mellanox.com> Cc: Ido Schimmel <idosch@mellanox.com> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: mention reloading in devlink-params.rstJacob Keller2020-01-111-0/+7
| | | | | | | | Mention that drivers must support devlink-reload in order for driverinit parameters to function properly Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: add documentation for generic devlink parametersJacob Keller2020-01-111-0/+11
| | | | | | | | A few generic devlink parameters have been added, but never documented. Fix that now. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: convert devlink-params.txt to reStructuredTextJacob Keller2020-01-113-71/+91
| | | | | | | | Convert the generic parameters descriptions into the reStructuredText format. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: rename devlink-info-versions.rst and add a headerJacob Keller2020-01-113-65/+95
| | | | | | | | | | | | Rename the devlink-info-versions.rst file to a plain devlink-info.rst file. Add additional paragraphs explaining what devlink-info is for, and the expectation that drivers use the generic names where plausible. Note that drivers which use non-standard info version names ought to document these in a driver-specific info-versions.rst file. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: convert devlink-health.txt to rst formatJacob Keller2020-01-113-86/+115
| | | | | | | | | | | Update the devlink-health documentation to use the newer ReStructuredText format. Note that it's unclear what OOB stood for, and it has been left as-is without a proper first-use expansion of the acronym. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: move devlink documentation to subfolderJacob Keller2020-01-1116-6/+19
| | | | | | | | Combine the documentation for devlink into a subfolder, and provide an index.rst file that can be used to generally describe devlink. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: add macro for "fw.psid"Jacob Keller2020-01-111-0/+2
| | | | | | | | | The "fw.psid" devlink info version is documented in devlink-info.rst, and used by one driver. However, there is no associated macro for this firmware version like there is for others. Add one now. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch ↵David S. Miller2020-01-114-1387/+1410
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'r8169-factor-out-chip-specific-PHY-configuration-to-a-separate-source-file' Heiner Kallweit says: ==================== r8169: factor out chip-specific PHY configuration to a separate source file Basically every chip version needs its own PHY configuration. To improve maintainability of the driver move all these PHY configurations to a separate source file. To allow this we first have to change all PHY configurations to use phylib functions wherever possible. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: factor out PHY configuration to r8169_phy_config.cHeiner Kallweit2020-01-113-1292/+1308
| | | | | | | | | | | | | | | | Move chip-specific PHY configurations to separate source file r8169_phy_config.c. This improves maintainability of the driver. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: add r8169.hHeiner Kallweit2020-01-112-64/+84
| | | | | | | | | | | | | | | | In preparation of factoring out PHY configuration to a separate source file move commonly used definitions to new header file r8169.h. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: rename rtl_apply_firmwareHeiner Kallweit2020-01-111-16/+16
| | | | | | | | | | | | | | | | Rename rtl_apply_firmware() to r8169_apply_firmware() before exporting it to avoid namespace clashes with other drivers for Realtek hardware. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: add phydev argument to rtl8168d_apply_firmware_condHeiner Kallweit2020-01-111-4/+5
| | | | | | | | | | | | | | | | Pass the phy_device as parameter to rtl8168d_apply_firmware_cond(), this avoids having to access rtl8169_private internals. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: use phy_read/write instead of rtl_readphy/writephyHeiner Kallweit2020-01-111-54/+53
| | | | | | | | | | | | | | | | Replace rtl_writephy and rtl_readphy with the respective phylib functions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: replace rtl_w0w1_phyHeiner Kallweit2020-01-111-22/+12
| | | | | | | | | | | | | | Replace rtl_w0w1_phy with phylib functions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: replace rtl_patchphyHeiner Kallweit2020-01-111-26/+16
| | | | | | | | | | | | | | Replace rtl_patchphy with phylib functions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: move disabling MAC EEE for RTL8402/RTL8106eHeiner Kallweit2020-01-111-2/+6
| | | | | | | | | | | | | | Move configuring EEE on MAC side out of the PHY configuration. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: move setting ERI register 0x1d0 for RTL8106Heiner Kallweit2020-01-111-2/+2
| | | | | | | | | | | | | | | | Writing this ERI register is a MAC setting, so move it to rtl_hw_start_8106(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: switch to phylib functions in rtl_writephy_batchHeiner Kallweit2020-01-111-18/+21
| | | | | | | | | | | | | | | | Switch rtl_writephy_batch() to phylib functions, as a result we can avoid passing a rtl8169_private parameter. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: change argument type of RTL8168g-specific PHY config functionsHeiner Kallweit2020-01-111-14/+12
| | | | | | | | | | | | | | | | These functions use only the phy_device member of rtl8169_private, so we can pass the phy_device as parameter directly. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: change argument type of EEE PHY functionsHeiner Kallweit2020-01-111-24/+18
| | | | | | | | | | | | | | | | These functions use only the phy_device member of rtl8169_private, so we can pass the phy_device as parameter directly. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: move RTL8169scd Gigabyte PHY quirkHeiner Kallweit2020-01-111-13/+5
| | | | | | | | | | | | | | | | In preparation of factoring out rtl8169scd_hw_phy_config() move this quirk to rtl8169_init_phy(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: remove not needed debug print in rtl8169_init_phyHeiner Kallweit2020-01-111-5/+4
| | | | | | | | | | | | | | | | Remove a useless debug statement. This also allows to remove the net_device parameter from rtl8169_init_phy(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: prepare for exporting rtl_hw_phy_configHeiner Kallweit2020-01-111-100/+117
|/ | | | | | | | | | | | In preperation of factoring out the PHY configuration to a separate source file this patch: - avoids accessing rtl8169_private internals by passing the phy_device and mac_version as separate parameters - renames rtl_hw_phy_config to r8169_hw_phy_config to avoid namespace clashes with other drivers for Realtek hardware Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'stmmac-Frame-Preemption-fixes'David S. Miller2020-01-102-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jose Abreu says: ==================== net: stmmac: Frame Preemption fixes Two single fixes for the -next tree for recently introduced Frame Preemption feature. 1) and 2) fixes the disabling of Frame Preemption that was not being correctly handled because of a missing return. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: stmmac: gmac5+: Fix missing returnJose Abreu2020-01-101-0/+1
| | | | | | | | | | | | | | | | If FPE is supposed to be disabled we need to return after disabling it. Fixes: 7c7282746883 ("net: stmmac: gmac5+: Add support for Frame Preemption") Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: stmmac: xgmac: Fix missing returnJose Abreu2020-01-101-0/+1
|/ | | | | | | | If FPE is supposed to be disabled we need to return after disabling it. Fixes: f0e56c8d8f7d ("net: stmmac: xgmac3+: Add support for Frame Preemption") Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'sfc-even-more-code-refactoring'David S. Miller2020-01-1025-1266/+1353
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alex Maftei says: ==================== sfc: even more code refactoring Splitting even more of the driver code into different files, which will later be used in another driver for a new product. This is a continuation to my previous patch series, and the one before it. There will be a stand-alone patch as well after this - after which the refactoring will be concluded, for now. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move RPS codeAlex Maftei (amaftei)2020-01-108-276/+273
| | | | | | | | | | | | | | | | | | Includes a couple of filtering functions and also renames a constant. Style fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move yet more functionsAlex Maftei (amaftei)2020-01-106-64/+66
| | | | | | | | | | | | | | Functions are not related. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move RSS codeAlex Maftei (amaftei)2020-01-104-70/+72
| | | | | | | | | | | | | | Style fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move a couple more functionsAlex Maftei (amaftei)2020-01-106-51/+56
| | | | | | | | | | Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move some ethtool codeAlex Maftei (amaftei)2020-01-104-442/+489
| | | | | | | | | | | | | | Various ethtool entry points are moved. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move various functionsAlex Maftei (amaftei)2020-01-1011-76/+88
| | | | | | | | | | Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move more rx codeAlex Maftei (amaftei)2020-01-104-208/+224
| | | | | | | | | | | | | | | | | | | | | | Page recycling code and GRO packet receipt code were moved. One function contains code extracted from another. Code style fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: move more tx codeAlex Maftei (amaftei)2020-01-103-77/+78
| | | | | | | | | | | | | | The code that handles transmission finalization will also be common. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: refactor selftest work init codeAlex Maftei (amaftei)2020-01-103-3/+8
|/ | | | | Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mptcp-prereq'David S. Miller2020-01-1018-79/+235
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mat Martineau says: ==================== Multipath TCP: Prerequisites v6 -> v7: Rename/move ULP clone helper to make inline-friendly (patch 5) v5 -> v6: Fix BPF accessors for sk_type and sk_protocol (patch 2), fix the width of an __unused bitfield (patch 6), and add some commit message and comment text (patches 5 & 7). v4 -> v5: Cover letter subject fix. No changes to commits. v3 -> v4: Update coalesce/collapse of incoming MPTCP skbs (patch 7) v2 -> v3: Ensure sk_type alignment in struct sock (patch 2) v1 -> v2: sk_pacing_shift left as a regular struct member (patch 2), and modified SACK space check based on recent -net fix (patch 9). The MPTCP upstreaming community has been collaborating on an upstreamable MPTCP implementation that complies with RFC 8684. A minimal set of features to comply with the specification involves a sizeable set of code changes, so David requested that we split this work in to multiple, smaller patch sets to build up MPTCP infrastructure. The minimal MPTCP feature set we are proposing for review in the v5.6 timeframe begins with these three parts: Part 1 (this patch set): MPTCP prerequisites. Introduce some MPTCP definitions, additional ULP and skb extension features, TCP option space checking, and a few exported symbols. Part 2: Single subflow implementation and self tests. Part 3: Switch from MPTCP v0 (RFC 6824) to MPTCP v1 (new RFC 8684, publication expected in the next few days). Additional patches for multiple subflow support, path management, active backup, and other features are in the pipeline for submission after making progress with the above reviews. Clone/fetch: https://github.com/multipath-tcp/mptcp_net-next.git (tag: netdev-v7-part1) Browse: https://github.com/multipath-tcp/mptcp_net-next/tree/netdev-v7-part1 Thank you for your review. You can find us at mptcp@lists.01.org and https://is.gd/mptcp_upstream ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * skb: add helpers to allocate ext independently from sk_buffPaolo Abeni2020-01-102-2/+36
| | | | | | | | | | | | | | | | | | | | Currently we can allocate the extension only after the skb, this change allows the user to do the opposite, will simplify allocation failure handling from MPTCP. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: clean ext on tx recyclePaolo Abeni2020-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we will find stray/unexpected/old extensions value on next iteration. On tcp_write_xmit() we can end-up splitting an already queued skb in two parts, via tso_fragment(). The newly created skb can be allocated via the tx cache and an upper layer will not be aware of it, so that upper layer cannot set the ext properly. Resetting the ext on recycle ensures that stale data is not propagated in to packet headers or elsewhere. An alternative would be add an additional hook in tso_fragment() or in sk_stream_alloc_skb() to init the ext for upper layers that need it. Co-developed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: Check for filled TCP option space before SACKMat Martineau2020-01-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the SACK check to work with zero option space available, a case that's possible with MPTCP but not MD5+TS. Maintained only one conditional branch for insufficient SACK space. v1 -> v2: - Moves the check inside the SACK branch by taking recent SACK fix: 9424e2e7ad93 (tcp: md5: fix potential overestimation of TCP option space) in to account, but modifies it to work in MPTCP scenarios beyond the MD5+TS corner case. Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: Export TCP functions and ops structMat Martineau2020-01-104-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MPTCP will make use of tcp_send_mss() and tcp_push() when sending data to specific TCP subflows. tcp_request_sock_ipvX_ops and ipvX_specific will be referenced during TCP subflow creation. Co-developed-by: Peter Krystad <peter.krystad@linux.intel.com> Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: coalesce/collapse must respect MPTCP extensionsMat Martineau2020-01-104-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coalesce and collapse of packets carrying MPTCP extensions is allowed when the newer packet has no extension or the extensions carried by both packets are equal. This allows merging of TSO packet trains and even cross-TSO packets, and does not require any additional action when moving data into existing SKBs. v3 -> v4: - allow collapsing, under mptcp_skb_can_collapse() constraint v5 -> v6: - clarify MPTCP skb extensions must always be cleared at allocation time Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mptcp: Add MPTCP to skb extensionsMat Martineau2020-01-104-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add enum value for MPTCP and update config dependencies v5 -> v6: - fixed '__unused' field size Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp, ulp: Add clone operation to tcp_ulp_opsMat Martineau2020-01-102-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ULP is used on a listening socket, icsk_ulp_ops and icsk_ulp_data are copied when the listener is cloned. Sometimes the clone is immediately deleted, which will invoke the release op on the clone and likely corrupt the listening socket's icsk_ulp_data. The clone operation is invoked immediately after the clone is copied and gives the ULP type an opportunity to set up the clone socket and its icsk_ulp_data. The MPTCP ULP clone will silently fallback to plain TCP on allocation failure, so 'clone()' does not need to return an error code. v6 -> v7: - move and rename ulp clone helper to make it inline-friendly v5 -> v6: - clarified MPTCP clone usage in commit message Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: Add MPTCP option numberMat Martineau2020-01-101-0/+1
| | | | | | | | | | | | | | | | TCP option 30 is allocated for MPTCP by the IANA. Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: Define IPPROTO_MPTCPMat Martineau2020-01-103-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | To open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP), IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing IPPROTO numbers mostly map directly to IANA-specified protocol numbers. MPTCP does not have a protocol number allocated because MPTCP packets use the TCP protocol number. Use private number not used OTA. Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sock: Make sk_protocol a 16-bit valueMat Martineau2020-01-103-59/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Match the 16-bit width of skbuff->protocol. Fills an 8-bit hole so sizeof(struct sock) does not change. Also take care of BPF field access for sk_type/sk_protocol. Both of them are now outside the bitfield, so we can use load instructions without further shifting/masking. v5 -> v6: - update eBPF accessors, too (Intel's kbuild test robot) v2 -> v3: - keep 'sk_type' 2 bytes aligned (Eric) v1 -> v2: - preserve sk_pacing_shift as bit field (Eric) Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: bpf@vger.kernel.org Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>