Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 6 Apr 2023 18:58:36 +0000 (11:58 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Apr 2023 19:01:20 +0000 (12:01 -0700)
Conflicts:

drivers/net/ethernet/google/gve/gve.h
  3ce934558097 ("gve: Secure enough bytes in the first TX desc for all TCP pkts")
  75eaae158b1b ("gve: Add XDP DROP and TX support for GQI-QPL format")
https://lore.kernel.org/all/20230406104927.45d176f5@canb.auug.org.au/
https://lore.kernel.org/all/c5872985-1a95-0bc8-9dcc-b6f23b439e9d@tessares.net/

Adjacent changes:

net/can/isotp.c
  051737439eae ("can: isotp: fix race between isotp_sendsmg() and isotp_release()")
  96d1c81e6a04 ("can: isotp: add module parameter for maximum pdu size")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
19 files changed:
1  2 
MAINTAINERS
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_tx.c
drivers/net/ethernet/mediatek/mtk_eth_soc.c
drivers/net/ethernet/ti/am65-cpsw-nuss.c
drivers/net/phy/phylink.c
drivers/net/phy/sfp.c
include/linux/phylink.h
include/net/raw.h
net/can/isotp.c
net/ipv4/raw.c
net/ipv4/raw_diag.c
net/ipv6/ip6_output.c
net/ipv6/raw.c
net/netlink/af_netlink.c
net/vmw_vsock/virtio_transport_common.c
net/vmw_vsock/vmci_transport.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
  
  #define GVE_RX_BUFFER_SIZE_DQO 2048
  
 +#define GVE_XDP_ACTIONS 5
 +
 +#define GVE_TX_MAX_HEADER_SIZE 182
 +
+ #define GVE_GQ_TX_MIN_PKT_DESC_BYTES 182
  /* Each slot in the desc ring has a 1:1 mapping to a slot in the data ring */
  struct gve_rx_desc_queue {
        struct gve_rx_desc *desc_ring; /* the descriptor ring */
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/can/isotp.c
@@@ -951,36 -928,27 +951,37 @@@ static int isotp_sendmsg(struct socket 
        int off;
        int err;
  
-       if (!so->bound)
+       if (!so->bound || so->tx.state == ISOTP_SHUTDOWN)
                return -EADDRNOTAVAIL;
  
+ wait_free_buffer:
        /* we do not support multiple buffers - for now */
-       if (cmpxchg(&so->tx.state, ISOTP_IDLE, ISOTP_SENDING) != ISOTP_IDLE ||
-           wq_has_sleeper(&so->wait)) {
-               if (msg->msg_flags & MSG_DONTWAIT) {
-                       err = -EAGAIN;
-                       goto err_out;
-               }
+       if (wq_has_sleeper(&so->wait) && (msg->msg_flags & MSG_DONTWAIT))
+               return -EAGAIN;
  
-               /* wait for complete transmission of current pdu */
-               err = wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE);
-               if (err)
-                       goto err_out;
+       /* wait for complete transmission of current pdu */
+       err = wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE);
+       if (err)
+               goto err_event_drop;
  
-               so->tx.state = ISOTP_SENDING;
+       if (cmpxchg(&so->tx.state, ISOTP_IDLE, ISOTP_SENDING) != ISOTP_IDLE) {
+               if (so->tx.state == ISOTP_SHUTDOWN)
+                       return -EADDRNOTAVAIL;
+               goto wait_free_buffer;
        }
  
 -      if (!size || size > MAX_MSG_LENGTH) {
 +      /* PDU size > default => try max_pdu_size */
 +      if (size > so->tx.buflen && so->tx.buflen < max_pdu_size) {
 +              u8 *newbuf = kmalloc(max_pdu_size, GFP_KERNEL);
 +
 +              if (newbuf) {
 +                      so->tx.buf = newbuf;
 +                      so->tx.buflen = max_pdu_size;
 +              }
 +      }
 +
 +      if (!size || size > so->tx.buflen) {
                err = -EINVAL;
                goto err_out_drop;
        }
diff --cc net/ipv4/raw.c
Simple merge
Simple merge
Simple merge
diff --cc net/ipv6/raw.c
Simple merge
Simple merge
Simple merge