Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Merge in late fixes in preparation for the net-next PR.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+317 -118
+1
Documentation/netlink/specs/mptcp_pm.yaml
··· 15 15 type: enum 16 16 name: event-type 17 17 enum-name: mptcp-event-type 18 + doc: Netlink MPTCP event types 18 19 name-prefix: mptcp-event- 19 20 entries: 20 21 -
+4 -8
drivers/dpll/zl3073x/dpll.c
··· 1018 1018 out_id = zl3073x_output_pin_out_get(pin->id); 1019 1019 out = zl3073x_out_state_get(zldev, out_id); 1020 1020 1021 - /* Convert value to ps and reverse two's complement negation applied 1022 - * during 'set' 1023 - */ 1024 - *phase_adjust = -out->phase_comp * pin->phase_gran; 1021 + /* The value in the register is expressed in half synth clock cycles. */ 1022 + *phase_adjust = out->phase_comp * pin->phase_gran; 1025 1023 1026 1024 return 0; 1027 1025 } ··· 1041 1043 out_id = zl3073x_output_pin_out_get(pin->id); 1042 1044 out = *zl3073x_out_state_get(zldev, out_id); 1043 1045 1044 - /* The value in the register is stored as two's complement negation 1045 - * of requested value and expressed in half synth clock cycles. 1046 - */ 1047 - out.phase_comp = -phase_adjust / pin->phase_gran; 1046 + /* The value in the register is expressed in half synth clock cycles. */ 1047 + out.phase_comp = phase_adjust / pin->phase_gran; 1048 1048 1049 1049 /* Update output configuration from mailbox */ 1050 1050 return zl3073x_out_state_set(zldev, out_id, &out);
+9 -6
drivers/net/bonding/bond_main.c
··· 791 791 struct ethtool_link_ksettings ecmd; 792 792 int res; 793 793 794 - slave->speed = SPEED_UNKNOWN; 795 - slave->duplex = DUPLEX_UNKNOWN; 796 - 797 794 res = __ethtool_get_link_ksettings(slave_dev, &ecmd); 798 795 if (res < 0) 799 - return 1; 796 + goto speed_duplex_unknown; 800 797 if (ecmd.base.speed == 0 || ecmd.base.speed == ((__u32)-1)) 801 - return 1; 798 + goto speed_duplex_unknown; 802 799 switch (ecmd.base.duplex) { 803 800 case DUPLEX_FULL: 804 801 case DUPLEX_HALF: 805 802 break; 806 803 default: 807 - return 1; 804 + goto speed_duplex_unknown; 808 805 } 809 806 810 807 slave->speed = ecmd.base.speed; 811 808 slave->duplex = ecmd.base.duplex; 812 809 813 810 return 0; 811 + 812 + speed_duplex_unknown: 813 + slave->speed = SPEED_UNKNOWN; 814 + slave->duplex = DUPLEX_UNKNOWN; 815 + 816 + return 1; 814 817 } 815 818 816 819 const char *bond_slave_link_status(s8 link)
+3 -2
drivers/net/caif/caif_serial.c
··· 284 284 { 285 285 struct list_head list; 286 286 struct ser_device *ser, *tmp; 287 + struct tty_struct *tty; 287 288 288 289 spin_lock(&ser_lock); 289 290 list_replace_init(&ser_release_list, &list); ··· 293 292 if (!list_empty(&list)) { 294 293 rtnl_lock(); 295 294 list_for_each_entry_safe(ser, tmp, &list, node) { 295 + tty = ser->tty; 296 296 dev_close(ser->dev); 297 297 unregister_netdevice(ser->dev); 298 298 debugfs_deinit(ser); 299 + tty_kref_put(tty); 299 300 } 300 301 rtnl_unlock(); 301 302 } ··· 357 354 static void ldisc_close(struct tty_struct *tty) 358 355 { 359 356 struct ser_device *ser = tty->disc_data; 360 - 361 - tty_kref_put(ser->tty); 362 357 363 358 spin_lock(&ser_lock); 364 359 list_move(&ser->node, &ser_release_list);
+1 -1
drivers/net/ethernet/amd/Kconfig
··· 165 165 select CRC32 166 166 select PHYLIB 167 167 select AMD_XGBE_HAVE_ECC if X86 168 - select NET_SELFTESTS 168 + imply NET_SELFTESTS 169 169 help 170 170 This driver supports the AMD 10GbE Ethernet device found on an 171 171 AMD SoC.
+5 -6
drivers/net/ethernet/cadence/macb_main.c
··· 705 705 if (rx_pause) 706 706 ctrl |= MACB_BIT(PAE); 707 707 708 - /* Initialize rings & buffers as clearing MACB_BIT(TE) in link down 709 - * cleared the pipeline and control registers. 710 - */ 711 - macb_init_buffers(bp); 712 - 713 - for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) 708 + for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { 709 + queue->tx_head = 0; 710 + queue->tx_tail = 0; 714 711 queue_writel(queue, IER, 715 712 bp->rx_intr_mask | MACB_TX_INT_FLAGS | MACB_BIT(HRESP)); 713 + } 716 714 } 717 715 718 716 macb_or_gem_writel(bp, NCFGR, ctrl); ··· 2952 2954 } 2953 2955 2954 2956 bp->macbgem_ops.mog_init_rings(bp); 2957 + macb_init_buffers(bp); 2955 2958 2956 2959 for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { 2957 2960 napi_enable(&queue->napi_rx);
+9 -2
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
··· 1049 1049 int order; 1050 1050 1051 1051 if (!alloc_size) 1052 - return; 1052 + goto not_init; 1053 1053 1054 1054 order = get_order(alloc_size); 1055 1055 if (order > MAX_PAGE_ORDER) { 1056 1056 if (net_ratelimit()) 1057 1057 dev_warn(ring_to_dev(ring), "failed to allocate tx spare buffer, exceed to max order\n"); 1058 - return; 1058 + goto not_init; 1059 1059 } 1060 1060 1061 1061 tx_spare = devm_kzalloc(ring_to_dev(ring), sizeof(*tx_spare), ··· 1093 1093 devm_kfree(ring_to_dev(ring), tx_spare); 1094 1094 devm_kzalloc_error: 1095 1095 ring->tqp->handle->kinfo.tx_spare_buf_size = 0; 1096 + not_init: 1097 + /* When driver init or reset_init, the ring->tx_spare is always NULL; 1098 + * but when called from hns3_set_ringparam, it's usually not NULL, and 1099 + * will be restored if hns3_init_all_ring() failed. So it's safe to set 1100 + * ring->tx_spare to NULL here. 1101 + */ 1102 + ring->tx_spare = NULL; 1096 1103 } 1097 1104 1098 1105 /* Use hns3_tx_spare_space() to make sure there is enough buffer
+17 -4
drivers/net/ethernet/marvell/octeon_ep/octep_cn9k_pf.c
··· 307 307 } 308 308 309 309 /* Setup registers for a hardware Rx Queue */ 310 - static void octep_setup_oq_regs_cn93_pf(struct octep_device *oct, int oq_no) 310 + static int octep_setup_oq_regs_cn93_pf(struct octep_device *oct, int oq_no) 311 311 { 312 312 u64 reg_val; 313 313 u64 oq_ctl = 0ULL; ··· 355 355 reg_val = ((u64)time_threshold << 32) | 356 356 CFG_GET_OQ_INTR_PKT(oct->conf); 357 357 octep_write_csr64(oct, CN93_SDP_R_OUT_INT_LEVELS(oq_no), reg_val); 358 + return 0; 358 359 } 359 360 360 361 /* Setup registers for a PF mailbox */ ··· 710 709 /* Disable all interrupts */ 711 710 static void octep_disable_interrupts_cn93_pf(struct octep_device *oct) 712 711 { 713 - u64 intr_mask = 0ULL; 712 + u64 reg_val, intr_mask = 0ULL; 714 713 int srn, num_rings, i; 715 714 716 715 srn = CFG_GET_PORTS_PF_SRN(oct->conf); 717 716 num_rings = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); 718 717 719 - for (i = 0; i < num_rings; i++) 720 - intr_mask |= (0x1ULL << (srn + i)); 718 + for (i = 0; i < num_rings; i++) { 719 + intr_mask |= BIT_ULL(srn + i); 720 + reg_val = octep_read_csr64(oct, 721 + CN93_SDP_R_IN_INT_LEVELS(srn + i)); 722 + reg_val &= ~CN93_INT_ENA_BIT; 723 + octep_write_csr64(oct, 724 + CN93_SDP_R_IN_INT_LEVELS(srn + i), reg_val); 725 + 726 + reg_val = octep_read_csr64(oct, 727 + CN93_SDP_R_OUT_INT_LEVELS(srn + i)); 728 + reg_val &= ~CN93_INT_ENA_BIT; 729 + octep_write_csr64(oct, 730 + CN93_SDP_R_OUT_INT_LEVELS(srn + i), reg_val); 731 + } 721 732 722 733 octep_write_csr64(oct, CN93_SDP_EPF_IRERR_RINT_ENA_W1C, intr_mask); 723 734 octep_write_csr64(oct, CN93_SDP_EPF_ORERR_RINT_ENA_W1C, intr_mask);
+53 -11
drivers/net/ethernet/marvell/octeon_ep/octep_cnxk_pf.c
··· 8 8 #include <linux/pci.h> 9 9 #include <linux/netdevice.h> 10 10 #include <linux/etherdevice.h> 11 + #include <linux/jiffies.h> 11 12 12 13 #include "octep_config.h" 13 14 #include "octep_main.h" ··· 328 327 } 329 328 330 329 /* Setup registers for a hardware Rx Queue */ 331 - static void octep_setup_oq_regs_cnxk_pf(struct octep_device *oct, int oq_no) 330 + static int octep_setup_oq_regs_cnxk_pf(struct octep_device *oct, int oq_no) 332 331 { 333 - u64 reg_val; 334 - u64 oq_ctl = 0ULL; 335 - u32 time_threshold = 0; 336 332 struct octep_oq *oq = oct->oq[oq_no]; 333 + unsigned long t_out_jiffies; 334 + u32 time_threshold = 0; 335 + u64 oq_ctl = 0ULL; 336 + u64 reg_ba_val; 337 + u64 reg_val; 337 338 338 339 oq_no += CFG_GET_PORTS_PF_SRN(oct->conf); 339 340 reg_val = octep_read_csr64(oct, CNXK_SDP_R_OUT_CONTROL(oq_no)); ··· 345 342 do { 346 343 reg_val = octep_read_csr64(oct, CNXK_SDP_R_OUT_CONTROL(oq_no)); 347 344 } while (!(reg_val & CNXK_R_OUT_CTL_IDLE)); 345 + } 346 + octep_write_csr64(oct, CNXK_SDP_R_OUT_WMARK(oq_no), oq->max_count); 347 + /* Wait for WMARK to get applied */ 348 + usleep_range(10, 15); 349 + 350 + octep_write_csr64(oct, CNXK_SDP_R_OUT_SLIST_BADDR(oq_no), 351 + oq->desc_ring_dma); 352 + octep_write_csr64(oct, CNXK_SDP_R_OUT_SLIST_RSIZE(oq_no), 353 + oq->max_count); 354 + reg_ba_val = octep_read_csr64(oct, CNXK_SDP_R_OUT_SLIST_BADDR(oq_no)); 355 + 356 + if (reg_ba_val != oq->desc_ring_dma) { 357 + t_out_jiffies = jiffies + 10 * HZ; 358 + do { 359 + if (reg_ba_val == ULLONG_MAX) 360 + return -EFAULT; 361 + octep_write_csr64(oct, 362 + CNXK_SDP_R_OUT_SLIST_BADDR(oq_no), 363 + oq->desc_ring_dma); 364 + octep_write_csr64(oct, 365 + CNXK_SDP_R_OUT_SLIST_RSIZE(oq_no), 366 + oq->max_count); 367 + reg_ba_val = 368 + octep_read_csr64(oct, 369 + CNXK_SDP_R_OUT_SLIST_BADDR(oq_no)); 370 + } while ((reg_ba_val != oq->desc_ring_dma) && 371 + time_before(jiffies, t_out_jiffies)); 372 + 373 + if (reg_ba_val != oq->desc_ring_dma) 374 + return -EAGAIN; 348 375 } 349 376 350 377 reg_val &= ~(CNXK_R_OUT_CTL_IMODE); ··· 389 356 reg_val |= (CNXK_R_OUT_CTL_ES_P); 390 357 391 358 octep_write_csr64(oct, CNXK_SDP_R_OUT_CONTROL(oq_no), reg_val); 392 - octep_write_csr64(oct, CNXK_SDP_R_OUT_SLIST_BADDR(oq_no), 393 - oq->desc_ring_dma); 394 - octep_write_csr64(oct, CNXK_SDP_R_OUT_SLIST_RSIZE(oq_no), 395 - oq->max_count); 396 359 397 360 oq_ctl = octep_read_csr64(oct, CNXK_SDP_R_OUT_CONTROL(oq_no)); 398 361 ··· 414 385 reg_val &= ~0xFFFFFFFFULL; 415 386 reg_val |= CFG_GET_OQ_WMARK(oct->conf); 416 387 octep_write_csr64(oct, CNXK_SDP_R_OUT_WMARK(oq_no), reg_val); 388 + return 0; 417 389 } 418 390 419 391 /* Setup registers for a PF mailbox */ ··· 750 720 /* Disable all interrupts */ 751 721 static void octep_disable_interrupts_cnxk_pf(struct octep_device *oct) 752 722 { 753 - u64 intr_mask = 0ULL; 723 + u64 reg_val, intr_mask = 0ULL; 754 724 int srn, num_rings, i; 755 725 756 726 srn = CFG_GET_PORTS_PF_SRN(oct->conf); 757 727 num_rings = CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); 758 728 759 - for (i = 0; i < num_rings; i++) 760 - intr_mask |= (0x1ULL << (srn + i)); 729 + for (i = 0; i < num_rings; i++) { 730 + intr_mask |= BIT_ULL(srn + i); 731 + reg_val = octep_read_csr64(oct, 732 + CNXK_SDP_R_IN_INT_LEVELS(srn + i)); 733 + reg_val &= ~CNXK_INT_ENA_BIT; 734 + octep_write_csr64(oct, 735 + CNXK_SDP_R_IN_INT_LEVELS(srn + i), reg_val); 736 + 737 + reg_val = octep_read_csr64(oct, 738 + CNXK_SDP_R_OUT_INT_LEVELS(srn + i)); 739 + reg_val &= ~CNXK_INT_ENA_BIT; 740 + octep_write_csr64(oct, 741 + CNXK_SDP_R_OUT_INT_LEVELS(srn + i), reg_val); 742 + } 761 743 762 744 octep_write_csr64(oct, CNXK_SDP_EPF_IRERR_RINT_ENA_W1C, intr_mask); 763 745 octep_write_csr64(oct, CNXK_SDP_EPF_ORERR_RINT_ENA_W1C, intr_mask);
+1 -1
drivers/net/ethernet/marvell/octeon_ep/octep_main.h
··· 77 77 78 78 struct octep_hw_ops { 79 79 void (*setup_iq_regs)(struct octep_device *oct, int q); 80 - void (*setup_oq_regs)(struct octep_device *oct, int q); 80 + int (*setup_oq_regs)(struct octep_device *oct, int q); 81 81 void (*setup_mbox_regs)(struct octep_device *oct, int mbox); 82 82 83 83 irqreturn_t (*mbox_intr_handler)(void *ioq_vector);
+1
drivers/net/ethernet/marvell/octeon_ep/octep_regs_cn9k_pf.h
··· 416 416 #define CN93_PEM_BAR4_INDEX 7 417 417 #define CN93_PEM_BAR4_INDEX_SIZE 0x400000ULL 418 418 #define CN93_PEM_BAR4_INDEX_OFFSET (CN93_PEM_BAR4_INDEX * CN93_PEM_BAR4_INDEX_SIZE) 419 + #define CN93_INT_ENA_BIT BIT_ULL(62) 419 420 420 421 #endif /* _OCTEP_REGS_CN9K_PF_H_ */
+1
drivers/net/ethernet/marvell/octeon_ep/octep_regs_cnxk_pf.h
··· 413 413 #define CNXK_PEM_BAR4_INDEX 7 414 414 #define CNXK_PEM_BAR4_INDEX_SIZE 0x400000ULL 415 415 #define CNXK_PEM_BAR4_INDEX_OFFSET (CNXK_PEM_BAR4_INDEX * CNXK_PEM_BAR4_INDEX_SIZE) 416 + #define CNXK_INT_ENA_BIT BIT_ULL(62) 416 417 417 418 #endif /* _OCTEP_REGS_CNXK_PF_H_ */
+7 -1
drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
··· 12 12 #include "octep_config.h" 13 13 #include "octep_main.h" 14 14 15 + static void octep_oq_free_ring_buffers(struct octep_oq *oq); 16 + 15 17 static void octep_oq_reset_indices(struct octep_oq *oq) 16 18 { 17 19 oq->host_read_idx = 0; ··· 172 170 goto oq_fill_buff_err; 173 171 174 172 octep_oq_reset_indices(oq); 175 - oct->hw_ops.setup_oq_regs(oct, q_no); 173 + if (oct->hw_ops.setup_oq_regs(oct, q_no)) 174 + goto oq_setup_err; 175 + 176 176 oct->num_oqs++; 177 177 178 178 return 0; 179 179 180 + oq_setup_err: 181 + octep_oq_free_ring_buffers(oq); 180 182 oq_fill_buff_err: 181 183 vfree(oq->buff_info); 182 184 oq->buff_info = NULL;
+2 -1
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_cn9k.c
··· 196 196 } 197 197 198 198 /* Setup registers for a hardware Rx Queue */ 199 - static void octep_vf_setup_oq_regs_cn93(struct octep_vf_device *oct, int oq_no) 199 + static int octep_vf_setup_oq_regs_cn93(struct octep_vf_device *oct, int oq_no) 200 200 { 201 201 struct octep_vf_oq *oq = oct->oq[oq_no]; 202 202 u32 time_threshold = 0; ··· 239 239 time_threshold = CFG_GET_OQ_INTR_TIME(oct->conf); 240 240 reg_val = ((u64)time_threshold << 32) | CFG_GET_OQ_INTR_PKT(oct->conf); 241 241 octep_vf_write_csr64(oct, CN93_VF_SDP_R_OUT_INT_LEVELS(oq_no), reg_val); 242 + return 0; 242 243 } 243 244 244 245 /* Setup registers for a VF mailbox */
+36 -3
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_cnxk.c
··· 199 199 } 200 200 201 201 /* Setup registers for a hardware Rx Queue */ 202 - static void octep_vf_setup_oq_regs_cnxk(struct octep_vf_device *oct, int oq_no) 202 + static int octep_vf_setup_oq_regs_cnxk(struct octep_vf_device *oct, int oq_no) 203 203 { 204 204 struct octep_vf_oq *oq = oct->oq[oq_no]; 205 + unsigned long t_out_jiffies; 205 206 u32 time_threshold = 0; 206 207 u64 oq_ctl = ULL(0); 208 + u64 reg_ba_val; 207 209 u64 reg_val; 208 210 209 211 reg_val = octep_vf_read_csr64(oct, CNXK_VF_SDP_R_OUT_CONTROL(oq_no)); ··· 215 213 do { 216 214 reg_val = octep_vf_read_csr64(oct, CNXK_VF_SDP_R_OUT_CONTROL(oq_no)); 217 215 } while (!(reg_val & CNXK_VF_R_OUT_CTL_IDLE)); 216 + } 217 + octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_WMARK(oq_no), 218 + oq->max_count); 219 + /* Wait for WMARK to get applied */ 220 + usleep_range(10, 15); 221 + 222 + octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_SLIST_BADDR(oq_no), 223 + oq->desc_ring_dma); 224 + octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_SLIST_RSIZE(oq_no), 225 + oq->max_count); 226 + reg_ba_val = octep_vf_read_csr64(oct, 227 + CNXK_VF_SDP_R_OUT_SLIST_BADDR(oq_no)); 228 + if (reg_ba_val != oq->desc_ring_dma) { 229 + t_out_jiffies = jiffies + 10 * HZ; 230 + do { 231 + if (reg_ba_val == ULLONG_MAX) 232 + return -EFAULT; 233 + octep_vf_write_csr64(oct, 234 + CNXK_VF_SDP_R_OUT_SLIST_BADDR 235 + (oq_no), oq->desc_ring_dma); 236 + octep_vf_write_csr64(oct, 237 + CNXK_VF_SDP_R_OUT_SLIST_RSIZE 238 + (oq_no), oq->max_count); 239 + reg_ba_val = 240 + octep_vf_read_csr64(oct, 241 + CNXK_VF_SDP_R_OUT_SLIST_BADDR 242 + (oq_no)); 243 + } while ((reg_ba_val != oq->desc_ring_dma) && 244 + time_before(jiffies, t_out_jiffies)); 245 + 246 + if (reg_ba_val != oq->desc_ring_dma) 247 + return -EAGAIN; 218 248 } 219 249 220 250 reg_val &= ~(CNXK_VF_R_OUT_CTL_IMODE); ··· 261 227 reg_val |= (CNXK_VF_R_OUT_CTL_ES_P); 262 228 263 229 octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_CONTROL(oq_no), reg_val); 264 - octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_SLIST_BADDR(oq_no), oq->desc_ring_dma); 265 - octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_SLIST_RSIZE(oq_no), oq->max_count); 266 230 267 231 oq_ctl = octep_vf_read_csr64(oct, CNXK_VF_SDP_R_OUT_CONTROL(oq_no)); 268 232 /* Clear the ISIZE and BSIZE (22-0) */ ··· 282 250 reg_val &= ~GENMASK_ULL(31, 0); 283 251 reg_val |= CFG_GET_OQ_WMARK(oct->conf); 284 252 octep_vf_write_csr64(oct, CNXK_VF_SDP_R_OUT_WMARK(oq_no), reg_val); 253 + return 0; 285 254 } 286 255 287 256 /* Setup registers for a VF mailbox */
+1 -1
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.h
··· 55 55 56 56 struct octep_vf_hw_ops { 57 57 void (*setup_iq_regs)(struct octep_vf_device *oct, int q); 58 - void (*setup_oq_regs)(struct octep_vf_device *oct, int q); 58 + int (*setup_oq_regs)(struct octep_vf_device *oct, int q); 59 59 void (*setup_mbox_regs)(struct octep_vf_device *oct, int mbox); 60 60 61 61 irqreturn_t (*non_ioq_intr_handler)(void *ioq_vector);
+7 -1
drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_rx.c
··· 12 12 #include "octep_vf_config.h" 13 13 #include "octep_vf_main.h" 14 14 15 + static void octep_vf_oq_free_ring_buffers(struct octep_vf_oq *oq); 16 + 15 17 static void octep_vf_oq_reset_indices(struct octep_vf_oq *oq) 16 18 { 17 19 oq->host_read_idx = 0; ··· 173 171 goto oq_fill_buff_err; 174 172 175 173 octep_vf_oq_reset_indices(oq); 176 - oct->hw_ops.setup_oq_regs(oct, q_no); 174 + if (oct->hw_ops.setup_oq_regs(oct, q_no)) 175 + goto oq_setup_err; 176 + 177 177 oct->num_oqs++; 178 178 179 179 return 0; 180 180 181 + oq_setup_err: 182 + octep_vf_oq_free_ring_buffers(oq); 181 183 oq_fill_buff_err: 182 184 vfree(oq->buff_info); 183 185 oq->buff_info = NULL;
+2
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
··· 1823 1823 cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false); 1824 1824 cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true); 1825 1825 kfree(lmac->mac_to_index_bmap.bmap); 1826 + rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap); 1827 + rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap); 1826 1828 kfree(lmac->name); 1827 1829 kfree(lmac); 1828 1830 }
+11
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
··· 3632 3632 devm_kfree(&pdev->dev, rvu); 3633 3633 } 3634 3634 3635 + static void rvu_shutdown(struct pci_dev *pdev) 3636 + { 3637 + struct rvu *rvu = pci_get_drvdata(pdev); 3638 + 3639 + if (!rvu) 3640 + return; 3641 + 3642 + rvu_clear_rvum_blk_revid(rvu); 3643 + } 3644 + 3635 3645 static struct pci_driver rvu_driver = { 3636 3646 .name = DRV_NAME, 3637 3647 .id_table = rvu_id_table, 3638 3648 .probe = rvu_probe, 3639 3649 .remove = rvu_remove, 3650 + .shutdown = rvu_shutdown, 3640 3651 }; 3641 3652 3642 3653 static int __init rvu_init_module(void)
+1
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
··· 3315 3315 err_sriov_cleannup: 3316 3316 otx2_sriov_vfcfg_cleanup(pf); 3317 3317 err_pf_sriov_init: 3318 + otx2_unregister_dl(pf); 3318 3319 otx2_shutdown_tc(pf); 3319 3320 err_mcam_flow_del: 3320 3321 otx2_mcam_flow_del(pf);
-1
drivers/net/ethernet/marvell/skge.c
··· 78 78 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4320) }, /* SK-98xx V2.0 */ 79 79 { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* D-Link DGE-530T (rev.B) */ 80 80 { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4c00) }, /* D-Link DGE-530T */ 81 - { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302) }, /* D-Link DGE-530T Rev C1 */ 82 81 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, /* Marvell Yukon 88E8001/8003/8010 */ 83 82 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */ 84 83 { PCI_DEVICE(PCI_VENDOR_ID_CNET, 0x434E) }, /* CNet PowerG-2000 */
+4 -3
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
··· 263 263 /* This means there's no module plugged in */ 264 264 break; 265 265 default: 266 - dev_info(lif->ionic->dev, "unknown xcvr type pid=%d / 0x%x\n", 267 - idev->port_info->status.xcvr.pid, 268 - idev->port_info->status.xcvr.pid); 266 + dev_dbg_ratelimited(lif->ionic->dev, 267 + "unknown xcvr type pid=%d / 0x%x\n", 268 + idev->port_info->status.xcvr.pid, 269 + idev->port_info->status.xcvr.pid); 269 270 break; 270 271 } 271 272
+7 -8
drivers/net/ethernet/renesas/rswitch_l2.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* Renesas Ethernet Switch device driver 3 3 * 4 - * Copyright (C) 2025 Renesas Electronics Corporation 4 + * Copyright (C) 2025 - 2026 Renesas Electronics Corporation 5 5 */ 6 6 7 7 #include <linux/err.h> ··· 60 60 static void rswitch_update_l2_hw_forwarding(struct rswitch_private *priv) 61 61 { 62 62 struct rswitch_device *rdev; 63 + bool new_forwarding_offload; 63 64 unsigned int fwd_mask; 64 65 65 66 /* calculate fwd_mask with zeroes in bits corresponding to ports that ··· 74 73 } 75 74 76 75 rswitch_for_all_ports(priv, rdev) { 77 - if ((rdev_for_l2_offload(rdev) && rdev->forwarding_requested) || 78 - rdev->forwarding_offloaded) { 76 + new_forwarding_offload = (rdev_for_l2_offload(rdev) && rdev->forwarding_requested); 77 + 78 + if (new_forwarding_offload || rdev->forwarding_offloaded) { 79 79 /* Update allowed offload destinations even for ports 80 80 * with L2 offload enabled earlier. 81 81 * ··· 86 84 priv->addr + FWPC2(rdev->port)); 87 85 } 88 86 89 - if (rdev_for_l2_offload(rdev) && 90 - rdev->forwarding_requested && 91 - !rdev->forwarding_offloaded) { 87 + if (new_forwarding_offload && !rdev->forwarding_offloaded) 92 88 rswitch_change_l2_hw_offloading(rdev, true, false); 93 - } else if (rdev->forwarding_offloaded) { 89 + else if (!new_forwarding_offload && rdev->forwarding_offloaded) 94 90 rswitch_change_l2_hw_offloading(rdev, false, false); 95 - } 96 91 } 97 92 } 98 93
+2 -2
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
··· 91 91 /* Get bus_id, this can be overwritten later */ 92 92 plat->bus_id = pci_dev_id(pdev); 93 93 94 - /* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */ 95 - plat->clk_csr = STMMAC_CSR_20_35M; 94 + /* clk_csr_i = 100-150MHz & MDC = clk_csr_i/62 */ 95 + plat->clk_csr = STMMAC_CSR_100_150M; 96 96 plat->core_type = DWMAC_CORE_GMAC; 97 97 plat->force_sf_dma_mode = 1; 98 98
+3
drivers/net/ethernet/sun/sunhme.c
··· 2551 2551 goto err_out_clear_quattro; 2552 2552 } 2553 2553 2554 + /* BIGMAC may have bogus sizes */ 2555 + if ((op->resource[3].end - op->resource[3].start) >= BMAC_REG_SIZE) 2556 + op->resource[3].end = op->resource[3].start + BMAC_REG_SIZE - 1; 2554 2557 hp->bigmacregs = devm_platform_ioremap_resource(op, 3); 2555 2558 if (IS_ERR(hp->bigmacregs)) { 2556 2559 dev_err(&op->dev, "Cannot map BIGMAC registers.\n");
+1
drivers/net/ethernet/ti/Kconfig
··· 192 192 depends on NET_SWITCHDEV 193 193 depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER 194 194 depends on PTP_1588_CLOCK_OPTIONAL 195 + depends on HSR || !HSR 195 196 help 196 197 Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem. 197 198 This subsystem is available starting with the AM65 platform.
+6 -9
drivers/net/ethernet/ti/cpsw_new.c
··· 1472 1472 1473 1473 for (i = 0; i < cpsw->data.slaves; i++) { 1474 1474 ndev = cpsw->slaves[i].ndev; 1475 - if (!ndev) 1475 + if (!ndev || ndev->reg_state != NETREG_REGISTERED) 1476 1476 continue; 1477 1477 1478 1478 priv = netdev_priv(ndev); ··· 1494 1494 if (ret) { 1495 1495 dev_err(cpsw->dev, 1496 1496 "cpsw: err registering net device%d\n", i); 1497 - cpsw->slaves[i].ndev = NULL; 1498 1497 break; 1499 1498 } 1500 1499 } ··· 2002 2003 /* setup netdevs */ 2003 2004 ret = cpsw_create_ports(cpsw); 2004 2005 if (ret) 2005 - goto clean_unregister_netdev; 2006 + goto clean_cpts; 2006 2007 2007 2008 /* Grab RX and TX IRQs. Note that we also have RX_THRESHOLD and 2008 2009 * MISC IRQs which are always kept disabled with this driver so ··· 2016 2017 0, dev_name(dev), cpsw); 2017 2018 if (ret < 0) { 2018 2019 dev_err(dev, "error attaching irq (%d)\n", ret); 2019 - goto clean_unregister_netdev; 2020 + goto clean_cpts; 2020 2021 } 2021 2022 2022 2023 ret = devm_request_irq(dev, cpsw->irqs_table[1], cpsw_tx_interrupt, 2023 2024 0, dev_name(dev), cpsw); 2024 2025 if (ret < 0) { 2025 2026 dev_err(dev, "error attaching irq (%d)\n", ret); 2026 - goto clean_unregister_netdev; 2027 + goto clean_cpts; 2027 2028 } 2028 2029 2029 2030 if (!cpsw->cpts) ··· 2033 2034 0, dev_name(&pdev->dev), cpsw); 2034 2035 if (ret < 0) { 2035 2036 dev_err(dev, "error attaching misc irq (%d)\n", ret); 2036 - goto clean_unregister_netdev; 2037 + goto clean_cpts; 2037 2038 } 2038 2039 2039 2040 /* Enable misc CPTS evnt_pend IRQ */ ··· 2042 2043 skip_cpts: 2043 2044 ret = cpsw_register_notifiers(cpsw); 2044 2045 if (ret) 2045 - goto clean_unregister_netdev; 2046 + goto clean_cpts; 2046 2047 2047 2048 ret = cpsw_register_devlink(cpsw); 2048 2049 if (ret) ··· 2064 2065 2065 2066 clean_unregister_notifiers: 2066 2067 cpsw_unregister_notifiers(cpsw); 2067 - clean_unregister_netdev: 2068 - cpsw_unregister_ports(cpsw); 2069 2068 clean_cpts: 2070 2069 cpts_release(cpsw->cpts); 2071 2070 cpdma_ctlr_destroy(cpsw->dma);
+2 -6
drivers/net/wan/fsl_ucc_hdlc.c
··· 790 790 791 791 if (priv->rx_buffer) { 792 792 dma_free_coherent(priv->dev, 793 - RX_BD_RING_LEN * MAX_RX_BUF_LENGTH, 793 + (RX_BD_RING_LEN + TX_BD_RING_LEN) * MAX_RX_BUF_LENGTH, 794 794 priv->rx_buffer, priv->dma_rx_addr); 795 795 priv->rx_buffer = NULL; 796 796 priv->dma_rx_addr = 0; 797 - } 798 797 799 - if (priv->tx_buffer) { 800 - dma_free_coherent(priv->dev, 801 - TX_BD_RING_LEN * MAX_RX_BUF_LENGTH, 802 - priv->tx_buffer, priv->dma_tx_addr); 803 798 priv->tx_buffer = NULL; 804 799 priv->dma_tx_addr = 0; 800 + 805 801 } 806 802 } 807 803
+1 -1
include/uapi/linux/mptcp_pm.h
··· 11 11 #define MPTCP_PM_VER 1 12 12 13 13 /** 14 - * enum mptcp_event_type 14 + * enum mptcp_event_type - Netlink MPTCP event types 15 15 * @MPTCP_EVENT_UNSPEC: unused event 16 16 * @MPTCP_EVENT_CREATED: A new MPTCP connection has been created. It is the 17 17 * good time to allocate memory and send ADD_ADDR if needed. Depending on the
+54 -2
net/atm/signaling.c
··· 22 22 23 23 struct atm_vcc *sigd = NULL; 24 24 25 + /* 26 + * find_get_vcc - validate and get a reference to a vcc pointer 27 + * @vcc: the vcc pointer to validate 28 + * 29 + * This function validates that @vcc points to a registered VCC in vcc_hash. 30 + * If found, it increments the socket reference count and returns the vcc. 31 + * The caller must call sock_put(sk_atm(vcc)) when done. 32 + * 33 + * Returns the vcc pointer if valid, NULL otherwise. 34 + */ 35 + static struct atm_vcc *find_get_vcc(struct atm_vcc *vcc) 36 + { 37 + int i; 38 + 39 + read_lock(&vcc_sklist_lock); 40 + for (i = 0; i < VCC_HTABLE_SIZE; i++) { 41 + struct sock *s; 42 + 43 + sk_for_each(s, &vcc_hash[i]) { 44 + if (atm_sk(s) == vcc) { 45 + sock_hold(s); 46 + read_unlock(&vcc_sklist_lock); 47 + return vcc; 48 + } 49 + } 50 + } 51 + read_unlock(&vcc_sklist_lock); 52 + return NULL; 53 + } 54 + 25 55 static void sigd_put_skb(struct sk_buff *skb) 26 56 { 27 57 if (!sigd) { ··· 99 69 100 70 msg = (struct atmsvc_msg *) skb->data; 101 71 WARN_ON(refcount_sub_and_test(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc)); 102 - vcc = *(struct atm_vcc **) &msg->vcc; 72 + 73 + vcc = find_get_vcc(*(struct atm_vcc **)&msg->vcc); 74 + if (!vcc) { 75 + pr_debug("invalid vcc pointer in msg\n"); 76 + dev_kfree_skb(skb); 77 + return -EINVAL; 78 + } 79 + 103 80 pr_debug("%d (0x%lx)\n", (int)msg->type, (unsigned long)vcc); 104 81 sk = sk_atm(vcc); 105 82 ··· 137 100 clear_bit(ATM_VF_WAITING, &vcc->flags); 138 101 break; 139 102 case as_indicate: 140 - vcc = *(struct atm_vcc **)&msg->listen_vcc; 103 + /* Release the reference from msg->vcc, we'll use msg->listen_vcc instead */ 104 + sock_put(sk); 105 + 106 + vcc = find_get_vcc(*(struct atm_vcc **)&msg->listen_vcc); 107 + if (!vcc) { 108 + pr_debug("invalid listen_vcc pointer in msg\n"); 109 + dev_kfree_skb(skb); 110 + return -EINVAL; 111 + } 112 + 141 113 sk = sk_atm(vcc); 142 114 pr_debug("as_indicate!!!\n"); 143 115 lock_sock(sk); ··· 161 115 sk->sk_state_change(sk); 162 116 as_indicate_complete: 163 117 release_sock(sk); 118 + /* Paired with find_get_vcc(msg->listen_vcc) above */ 119 + sock_put(sk); 164 120 return 0; 165 121 case as_close: 166 122 set_bit(ATM_VF_RELEASED, &vcc->flags); ··· 179 131 break; 180 132 default: 181 133 pr_alert("bad message type %d\n", (int)msg->type); 134 + /* Paired with find_get_vcc(msg->vcc) above */ 135 + sock_put(sk); 182 136 return -EINVAL; 183 137 } 184 138 sk->sk_state_change(sk); 185 139 out: 186 140 dev_kfree_skb(skb); 141 + /* Paired with find_get_vcc(msg->vcc) above */ 142 + sock_put(sk); 187 143 return 0; 188 144 } 189 145
+25 -4
net/ipv4/icmp.c
··· 559 559 /* steal dst entry from skb_in, don't drop refcnt */ 560 560 skb_dstref_steal(skb_in); 561 561 skb_dstref_restore(skb_in, orefdst); 562 + 563 + /* 564 + * At this point, fl4_dec.daddr should NOT be local (we 565 + * checked fl4_dec.saddr above). However, a race condition 566 + * may occur if the address is added to the interface 567 + * concurrently. In that case, ip_route_input() returns a 568 + * LOCAL route with dst.output=ip_rt_bug, which must not 569 + * be used for output. 570 + */ 571 + if (!err && rt2 && rt2->rt_type == RTN_LOCAL) { 572 + net_warn_ratelimited("detected local route for %pI4 during ICMP sending, src %pI4\n", 573 + &fl4_dec.daddr, &fl4_dec.saddr); 574 + dst_release(&rt2->dst); 575 + err = -EINVAL; 576 + } 562 577 } 563 578 564 579 if (err) ··· 1052 1037 /* Checkin full IP header plus 8 bytes of protocol to 1053 1038 * avoid additional coding at protocol handlers. 1054 1039 */ 1055 - if (!pskb_may_pull(skb, iph->ihl * 4 + 8)) { 1056 - __ICMP_INC_STATS(dev_net_rcu(skb->dev), ICMP_MIB_INERRORS); 1057 - return; 1058 - } 1040 + if (!pskb_may_pull(skb, iph->ihl * 4 + 8)) 1041 + goto out; 1042 + 1043 + /* IPPROTO_RAW sockets are not supposed to receive anything. */ 1044 + if (protocol == IPPROTO_RAW) 1045 + goto out; 1059 1046 1060 1047 raw_icmp_error(skb, protocol, info); 1061 1048 1062 1049 ipprot = rcu_dereference(inet_protos[protocol]); 1063 1050 if (ipprot && ipprot->err_handler) 1064 1051 ipprot->err_handler(skb, info); 1052 + return; 1053 + 1054 + out: 1055 + __ICMP_INC_STATS(dev_net_rcu(skb->dev), ICMP_MIB_INERRORS); 1065 1056 } 1066 1057 1067 1058 static bool icmp_tag_validation(int proto)
+6
net/ipv6/icmp.c
··· 1067 1067 if (reason != SKB_NOT_DROPPED_YET) 1068 1068 goto out; 1069 1069 1070 + if (nexthdr == IPPROTO_RAW) { 1071 + /* Add a more specific reason later ? */ 1072 + reason = SKB_DROP_REASON_NOT_SPECIFIED; 1073 + goto out; 1074 + } 1075 + 1070 1076 /* BUGGG_FUTURE: we should try to parse exthdrs in this packet. 1071 1077 Without this we will not able f.e. to make source routed 1072 1078 pmtu discovery.
+12 -17
net/mptcp/pm_kernel.c
··· 1044 1044 return ret; 1045 1045 } 1046 1046 1047 - static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk, 1047 + static void mptcp_pm_remove_anno_addr(struct mptcp_sock *msk, 1048 1048 const struct mptcp_addr_info *addr, 1049 1049 bool force) 1050 1050 { 1051 1051 struct mptcp_rm_list list = { .nr = 0 }; 1052 - bool ret; 1052 + bool announced; 1053 1053 1054 1054 list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr); 1055 1055 1056 - ret = mptcp_remove_anno_list_by_saddr(msk, addr); 1057 - if (ret || force) { 1056 + announced = mptcp_remove_anno_list_by_saddr(msk, addr); 1057 + if (announced || force) { 1058 1058 spin_lock_bh(&msk->pm.lock); 1059 - if (ret) { 1060 - __set_bit(addr->id, msk->pm.id_avail_bitmap); 1059 + if (announced) 1061 1060 msk->pm.add_addr_signaled--; 1062 - } 1063 1061 mptcp_pm_remove_addr(msk, &list); 1064 1062 spin_unlock_bh(&msk->pm.lock); 1065 1063 } 1066 - return ret; 1067 1064 } 1068 1065 1069 1066 static void __mark_subflow_endp_available(struct mptcp_sock *msk, u8 id) ··· 1094 1097 !(entry->flags & MPTCP_PM_ADDR_FLAG_IMPLICIT)); 1095 1098 1096 1099 list.ids[0] = mptcp_endp_get_local_id(msk, addr); 1097 - if (remove_subflow) { 1098 - spin_lock_bh(&msk->pm.lock); 1099 - mptcp_pm_rm_subflow(msk, &list); 1100 - spin_unlock_bh(&msk->pm.lock); 1101 - } 1102 1100 1103 - if (entry->flags & MPTCP_PM_ADDR_FLAG_SUBFLOW) { 1104 - spin_lock_bh(&msk->pm.lock); 1101 + spin_lock_bh(&msk->pm.lock); 1102 + if (remove_subflow) 1103 + mptcp_pm_rm_subflow(msk, &list); 1104 + if (entry->flags & MPTCP_PM_ADDR_FLAG_SUBFLOW) 1105 1105 __mark_subflow_endp_available(msk, list.ids[0]); 1106 - spin_unlock_bh(&msk->pm.lock); 1107 - } 1106 + else /* mark endp ID as available, e.g. Signal or MPC endp */ 1107 + __set_bit(addr->id, msk->pm.id_avail_bitmap); 1108 + spin_unlock_bh(&msk->pm.lock); 1108 1109 1109 1110 if (msk->mpc_endpoint_id == entry->addr.id) 1110 1111 msk->mpc_endpoint_id = 0;
+9 -7
net/mptcp/token.c
··· 103 103 * It creates a unique token to identify the new mptcp connection, 104 104 * a secret local key and the initial data sequence number (idsn). 105 105 * 106 - * Returns 0 on success. 106 + * Return: 0 on success. 107 107 */ 108 108 int mptcp_token_new_request(struct request_sock *req) 109 109 { ··· 146 146 * the computed token at a later time, this is needed to process 147 147 * join requests. 148 148 * 149 - * returns 0 on success. 149 + * Return: 0 on success. 150 150 */ 151 151 int mptcp_token_new_connect(struct sock *ssk) 152 152 { ··· 241 241 * This function returns the mptcp connection structure with the given token. 242 242 * A reference count on the mptcp socket returned is taken. 243 243 * 244 - * returns NULL if no connection with the given token value exists. 244 + * Return: NULL if no connection with the given token value exists. 245 245 */ 246 246 struct mptcp_sock *mptcp_token_get_sock(struct net *net, u32 token) 247 247 { ··· 288 288 * @s_slot: start slot number 289 289 * @s_num: start number inside the given lock 290 290 * 291 - * This function returns the first mptcp connection structure found inside the 292 - * token container starting from the specified position, or NULL. 291 + * Description: 292 + * On successful iteration, the iterator is moved to the next position and a 293 + * reference to the returned socket is acquired. 293 294 * 294 - * On successful iteration, the iterator is moved to the next position and 295 - * a reference to the returned socket is acquired. 295 + * Return: 296 + * The first mptcp connection structure found inside the token container 297 + * starting from the specified position, or NULL. 296 298 */ 297 299 struct mptcp_sock *mptcp_token_iter_next(const struct net *net, long *s_slot, 298 300 long *s_num)
+8
net/nfc/hci/llc_shdlc.c
··· 762 762 { 763 763 struct llc_shdlc *shdlc = nfc_llc_get_data(llc); 764 764 765 + timer_shutdown_sync(&shdlc->connect_timer); 766 + timer_shutdown_sync(&shdlc->t1_timer); 767 + timer_shutdown_sync(&shdlc->t2_timer); 768 + shdlc->t1_active = false; 769 + shdlc->t2_active = false; 770 + 771 + cancel_work_sync(&shdlc->sm_work); 772 + 765 773 skb_queue_purge(&shdlc->rcv_q); 766 774 skb_queue_purge(&shdlc->send_q); 767 775 skb_queue_purge(&shdlc->ack_pending_q);
+1 -1
net/tipc/crypto.c
··· 460 460 rcu_read_lock(); 461 461 tmp = rcu_dereference(aead); 462 462 if (tmp) 463 - atomic_add_unless(&rcu_dereference(aead)->users, -1, lim); 463 + atomic_add_unless(&tmp->users, -1, lim); 464 464 rcu_read_unlock(); 465 465 } 466 466
+3 -8
net/unix/af_unix.c
··· 1650 1650 1651 1651 timeo = sock_sndtimeo(sk, flags & O_NONBLOCK); 1652 1652 1653 - /* First of all allocate resources. 1654 - * If we will make it after state is locked, 1655 - * we will have to recheck all again in any case. 1656 - */ 1653 + err = prepare_peercred(&peercred); 1654 + if (err) 1655 + goto out; 1657 1656 1658 1657 /* create new sock for complete connection */ 1659 1658 newsk = unix_create1(net, NULL, 0, sock->type); ··· 1660 1661 err = PTR_ERR(newsk); 1661 1662 goto out; 1662 1663 } 1663 - 1664 - err = prepare_peercred(&peercred); 1665 - if (err) 1666 - goto out; 1667 1664 1668 1665 /* Allocate skb for sending to listening sock */ 1669 1666 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL);
+1 -1
tools/testing/selftests/net/mptcp/mptcp_connect.c
··· 1367 1367 1368 1368 int main_loop(void) 1369 1369 { 1370 + struct addrinfo *peer = NULL; 1370 1371 int fd = 0, ret, fd_in = 0; 1371 - struct addrinfo *peer; 1372 1372 struct wstate winfo; 1373 1373 1374 1374 if (cfg_input && cfg_sockopt_types.mptfo) {