Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 531e93d1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:
 "I was battling a cold after some recent trips, so quite a bit piled up
  meanwhile, sorry about that.

  Highlights:

   1) Fix fd leak in various bpf selftests, from Brian Vazquez.

   2) Fix crash in xsk when device doesn't support some methods, from
      Magnus Karlsson.

   3) Fix various leaks and use-after-free in rxrpc, from David Howells.

   4) Fix several SKB leaks due to confusion of who owns an SKB and who
      should release it in the llc code. From Eric Biggers.

   5) Kill a bunc of KCSAN warnings in TCP, from Eric Dumazet.

   6) Jumbo packets don't work after resume on r8169, as the BIOS resets
      the chip into non-jumbo mode during suspend. From Heiner Kallweit.

   7) Corrupt L2 header during MPLS push, from Davide Caratti.

   8) Prevent possible infinite loop in tc_ctl_action, from Eric
      Dumazet.

   9) Get register bits right in bcmgenet driver, based upon chip
      version. From Florian Fainelli.

  10) Fix mutex problems in microchip DSA driver, from Marek Vasut.

  11) Cure race between route lookup and invalidation in ipv4, from Wei
      Wang.

  12) Fix performance regression due to false sharing in 'net'
      structure, from Eric Dumazet"

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (145 commits)
  net: reorder 'struct net' fields to avoid false sharing
  net: dsa: fix switch tree list
  net: ethernet: dwmac-sun8i: show message only when switching to promisc
  net: aquantia: add an error handling in aq_nic_set_multicast_list
  net: netem: correct the parent's backlog when corrupted packet was dropped
  net: netem: fix error path for corrupted GSO frames
  macb: propagate errors when getting optional clocks
  xen/netback: fix error path of xenvif_connect_data()
  net: hns3: fix mis-counting IRQ vector numbers issue
  net: usb: lan78xx: Connect PHY before registering MAC
  vsock/virtio: discard packets if credit is not respected
  vsock/virtio: send a credit update when buffer size is changed
  mlxsw: spectrum_trap: Push Ethernet header before reporting trap
  net: ensure correct skb->tstamp in various fragmenters
  net: bcmgenet: reset 40nm EPHY on energy detect
  net: bcmgenet: soft reset 40nm EPHYs before MAC init
  net: phy: bcm7xxx: define soft_reset for 40nm EPHY
  net: bcmgenet: don't set phydev->link from MAC
  net: Update address for MediaTek ethernet driver in MAINTAINERS
  ipv4: fix race condition between route lookup and invalidation
  ...
parents 998d7551 2a06b898
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,8 +36,10 @@ Support
=======
For general Linux networking support, please use the netdev mailing
list, which is monitored by Pensando personnel::

  netdev@vger.kernel.org

For more specific support needs, please use the Pensando driver support
email::

  drivers@pensando.io
+18 −18
Original line number Diff line number Diff line
@@ -92,16 +92,16 @@ under some conditions.
Part III: Registering a Network Device to DIM
==============================================

Net DIM API exposes the main function net_dim(struct net_dim *dim,
struct net_dim_sample end_sample). This function is the entry point to the Net
Net DIM API exposes the main function net_dim(struct dim *dim,
struct dim_sample end_sample). This function is the entry point to the Net
DIM algorithm and has to be called every time the driver would like to check if
it should change interrupt moderation parameters. The driver should provide two
data structures: struct net_dim and struct net_dim_sample. Struct net_dim
data structures: struct dim and struct dim_sample. Struct dim
describes the state of DIM for a specific object (RX queue, TX queue,
other queues, etc.). This includes the current selected profile, previous data
samples, the callback function provided by the driver and more.
Struct net_dim_sample describes a data sample, which will be compared to the
data sample stored in struct net_dim in order to decide on the algorithm's next
Struct dim_sample describes a data sample, which will be compared to the
data sample stored in struct dim in order to decide on the algorithm's next
step. The sample should include bytes, packets and interrupts, measured by
the driver.

@@ -110,9 +110,9 @@ main net_dim() function. The recommended method is to call net_dim() on each
interrupt. Since Net DIM has a built-in moderation and it might decide to skip
iterations under certain conditions, there is no need to moderate the net_dim()
calls as well. As mentioned above, the driver needs to provide an object of type
struct net_dim to the net_dim() function call. It is advised for each entity
using Net DIM to hold a struct net_dim as part of its data structure and use it
as the main Net DIM API object. The struct net_dim_sample should hold the latest
struct dim to the net_dim() function call. It is advised for each entity
using Net DIM to hold a struct dim as part of its data structure and use it
as the main Net DIM API object. The struct dim_sample should hold the latest
bytes, packets and interrupts count. No need to perform any calculations, just
include the raw data.

@@ -132,19 +132,19 @@ usage is not complete but it should make the outline of the usage clear.

my_driver.c:

#include <linux/net_dim.h>
#include <linux/dim.h>

/* Callback for net DIM to schedule on a decision to change moderation */
void my_driver_do_dim_work(struct work_struct *work)
{
	/* Get struct net_dim from struct work_struct */
	struct net_dim *dim = container_of(work, struct net_dim,
	/* Get struct dim from struct work_struct */
	struct dim *dim = container_of(work, struct dim,
				       work);
	/* Do interrupt moderation related stuff */
	...

	/* Signal net DIM work is done and it should move to next iteration */
	dim->state = NET_DIM_START_MEASURE;
	dim->state = DIM_START_MEASURE;
}

/* My driver's interrupt handler */
@@ -152,10 +152,10 @@ int my_driver_handle_interrupt(struct my_driver_entity *my_entity, ...)
{
	...
	/* A struct to hold current measured data */
	struct net_dim_sample dim_sample;
	struct dim_sample dim_sample;
	...
	/* Initiate data sample struct with current data */
	net_dim_sample(my_entity->events,
	dim_update_sample(my_entity->events,
		          my_entity->packets,
		          my_entity->bytes,
		          &dim_sample);
+3 −3
Original line number Diff line number Diff line
@@ -9122,7 +9122,7 @@ F: drivers/auxdisplay/ks0108.c
F:	include/linux/ks0108.h
L3MDEV
M:	David Ahern <dsa@cumulusnetworks.com>
M:	David Ahern <dsahern@kernel.org>
L:	netdev@vger.kernel.org
S:	Maintained
F:	net/l3mdev
@@ -10255,7 +10255,7 @@ MEDIATEK ETHERNET DRIVER
M:	Felix Fietkau <nbd@openwrt.org>
M:	John Crispin <john@phrozen.org>
M:	Sean Wang <sean.wang@mediatek.com>
M:	Nelson Chang <nelson.chang@mediatek.com>
M:	Mark Lee <Mark-MC.Lee@mediatek.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/ethernet/mediatek/
@@ -17433,7 +17433,7 @@ F: include/linux/regulator/
K:	regulator_get_optional
VRF
M:	David Ahern <dsa@cumulusnetworks.com>
M:	David Ahern <dsahern@kernel.org>
M:	Shrijeet Mukherjee <shrijeet@gmail.com>
L:	netdev@vger.kernel.org
S:	Maintained
+12 −1
Original line number Diff line number Diff line
@@ -66,9 +66,21 @@
	pinctrl-1 = <&ephy_leds_pins>;
	status = "okay";

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";
		fixed-link {
			speed = <2500>;
			full-duplex;
			pause;
		};
	};

	gmac1: mac@1 {
		compatible = "mediatek,eth-mac";
		reg = <1>;
		phy-mode = "gmii";
		phy-handle = <&phy0>;
	};

@@ -78,7 +90,6 @@

		phy0: ethernet-phy@0 {
			reg = <0>;
			phy-mode = "gmii";
		};
	};
};
+0 −2
Original line number Diff line number Diff line
@@ -468,14 +468,12 @@
			compatible = "mediatek,mt7629-sgmiisys", "syscon";
			reg = <0x1b128000 0x3000>;
			#clock-cells = <1>;
			mediatek,physpeed = "2500";
		};

		sgmiisys1: syscon@1b130000 {
			compatible = "mediatek,mt7629-sgmiisys", "syscon";
			reg = <0x1b130000 0x3000>;
			#clock-cells = <1>;
			mediatek,physpeed = "2500";
		};
	};
};
Loading