- 01 Aug, 2017 12 commits
-
-
Jakub Sitnicki authored
There is no need to go through sk->sk_net to access the net namespace and its sysctl variables because we allocate the sock and initialize sk_net just a few lines earlier in the same routine. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Andrew Lunn says: ==================== More Marvell PHY refactoring and cleanup Consolidate more duplicated code into helpers, make use of core helpers, move code into a helper for later adding functionality to add marvell PHYs, etc. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
The 1116r has code to set downshift. Refactor this into a helper, so in future other marvell PHYs can use it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
Some of the init functions unilaterally enable set auto cross over without using the helper. Make use of the helper, and respect the phydev MDI configuration. Clean up the #define used while setting polarity, and the other functions of the bits in the register. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
Turns out that MII_M1116R_CONTROL_REG_MAC is the same as MII_88E1121_PHY_MSCR_REG. Refactor the code to set the RGMII delays into a shared helper. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
The same code is repeated a few times. Refactor into a helped. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
The same code is repeated for different PHY versions. Put it into a help and call when needed. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
Rather than using an open coded equivalent, use the core genphy_soft_reset() function. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andrew Lunn authored
Convert spaces to tabs where appropriate, and fix up some otherwise odd indentation. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
The driver needs CONFIG_HAS_IOMEM and OF to be functional, but we still let it build with COMPILE_TEST. This fixes the unmet dependency after selecting MDIO_BCM_UNIMAC in commit mentioned below: warning: (NET_DSA_BCM_SF2 && BCMGENET) selects MDIO_BCM_UNIMAC which has unmet direct dependencies (NETDEVICES && MDIO_DEVICE && HAS_IOMEM && OF_MDIO) Fixes: 9a4e7969 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Wei Wang authored
Add the following stats into SCM_TIMESTAMPING_OPT_STATS control msg: TCP_NLA_PACING_RATE TCP_NLA_DELIVERY_RATE TCP_NLA_SND_CWND TCP_NLA_REORDERING TCP_NLA_MIN_RTT TCP_NLA_RECUR_RETRANS TCP_NLA_DELIVERY_RATE_APP_LMT Signed-off-by: Wei Wang <weiwan@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Wei Wang authored
Refactor the code to extract the function to compute delivery rate. This function will be used in later commit. Signed-off-by: Wei Wang <weiwan@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
- 31 Jul, 2017 28 commits
-
-
Marc Gonzalez authored
In the current code, old and new PHY states are always logged. >From now on, log only PHY state transitions. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Jiri Pirko says: ==================== mlxsw: Various small fixes This patch series is to contribute several fixes for nits that I noticed while working on mlxsw. The changes range from typo fixes to local improvements of the code and have little in common besides being small in scope. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Express the same logic more succinctly. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Prefer logical operator that expresses the intent to bitwise one that happens to give the same result. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
This renames IP2ME-specific registers reg_ralue_v and reg_ralue_tunnel_ptr to reg_ralue_ip2me_*. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
The comments really belong to the individual enumerators. The comment at the register should instead reference the enum. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Petr Machata authored
Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Florian Fainelli says: ==================== net: bcmgenet: utilize MDIO unimac driver This patch series migrates the Broadcom GENET driver to use the mdio-bcm-unimac driver. This MDIO HW is the same as the one GENET internally embedds, yet for historical reasons the two drivers lived their own lives. Because of the GENET interrupt situation, we let it specify how it wants to signal MDIO operations completion using its driver-private waitqueue. The diffstat is not super impressive, but it's still negative! This would make it easier in the future to absorb possible workarounds/bugs/features within the same location. This was tested on BCM7260 (GENETv5, single instance), BCM7439 (GENETv4, triple instance) and BCM7445 (bcm_sf2 + mdio-bcm-unimac). We also now have a nice /proc/iomem output: f0b00000-f0b0fc4b : /rdb/ethernet@f0b00000 f0b00e14-f0b00e1c : unimac-mdio.0 f0b20000-f0b2fc4b : /rdb/ethernet@f0b20000 f0b20e14-f0b20e1c : unimac-mdio.1 f0b40000-f0b4fc4b : /rdb/ethernet@f0b40000 f0b40e14-f0b40e1c : unimac-mdio.2 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
bcmgenet_mii_init() has an error path which is strictly identical to the unwinding that bcmgenet_mii_exit() does, so have bcmgenet_mii_init() utilize bcmgenet_mii_exit() for that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Now that we have fully migrated to the mdio-bcm-unimac driver, drop the legacy MDIO bus code which did duplicate a fair amount of code. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Update the GENET driver to register an UniMAC MDIO bus controller for the GENET internal MDIO bus, update the platform data code to attach the PHY to the correct MDIO bus controller. The Device Tree portion of the code is mostly left unmodified since the lookup/binding is done via phandles and Device Tree nodes which are much more flexible in locating and binding PHYs to their respective MDIO bus controllers. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In preparation for having the bcmgenet driver migrate over the mdio-bcm-unimac driver, add a platform data structure which allows passing integrating specific details like bus name, wait function to complete MDIO operations and PHY mask. We also define what the platform device name contract is by defining UNIMAC_MDIO_DRV_NAME and moving it to the platform_data header. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In order to be stricly identical to what bcmgenet does, add a debug print when a PHY workaround during bus->reset() is executed. Preliminary change to moving bcmgenet towards mdio-bcm-unimac. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In preparation for having multiple GENET instances in a system (up to 3), make sure that we do include the bus instance number in the name of the MDIO bus such that we change it from "unimac-mdio" to "unimac-mdio-0" for instance. So far, the only user of this driver is using Device Tree, which uses a lookup/parenting based technique to map PHY devices to their respective MDIO bus controllers, hence causing no additional changes. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Factor the code that does the busy polling on the MDIO_BUSY bit since we will have different code-paths for for completion depending on whether we are using interrupts or polling. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Florian Westphal says: ==================== tcp: remove prequeue and header prediction During a hallway discussion with Eric Dumazet at Netdev 1.2 in Tokyo some maybe-not-so-useful-anymore TCP stack features came up, among these header prediction and prequeueing. In brief, TCP prequeue assumes a single-process-blocking-read design, which is not that common anymore. The most frequently used high-performance networking program that is an excellent fit for these features is netperf. The idea behind prequeueing is to move part of tcp processing, including retransmit queue cleaning, to process context. With (e)poll designs, prequeue is always skipped, so for such programs this is dead-code removal. Header prediction is also less useful nowadays. For packet trains, GRO will do packet aggregation so we do not get the per-packet benefit that this had before GRO anymore. Because of SACK, header prediction also will be ineffective once a connection suffers even light packet losses. code removal aside, after this change processing always occurs in BH context, this allows to experiment e.g. with doing bulk freeing of skb heads when incoming ACKs clean packets from the retransmit queue. There are no changes since the RFC, except in last patch (i missed another no-longer-used mib counter). I also edited a few commit messages. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
was used by tcp prequeue and header prediction. TCPFORWARDRETRANS use was removed in january. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
re-indent tcp_ack, and remove CA_ACK_SLOWPATH; it is always set now. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
Like prequeue, I am not sure this is overly useful nowadays. If we receive a train of packets, GRO will aggregate them if the headers are the same (HP predates GRO by several years) so we don't get a per-packet benefit, only a per-aggregated-packet one. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
Was only checked by the removed prequeue code. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
These two branches are now always true, remove the conditional. objdiff shows no changes. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
prequeue is a tcp receive optimization that moves part of rx processing from bh to process context. This only works if the socket being processed belongs to a process that is blocked in recv on that socket. In practice, this doesn't happen anymore that often because nowadays servers tend to use an event driven (epoll) model. Even normal client applications (web browsers) commonly use many tcp connections in parallel. This has measureable impact only in netperf (which uses plain recv and thus allows prequeue use) from host to locally running vm (~4%), however, there were no changes when using netperf between two physical hosts with ixgbe interfaces. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Jamal Hadi Salim says: ==================== net sched actions: improve dump performance Changes since v11: ------------------ 1) Jiri - renames: nla_value to value and nla_selector to selector 2) Jiri - rename: validate_nla_bitfield_32 to validate_nla_bitfield_32 3) Jiri - rename: NLA_BITFIELD_32 to NLA_BITFIELD32 4) Jiri - remove unnecessary break when we return in case statement 5) Jiri - rename and move nla_get_bitfield_32 to an earlier patch 6) Jiri - xmas tree alignment of var declaration 7) Jiri - rename all declarations of bitfield 32 vars to be consistent ("bf") 8) Jiri - improve validate_nla_bitfield32() validation to disallow valid bit values that are not selected by the selector Changes since v10: ----------------- 1) Jiri: move type->validate_content() to its own patch Jamal: decided to remove it altogether so we can get this patch set in. 2) Change name of NLA_FLAG_BITS to NLA_BITFIELD_32 based on discussions with D. Ahern and Jiri. D. Ahern suggests to make this a variable bitmap size. My analysis at this point is it too complex and i only need a few bit flags. If we run out of bits someone else can create a new NLA_BITFIELD_XXX and start using that. So please let this go. 3) Jamal - Add Suggested-by: Jiri for type NLA_BITFIELD_32 4) Jiri: Change name allowed_flags to tcaa_root_flags_allowed 5) Jiri: Introduce nla_get_flag_bits_values() helper instead of using memcpy for retrieving nla_bitfield_32 fields. Changes since v9: ----------------- 1) General consensus: - remove again the use of BIT() to maintain uapi consistency ;-> 1) Jiri: - Add a new netlink type NLA_FLAG_BITS to check for valid bits and use it instead of inline vetting (patch 4/4 now) Changes since v8: ----------------- 1) Jiri: - Add back the use of BIT(). Eventually fix iproute2 instead - Rename VALID_TCA_FLAGS to VALID_TCA_ROOT_FLAGS Changes since v7: ----------------- Jamal: No changes. Patch 1 went out twice. Resend without two copies of patch 1 changes since v6: ----------------- 1) DaveM: New rules for netlink messages. From now on we are going to start checking for bits that are not used and rejecting anything we dont understand. In the future this is going to require major changes to user space code (tc etc). This is just a start. To quote, David: " Again, bits you aren't using now, make sure userspace doesn't set them. And if it does, reject. " Added checks for ensuring things work as above. 2) Jiri: a)Fix the commit message to properly use "Fixes" description b)Align assignments for nla_policy Changes since v5: ---------------- 0) Remove use of BIT() because it is kernel specific. Requires a separate patch (Jiri can submit that in his cleanups) 1)To paraphrase Eric D. "memcpy(nla_data(count_attr), &cb->args[1], sizeof(u32)); wont work on 64bit BE machines because cb->args[1] (which is 64 bit is larger in size than sizeof(u32))" Fixed 2) Jiri Pirko i) Spotted a bug fix mixed in the patch for wrong TLV fix. Add patch 1/3 to address this. Make part of this series because of dependencies. ii) Rename ACT_LARGE_DUMP_ON -> TCA_FLAG_LARGE_DUMP_ON iii) Satisfy Jiri's obsession against the noun "tcaa" a)Rename struct nlattr *tcaa --> struct nlattr *tb b)Rename TCAA_ACT_XXX -> TCA_ROOT_XXX Changes since v4: ----------------- 1) Eric D. pointed out that when all skb space is used up by the dump there will be no space to insert the TCAA_ACT_COUNT attribute. 2) Jiri: i) Change: enum { TCAA_UNSPEC, TCAA_ACT_TAB, TCAA_ACT_FLAGS, TCAA_ACT_COUNT, TCAA_ACT_TIME_FILTER, __TCAA_MAX }; to: enum { TCAA_UNSPEC, TCAA_ACT_TAB, TCAA_ACT_FLAGS, TCAA_ACT_COUNT, __TCAA_MAX, }; Jiri plans to followup with the rest of the code to make the style consistent. ii) Rename attribute TCAA_ACT_TIME_FILTER --> TCAA_ACT_TIME_DELTA iii) Rename variable jiffy_filter --> jiffy_since iv) Rename msecs_filter --> msecs_since v) get rid of unused cb->args[0] and rename cb->args[4] to cb->args[0] Earlier Changes ---------------- - Jiri mostly on names of things. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Jamal Hadi Salim authored
This patch adds support for filtering based on time since last used. When we are dumping a large number of actions it is useful to have the option of filtering based on when the action was last used to reduce the amount of data crossing to user space. With this patch the user space app sets the TCA_ROOT_TIME_DELTA attribute with the value in milliseconds with "time of interest since now". The kernel converts this to jiffies and does the filtering comparison matching entries that have seen activity since then and returns them to user space. Old kernels and old tc continue to work in legacy mode since they dont specify this attribute. Some example (we have 400 actions bound to 400 filters); at installation time. Using updated when tc setting the time of interest to 120 seconds earlier (we see 400 actions): prompt$ hackedtc actions ls action gact since 120000| grep index | wc -l 400 go get some coffee and wait for > 120 seconds and try again: prompt$ hackedtc actions ls action gact since 120000 | grep index | wc -l 0 Lets see a filter bound to one of these actions: .... filter pref 10 u32 filter pref 10 u32 fh 800: ht divisor 1 filter pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 (rule hit 2 success 1) match 7f000002/ffffffff at 12 (success 1 ) action order 1: gact action pass random type none pass val 0 index 23 ref 2 bind 1 installed 1145 sec used 802 sec Action statistics: Sent 84 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 .... that coffee took long, no? It was good. Now lets ping -c 1 127.0.0.2, then run the actions again: prompt$ hackedtc actions ls action gact since 120 | grep index | wc -l 1 More details please: prompt$ hackedtc -s actions ls action gact since 120000 action order 0: gact action pass random type none pass val 0 index 23 ref 2 bind 1 installed 1270 sec used 30 sec Action statistics: Sent 168 bytes 2 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 And the filter? filter pref 10 u32 filter pref 10 u32 fh 800: ht divisor 1 filter pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 (rule hit 4 success 2) match 7f000002/ffffffff at 12 (success 2 ) action order 1: gact action pass random type none pass val 0 index 23 ref 2 bind 1 installed 1324 sec used 84 sec Action statistics: Sent 168 bytes 2 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Jamal Hadi Salim authored
When you dump hundreds of thousands of actions, getting only 32 per dump batch even when the socket buffer and memory allocations allow is inefficient. With this change, the user will get as many as possibly fitting within the given constraints available to the kernel. The top level action TLV space is extended. An attribute TCA_ROOT_FLAGS is used to carry flags; flag TCA_FLAG_LARGE_DUMP_ON is set by the user indicating the user is capable of processing these large dumps. Older user space which doesnt set this flag doesnt get the large (than 32) batches. The kernel uses the TCA_ROOT_COUNT attribute to tell the user how many actions are put in a single batch. As such user space app knows how long to iterate (independent of the type of action being dumped) instead of hardcoded maximum of 32 thus maintaining backward compat. Some results dumping 1.5M actions below: first an unpatched tc which doesnt understand these features... prompt$ time -p tc actions ls action gact | grep index | wc -l 1500000 real 1388.43 user 2.07 sys 1386.79 Now lets see a patched tc which sets the correct flags when requesting a dump: prompt$ time -p updatedtc actions ls action gact | grep index | wc -l 1500000 real 178.13 user 2.02 sys 176.96 That is about 8x performance improvement for tc app which sets its receive buffer to about 32K. Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-