Commit 677fb752 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
drivers/net/ethernet/cadence/macb_main.c
  5cebb40b ("net: macb: Fix PTP one step sync support")
  138badbc ("net: macb: use NAPI for TX completion path")
https://lore.kernel.org/all/20220523111021.31489367@canb.auug.org.au/

net/smc/af_smc.c
  75c1edf2 ("net/smc: postpone sk_refcnt increment in connect()")
  3aba1030 ("net/smc: align the connect behaviour with TCP")
https://lore.kernel.org/all/20220524114408.4bf1af38@canb.auug.org.au/



Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 1ef0736c 7fb02697
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -382,6 +382,15 @@ option is set to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
If set to 1 (default), hash rethink is performed on listening socket.
If set to 0, hash rethink is not performed.

gro_normal_batch
----------------

Maximum number of the segments to batch up on output of GRO. When a packet
exits GRO, either as a coalesced superframe or as an original packet which
GRO has decided not to coalesce, it is placed on a per-NAPI list. This
list is then passed to the stack when the number of segments reaches the
gro_normal_batch limit.

2. /proc/sys/net/unix - Parameters for Unix domain sockets
----------------------------------------------------------

+6 −5
Original line number Diff line number Diff line
@@ -943,7 +943,7 @@ static void amt_req_work(struct work_struct *work)
	if (amt->status < AMT_STATUS_RECEIVED_ADVERTISEMENT)
		goto out;

	if (amt->req_cnt++ > AMT_MAX_REQ_COUNT) {
	if (amt->req_cnt > AMT_MAX_REQ_COUNT) {
		netdev_dbg(amt->dev, "Gateway is not ready");
		amt->qi = AMT_INIT_REQ_TIMEOUT;
		amt->ready4 = false;
@@ -951,13 +951,15 @@ static void amt_req_work(struct work_struct *work)
		amt->remote_ip = 0;
		__amt_update_gw_status(amt, AMT_STATUS_INIT, false);
		amt->req_cnt = 0;
		goto out;
	}
	spin_unlock_bh(&amt->lock);

	amt_send_request(amt, false);
	amt_send_request(amt, true);
	amt_update_gw_status(amt, AMT_STATUS_SENT_REQUEST, true);
	spin_lock_bh(&amt->lock);
	__amt_update_gw_status(amt, AMT_STATUS_SENT_REQUEST, true);
	amt->req_cnt++;
out:
	exp = min_t(u32, (1 * (1 << amt->req_cnt)), AMT_MAX_REQ_TIMEOUT);
	mod_delayed_work(amt_wq, &amt->req_wq, msecs_to_jiffies(exp * 1000));
@@ -2696,9 +2698,8 @@ static int amt_rcv(struct sock *sk, struct sk_buff *skb)
				err = true;
				goto drop;
			}
			if (amt_advertisement_handler(amt, skb))
				amt->dev->stats.rx_dropped++;
			goto out;
			err = amt_advertisement_handler(amt, skb);
			break;
		case AMT_MSG_MULTICAST_DATA:
			if (iph->saddr != amt->remote_ip) {
				netdev_dbg(amt->dev, "Invalid Relay IP\n");
+12 −3
Original line number Diff line number Diff line
@@ -5591,16 +5591,23 @@ static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
	const struct ethtool_ops *ops;
	struct net_device *real_dev;
	struct phy_device *phydev;
	int ret = 0;

	rcu_read_lock();
	real_dev = bond_option_active_slave_get_rcu(bond);
	dev_hold(real_dev);
	rcu_read_unlock();

	if (real_dev) {
		ops = real_dev->ethtool_ops;
		phydev = real_dev->phydev;

		if (phy_has_tsinfo(phydev)) {
			return phy_ts_info(phydev, info);
			ret = phy_ts_info(phydev, info);
			goto out;
		} else if (ops->get_ts_info) {
			return ops->get_ts_info(real_dev, info);
			ret = ops->get_ts_info(real_dev, info);
			goto out;
		}
	}

@@ -5608,7 +5615,9 @@ static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
				SOF_TIMESTAMPING_SOFTWARE;
	info->phc_index = -1;

	return 0;
out:
	dev_put(real_dev);
	return ret;
}

static const struct ethtool_ops bond_ethtool_ops = {
+2 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ source "drivers/net/dsa/realtek/Kconfig"

config NET_DSA_SMSC_LAN9303
	tristate
	depends on VLAN_8021Q || VLAN_8021Q=n
	select NET_DSA_TAG_LAN9303
	select REGMAP
	help
@@ -82,6 +81,7 @@ config NET_DSA_SMSC_LAN9303
config NET_DSA_SMSC_LAN9303_I2C
	tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in I2C managed mode"
	depends on I2C
	depends on VLAN_8021Q || VLAN_8021Q=n
	select NET_DSA_SMSC_LAN9303
	select REGMAP_I2C
	help
@@ -91,6 +91,7 @@ config NET_DSA_SMSC_LAN9303_I2C
config NET_DSA_SMSC_LAN9303_MDIO
	tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in MDIO managed mode"
	select NET_DSA_SMSC_LAN9303
	depends on VLAN_8021Q || VLAN_8021Q=n
	help
	  Enable access functions if the SMSC/Microchip LAN9303 is configured
	  for MDIO managed mode.
+36 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <linux/iopoll.h>
#include <linux/phy/phy.h>
#include <linux/pm_runtime.h>
#include <linux/ptp_classify.h>
#include <linux/reset.h>
#include "macb.h"

@@ -1122,6 +1123,36 @@ static void macb_tx_error_task(struct work_struct *work)
	napi_enable(&queue->napi_tx);
}

static bool ptp_one_step_sync(struct sk_buff *skb)
{
	struct ptp_header *hdr;
	unsigned int ptp_class;
	u8 msgtype;

	/* No need to parse packet if PTP TS is not involved */
	if (likely(!(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)))
		goto not_oss;

	/* Identify and return whether PTP one step sync is being processed */
	ptp_class = ptp_classify_raw(skb);
	if (ptp_class == PTP_CLASS_NONE)
		goto not_oss;

	hdr = ptp_parse_header(skb, ptp_class);
	if (!hdr)
		goto not_oss;

	if (hdr->flag_field[0] & PTP_FLAG_TWOSTEP)
		goto not_oss;

	msgtype = ptp_get_msgtype(hdr, ptp_class);
	if (msgtype == PTP_MSGTYPE_SYNC)
		return true;

not_oss:
	return false;
}

static int macb_tx_complete(struct macb_queue *queue, int budget)
{
	struct macb *bp = queue->bp;
@@ -1158,8 +1189,8 @@ static int macb_tx_complete(struct macb_queue *queue, int budget)

			/* First, update TX stats if needed */
			if (skb) {
				if (unlikely(skb_shinfo(skb)->tx_flags &
					     SKBTX_HW_TSTAMP) &&
				if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
				    !ptp_one_step_sync(skb) &&
				    gem_ptp_do_txstamp(queue, skb, desc) == 0) {
					/* skb now belongs to timestamp buffer
					 * and will be removed later
@@ -2063,7 +2094,8 @@ static unsigned int macb_tx_map(struct macb *bp,
			ctrl |= MACB_BF(TX_LSO, lso_ctrl);
			ctrl |= MACB_BF(TX_TCP_SEQ_SRC, seq_ctrl);
			if ((bp->dev->features & NETIF_F_HW_CSUM) &&
			    skb->ip_summed != CHECKSUM_PARTIAL && !lso_ctrl)
			    skb->ip_summed != CHECKSUM_PARTIAL && !lso_ctrl &&
			    !ptp_one_step_sync(skb))
				ctrl |= MACB_BIT(TX_NOCRC);
		} else
			/* Only set MSS/MFS on payload descriptors
@@ -2161,7 +2193,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)

	if (!(ndev->features & NETIF_F_HW_CSUM) ||
	    !((*skb)->ip_summed != CHECKSUM_PARTIAL) ||
	    skb_shinfo(*skb)->gso_size)	/* Not available for GSO */
	    skb_shinfo(*skb)->gso_size || ptp_one_step_sync(*skb))
		return 0;

	if (padlen <= 0) {
Loading