Demande de devis
Besoin de... Si vous ne voyez pas ce message correctement, [consultez-le en ligne] (https://loursonblanc-news.com/c6.php?ec=2=f4iAuoK8eG9n=ZGRolWaTaGlk=ZQ=pqqkkaPVlGSUnNFyltSXnMSnyV+i1Zo=m6iq1KOdYGafn9qko9Ggmc6V05Rg0Zir15KYpqRjr7Z9ioi9d5tlZmljlWdypHh6p3aqaWeWdWWlqmZvbGSomXVsaaZnmmRpkmOZYKDKog=8). Bonjour, Avez-vous besoin de masques jetables pour protéger vos clients & collaborateurs ? Nous vous proposons des Masques certifés : Type 1, 2R et enfants À partir de 0.09 € HT pièce (pour les grandes quantités) • Livrables immédiatement • Pas d’acompte • Paiement intégral après la livraison. [Pour demander un devis : cliquez-ici] (mailto:thie...@createurdevisite.fr?subject=Demande%20de%20devis%20pour%20les%20masques=Indiquez-nous%20le%20type%20et%20nombre%20de%20masques.%20%0D%0AVous%20recevrez%20imm%C3%A9diatement%20un%20devis%20%3A%20%0D%0AType%20%3A%20%0D%0ANombre%20%3A%20%0D%0ASouhaite%20%C3%AAtre%20rappel%C3%A9%20au%20N%C2%B0%20%3A%20%0D%0A) Ou répondez simplement à ce mail À votre disposition. Très cordialement, Dominique DRUON +33 6 24 62 55 85 [domini...@loursonblanc.fr] (mailto:domini...@loursonblanc.fr) L’Ourson Blanc Livraison partout Europe et Domtom 59 bis rue des Poutrains - 59200 Tourcoing - Siret : 82746685500018 Si vous ne souhaitez plus recevoir nos messages, suivez ce lien : [Veuillez me retirer de votre liste de diffusion] (https://loursonblanc-news.com/d6.php?ec=2=f4iAuoK8eG9n=pqqkkaPVlGSUnNFyltSXnMSnyV+i1Zo=ZGRolWaTaGlk=8) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367980 - head/sys/kern
Author: cy Date: Tue Nov 24 06:42:32 2020 New Revision: 367980 URL: https://svnweb.freebsd.org/changeset/base/367980 Log: Fix a typo in a comment. MFC after:3 days Modified: head/sys/kern/kern_ntptime.c Modified: head/sys/kern/kern_ntptime.c == --- head/sys/kern/kern_ntptime.cTue Nov 24 04:16:49 2020 (r367979) +++ head/sys/kern/kern_ntptime.cTue Nov 24 06:42:32 2020 (r367980) @@ -590,7 +590,7 @@ ntp_update_second(int64_t *adjustment, time_t *newsec) /* * Apply any correction from adjtime(2). If more than one second -* off we slew at a rate of 5ms/s (5000 PPM) else 500us/s (500PPM) +* off we slew at a rate of 5ms/s (5000 PPM) else 500us/s (500 PPM) * until the last second is slewed the final < 500 usecs. */ if (time_adjtime != 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367979 - head/sys/dev/isp
Author: mav Date: Tue Nov 24 04:16:49 2020 New Revision: 367979 URL: https://svnweb.freebsd.org/changeset/base/367979 Log: Implement request queue overflow protection. Before this change in case of request queue overflow driver just froze the device queue for 100ms to retry after. It was pretty bad for performance. This change introduces SIM queue freezing when free space on the request queue drops below 255 entries (worst case of maximum I/O size S/G list), checking for a chance to release it on I/O completion. If the queue still get overflowed somehow, the old mechanism is still in place, just with delay reduced to 10ms. With the earlier queue length increase overflows should not happen often, but it is still easily reachable on synthetic tests. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Tue Nov 24 03:49:37 2020(r367978) +++ head/sys/dev/isp/isp.c Tue Nov 24 04:16:49 2020(r367979) @@ -263,6 +263,9 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) return; } + isp->isp_reqidx = isp->isp_reqodx = 0; + isp->isp_resodx = 0; + isp->isp_atioodx = 0; ISP_WRITE(isp, BIU2400_REQINP, 0); ISP_WRITE(isp, BIU2400_REQOUTP, 0); ISP_WRITE(isp, BIU2400_RSPINP, 0); @@ -573,14 +576,16 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); + /* +* For the maximum number of commands take free exchange control block +* buffer count reported by firmware, limiting it to the maximum of our +* hardcoded handle format (16K now) minus some management reserve. +*/ MBSINIT(, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); isp_mboxcmd(isp, ); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) return; - } - isp->isp_maxcmds = mbs.param[3]; - /* Limit to the maximum of our hardcoded handle format (16K now). */ - isp->isp_maxcmds = MIN(isp->isp_maxcmds, ISP_HANDLE_MAX - ISP_HANDLE_RESERVE); + isp->isp_maxcmds = MIN(mbs.param[3], ISP_HANDLE_MAX - ISP_HANDLE_RESERVE); isp_prt(isp, ISP_LOGCONFIG, "%d max I/O command limit set", isp->isp_maxcmds); /* @@ -888,6 +893,8 @@ isp_init(ispsoftc_t *isp) isp_prt(isp, ISP_LOGERR, "No valid WWNs to use"); return; } + icbp->icb_rspnsin = isp->isp_resodx; + icbp->icb_rqstout = isp->isp_reqidx; icbp->icb_retry_count = fcp->isp_retry_count; icbp->icb_rqstqlen = RQUEST_QUEUE_LEN(isp); @@ -913,6 +920,7 @@ isp_init(ispsoftc_t *isp) #ifdef ISP_TARGET_MODE /* unconditionally set up the ATIO queue if we support target mode */ + icbp->icb_atio_in = isp->isp_atioodx; icbp->icb_atioqlen = ATIO_QUEUE_LEN(isp); if (icbp->icb_atioqlen < 8) { isp_prt(isp, ISP_LOGERR, "bad ATIO queue length %d", icbp->icb_atioqlen); @@ -1031,11 +1039,6 @@ isp_init(ispsoftc_t *isp) if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return; } - isp->isp_reqidx = 0; - isp->isp_reqodx = 0; - isp->isp_residx = 0; - isp->isp_resodx = 0; - isp->isp_atioodx = 0; /* * Whatever happens, we're now committed to being here. @@ -3237,8 +3240,6 @@ isp_intr_respq(ispsoftc_t *isp) } iptr = ISP_READ(isp, BIU2400_RSPINP); - isp->isp_residx = iptr; - optr = isp->isp_resodx; while (optr != iptr) { sptr = cptr = optr; Modified: head/sys/dev/isp/isp_freebsd.c == --- head/sys/dev/isp/isp_freebsd.c Tue Nov 24 03:49:37 2020 (r367978) +++ head/sys/dev/isp/isp_freebsd.c Tue Nov 24 04:16:49 2020 (r367979) @@ -54,6 +54,8 @@ static const char prom3[] = "Chan %d [%u] PortID 0x%06 static void isp_freeze_loopdown(ispsoftc_t *, int); static void isp_loop_changed(ispsoftc_t *isp, int chan); +static void isp_rq_check_above(ispsoftc_t *); +static void isp_rq_check_below(ispsoftc_t *); static d_ioctl_t ispioctl; static void isp_poll(struct cam_sim *); static callout_func_t isp_watchdog; @@ -350,6 +352,36 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, int chan) } } +/* + * Functions to protect from request queue overflow by freezing SIM queue. + * XXX: freezing only one arbitrary SIM, since they all share the queue. + */ +static void +isp_rq_check_above(ispsoftc_t *isp) +{ + struct isp_fc *fc = ISP_FC_PC(isp, 0); + + if (isp->isp_rqovf || fc->sim == NULL) + return; +
svn commit: r367978 - head/sys/kern
Author: mjg Date: Tue Nov 24 03:49:37 2020 New Revision: 367978 URL: https://svnweb.freebsd.org/changeset/base/367978 Log: locks: push lock_delay_arg_init calls down Minor cleanup to skip doing them when recursing on locks and so that they can act on found lock value if need be. Modified: head/sys/kern/kern_lock.c head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_lock.c == --- head/sys/kern/kern_lock.c Tue Nov 24 03:48:44 2020(r367977) +++ head/sys/kern/kern_lock.c Tue Nov 24 03:49:37 2020(r367978) @@ -603,10 +603,10 @@ lockmgr_slock_hard(struct lock *lk, u_int flags, struc if (LK_CAN_WITNESS(flags)) WITNESS_CHECKORDER(>lock_object, LOP_NEWORDER, file, line, flags & LK_INTERLOCK ? ilk : NULL); + x = lockmgr_read_value(lk); lock_delay_arg_init(, _delay); if (!lk_adaptive) flags &= ~LK_ADAPTIVE; - x = lockmgr_read_value(lk); /* * The lock may already be locked exclusive by curthread, * avoid deadlock. Modified: head/sys/kern/kern_mutex.c == --- head/sys/kern/kern_mutex.c Tue Nov 24 03:48:44 2020(r367977) +++ head/sys/kern/kern_mutex.c Tue Nov 24 03:49:37 2020(r367978) @@ -535,12 +535,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) if (SCHEDULER_STOPPED_TD(td)) return; -#if defined(ADAPTIVE_MUTEXES) - lock_delay_arg_init(, _delay); -#elif defined(KDTRACE_HOOKS) - lock_delay_arg_init_noadapt(); -#endif - if (__predict_false(v == MTX_UNOWNED)) v = MTX_READ_VALUE(m); @@ -562,6 +556,12 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) opts &= ~MTX_RECURSE; #endif +#if defined(ADAPTIVE_MUTEXES) + lock_delay_arg_init(, _delay); +#elif defined(KDTRACE_HOOKS) + lock_delay_arg_init_noadapt(); +#endif + #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); #endif @@ -746,12 +746,12 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t if (SCHEDULER_STOPPED()) return; - lock_delay_arg_init(, _spin_delay); - if (LOCK_LOG_TEST(>lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), "spinning", "lockname:\"%s\"", m->lock_object.lo_name); + + lock_delay_arg_init(, _spin_delay); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); Modified: head/sys/kern/kern_rwlock.c == --- head/sys/kern/kern_rwlock.c Tue Nov 24 03:48:44 2020(r367977) +++ head/sys/kern/kern_rwlock.c Tue Nov 24 03:49:37 2020(r367978) @@ -948,11 +948,6 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC if (SCHEDULER_STOPPED()) return; -#if defined(ADAPTIVE_RWLOCKS) - lock_delay_arg_init(, _delay); -#elif defined(KDTRACE_HOOKS) - lock_delay_arg_init_noadapt(); -#endif if (__predict_false(v == RW_UNLOCKED)) v = RW_READ_VALUE(rw); @@ -970,6 +965,12 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC if (LOCK_LOG_TEST(>lock_object, 0)) CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, rw->lock_object.lo_name, (void *)rw->rw_lock, file, line); + +#if defined(ADAPTIVE_RWLOCKS) + lock_delay_arg_init(, _delay); +#elif defined(KDTRACE_HOOKS) + lock_delay_arg_init_noadapt(); +#endif #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); Modified: head/sys/kern/kern_sx.c == --- head/sys/kern/kern_sx.c Tue Nov 24 03:48:44 2020(r367977) +++ head/sys/kern/kern_sx.c Tue Nov 24 03:49:37 2020(r367978) @@ -620,12 +620,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO if (SCHEDULER_STOPPED()) return (0); -#if defined(ADAPTIVE_SX) - lock_delay_arg_init(, _delay); -#elif defined(KDTRACE_HOOKS) - lock_delay_arg_init_noadapt(); -#endif - if (__predict_false(x == SX_LOCK_UNLOCKED)) x = SX_READ_VALUE(sx); @@ -644,6 +638,12 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO if (LOCK_LOG_TEST(>lock_object, 0)) CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, sx->lock_object.lo_name, (void *)sx->sx_lock, file, line); + +#if defined(ADAPTIVE_SX) + lock_delay_arg_init(, _delay); +#elif defined(KDTRACE_HOOKS) + lock_delay_arg_init_noadapt(); +#endif #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed);
svn commit: r367977 - head/sys/kern
Author: mjg Date: Tue Nov 24 03:48:44 2020 New Revision: 367977 URL: https://svnweb.freebsd.org/changeset/base/367977 Log: sx: drop spurious volatile keyword Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c == --- head/sys/kern/kern_sx.c Tue Nov 24 02:51:45 2020(r367976) +++ head/sys/kern/kern_sx.c Tue Nov 24 03:48:44 2020(r367977) @@ -573,7 +573,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO GIANT_DECLARE; uintptr_t tid, setx; #ifdef ADAPTIVE_SX - volatile struct thread *owner; + struct thread *owner; u_int i, n, spintries = 0; enum { READERS, WRITER } sleep_reason = READERS; bool in_critical = false; @@ -1020,7 +1020,7 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO GIANT_DECLARE; struct thread *td; #ifdef ADAPTIVE_SX - volatile struct thread *owner; + struct thread *owner; u_int i, n, spintries = 0; #endif #ifdef LOCK_PROFILING ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367976 - head/sbin/ping6
Author: asomers Date: Tue Nov 24 02:51:45 2020 New Revision: 367976 URL: https://svnweb.freebsd.org/changeset/base/367976 Log: ping6: update usage text after r365547 MFC after:2 weeks Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c == --- head/sbin/ping6/ping6.c Tue Nov 24 02:05:43 2020(r367975) +++ head/sbin/ping6/ping6.c Tue Nov 24 02:51:45 2020(r367976) @@ -2868,7 +2868,8 @@ usage(void) " [-P policy]" #endif " [-S sourceaddr] [-s packetsize]\n" - " [-t timeout] [-W waittime] [hops ...] host\n"); + " [-t timeout] [-W waittime] [-z tclass] [hops ...] " + "host\n"); exit(1); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367975 - svnadmin/conf
Author: grehan Date: Tue Nov 24 02:05:43 2020 New Revision: 367975 URL: https://svnweb.freebsd.org/changeset/base/367975 Log: Restore Bryan Venteicher's commit bit grehan to rementor Approved by: core@ Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessTue Nov 24 00:30:47 2020(r367974) +++ svnadmin/conf/accessTue Nov 24 02:05:43 2020(r367975) @@ -43,6 +43,7 @@ br brd brooks brueffer +bryanv bwidawsk bz cem Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Tue Nov 24 00:30:47 2020(r367974) +++ svnadmin/conf/mentors Tue Nov 24 02:05:43 2020(r367975) @@ -13,6 +13,7 @@ afedorov vmaffione Co-mentor: jhb anish jhb brdallanjude Co-mentor: bapt +bryanv grehan gordon delphij Co-mentor: emaste jceel trasz jkhrwatson ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367974 - in stable/12/sys/dev: ahci mvs siis
Author: mav Date: Tue Nov 24 00:30:47 2020 New Revision: 367974 URL: https://svnweb.freebsd.org/changeset/base/367974 Log: MFC r366922, r367915, r367916: Pass lower 3 bits of sector_count for FPDMA commands. When this code was written those bits were N/A, but now the lowest bit is Rebuild Assist Recovery Control (RARC). Modified: stable/12/sys/dev/ahci/ahci.c stable/12/sys/dev/mvs/mvs.c stable/12/sys/dev/siis/siis.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ahci/ahci.c == --- stable/12/sys/dev/ahci/ahci.c Tue Nov 24 00:27:21 2020 (r367973) +++ stable/12/sys/dev/ahci/ahci.c Tue Nov 24 00:30:47 2020 (r367974) @@ -2579,10 +2579,10 @@ ahci_setup_fis(struct ahci_channel *ch, struct ahci_cm fis[9] = ccb->ataio.cmd.lba_mid_exp; fis[10] = ccb->ataio.cmd.lba_high_exp; fis[11] = ccb->ataio.cmd.features_exp; + fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] = tag << 3; - } else { - fis[12] = ccb->ataio.cmd.sector_count; + fis[12] &= 0x07; + fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp; if (ccb->ataio.ata_flags & ATA_FLAG_ICC) Modified: stable/12/sys/dev/mvs/mvs.c == --- stable/12/sys/dev/mvs/mvs.c Tue Nov 24 00:27:21 2020(r367973) +++ stable/12/sys/dev/mvs/mvs.c Tue Nov 24 00:30:47 2020(r367974) @@ -1495,7 +1495,8 @@ mvs_execute_transaction(struct mvs_slot *slot) crqb->cmd[i++] = ccb->ataio.cmd.features; crqb->cmd[i++] = 0x11; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - crqb->cmd[i++] = slot->tag << 3; + crqb->cmd[i++] = (slot->tag << 3) | + (ccb->ataio.cmd.sector_count & 0x07); crqb->cmd[i++] = 0x12; } else { crqb->cmd[i++] = ccb->ataio.cmd.sector_count_exp; Modified: stable/12/sys/dev/siis/siis.c == --- stable/12/sys/dev/siis/siis.c Tue Nov 24 00:27:21 2020 (r367973) +++ stable/12/sys/dev/siis/siis.c Tue Nov 24 00:30:47 2020 (r367974) @@ -1722,13 +1722,12 @@ siis_setup_fis(device_t dev, struct siis_cmd *ctp, uni fis[9] = ccb->ataio.cmd.lba_mid_exp; fis[10] = ccb->ataio.cmd.lba_high_exp; fis[11] = ccb->ataio.cmd.features_exp; + fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] = tag << 3; - fis[13] = 0; - } else { - fis[12] = ccb->ataio.cmd.sector_count; - fis[13] = ccb->ataio.cmd.sector_count_exp; + fis[12] &= 0x07; + fis[12] |= tag << 3; } + fis[13] = ccb->ataio.cmd.sector_count_exp; if (ccb->ataio.ata_flags & ATA_FLAG_ICC) fis[14] = ccb->ataio.icc; fis[15] = ATA_A_4BIT; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367973 - in stable/12/sys/dev/cxgbe: . common
Author: np Date: Tue Nov 24 00:27:21 2020 New Revision: 367973 URL: https://svnweb.freebsd.org/changeset/base/367973 Log: MFC r367502: cxgbe(4): Allow the PF driver to set a VF's MAC address. The MAC address can be set with the optional mac-addr property in the VF section of the iovctl.conf(5) used to instantiate the VFs. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_iov.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/common.h == --- stable/12/sys/dev/cxgbe/common/common.h Tue Nov 24 00:25:03 2020 (r367972) +++ stable/12/sys/dev/cxgbe/common/common.h Tue Nov 24 00:27:21 2020 (r367973) @@ -691,6 +691,8 @@ void t4_idma_monitor_init(struct adapter *adapter, void t4_idma_monitor(struct adapter *adapter, struct sge_idma_monitor_state *idma, int hz, int ticks); +int t4_set_vf_mac(struct adapter *adapter, unsigned int pf, unsigned int vf, + unsigned int naddr, u8 *addr); unsigned int t4_get_regs_len(struct adapter *adapter); void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size); Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c == --- stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Nov 24 00:25:03 2020 (r367972) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Nov 24 00:27:21 2020 (r367973) @@ -10202,6 +10202,48 @@ void t4_idma_monitor(struct adapter *adapter, } /** + * t4_set_vf_mac - Set MAC address for the specified VF + * @adapter: The adapter + * @pf: the PF used to instantiate the VFs + * @vf: one of the VFs instantiated by the specified PF + * @naddr: the number of MAC addresses + * @addr: the MAC address(es) to be set to the specified VF + */ +int t4_set_vf_mac(struct adapter *adapter, unsigned int pf, unsigned int vf, + unsigned int naddr, u8 *addr) +{ + struct fw_acl_mac_cmd cmd; + + memset(, 0, sizeof(cmd)); + cmd.op_to_vfn = cpu_to_be32(V_FW_CMD_OP(FW_ACL_MAC_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | + V_FW_ACL_MAC_CMD_PFN(pf) | + V_FW_ACL_MAC_CMD_VFN(vf)); + + /* Note: Do not enable the ACL */ + cmd.en_to_len16 = cpu_to_be32((unsigned int)FW_LEN16(cmd)); + cmd.nmac = naddr; + + switch (pf) { + case 3: + memcpy(cmd.macaddr3, addr, sizeof(cmd.macaddr3)); + break; + case 2: + memcpy(cmd.macaddr2, addr, sizeof(cmd.macaddr2)); + break; + case 1: + memcpy(cmd.macaddr1, addr, sizeof(cmd.macaddr1)); + break; + case 0: + memcpy(cmd.macaddr0, addr, sizeof(cmd.macaddr0)); + break; + } + + return t4_wr_mbox(adapter, adapter->mbox, , sizeof(cmd), ); +} + +/** * t4_read_pace_tbl - read the pace table * @adap: the adapter * @pace_vals: holds the returned values Modified: stable/12/sys/dev/cxgbe/t4_iov.c == --- stable/12/sys/dev/cxgbe/t4_iov.cTue Nov 24 00:25:03 2020 (r367972) +++ stable/12/sys/dev/cxgbe/t4_iov.cTue Nov 24 00:27:21 2020 (r367973) @@ -42,12 +42,19 @@ __FBSDID("$FreeBSD$"); #endif #include "common/common.h" +#include "common/t4_regs.h" #include "t4_if.h" struct t4iov_softc { device_t sc_dev; device_t sc_main; bool sc_attached; + + int pf; + int regs_rid; + struct resource *regs_res; + bus_space_handle_t bh; + bus_space_tag_t bt; }; struct { @@ -113,6 +120,13 @@ struct { {0x6087, "Chelsio T6225-CR 87"}, }; +static inline uint32_t +t4iov_read_reg(struct t4iov_softc *sc, uint32_t reg) +{ + + return bus_space_read_4(sc->bt, sc->bh, reg); +} + static int t4iov_attach_child(device_t dev); static int @@ -179,10 +193,28 @@ static int t4iov_attach(device_t dev) { struct t4iov_softc *sc; + uint32_t pl_rev, whoami; sc = device_get_softc(dev); sc->sc_dev = dev; + sc->regs_rid = PCIR_BAR(0); + sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + >regs_rid, RF_ACTIVE); + if (sc->regs_res == NULL) { + device_printf(dev, "cannot map registers.\n"); + return (ENXIO); + } + sc->bt = rman_get_bustag(sc->regs_res); + sc->bh = rman_get_bushandle(sc->regs_res); + + pl_rev = t4iov_read_reg(sc, A_PL_REV); + whoami = t4iov_read_reg(sc, A_PL_WHOAMI); + if (G_CHIPID(pl_rev) <=
svn commit: r367972 - in stable/12/sys/dev/cxgbe: . common
Author: np Date: Tue Nov 24 00:25:03 2020 New Revision: 367972 URL: https://svnweb.freebsd.org/changeset/base/367972 Log: MFC r367497: cxgbev(4): Use the MAC address set by the the PF if there is one. Query the firmware for the MAC address set by the PF for the VF and use it instead of the firmware generated MAC if it's available. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4vf_hw.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/common.h == --- stable/12/sys/dev/cxgbe/common/common.h Tue Nov 24 00:22:33 2020 (r367971) +++ stable/12/sys/dev/cxgbe/common/common.h Tue Nov 24 00:25:03 2020 (r367972) @@ -912,6 +912,8 @@ int t4vf_get_sge_params(struct adapter *adapter); int t4vf_get_rss_glb_config(struct adapter *adapter); int t4vf_get_vfres(struct adapter *adapter); int t4vf_prep_adapter(struct adapter *adapter); +int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, + unsigned int *naddr, u8 *addr); int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid, enum t4_bar2_qtype qtype, int user, u64 *pbar2_qoffset, unsigned int *pbar2_qid); Modified: stable/12/sys/dev/cxgbe/common/t4vf_hw.c == --- stable/12/sys/dev/cxgbe/common/t4vf_hw.cTue Nov 24 00:22:33 2020 (r367971) +++ stable/12/sys/dev/cxgbe/common/t4vf_hw.cTue Nov 24 00:25:03 2020 (r367972) @@ -382,3 +382,49 @@ int t4vf_prep_adapter(struct adapter *adapter) return 0; } + +/* + * t4vf_get_vf_mac - Get the MAC address to be set to the VI of this VF. + * @adapter: The adapter + * @port: The port associated with vf + * @naddr: the number of ACL MAC addresses returned in addr + * @addr: Placeholder for MAC addresses + * + * Find the MAC address to be set to the VF's VI. The requested MAC address + * is from the host OS via callback in the PF driver. + */ +int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, + unsigned int *naddr, u8 *addr) +{ + struct fw_acl_mac_cmd cmd; + int ret; + + memset(, 0, sizeof(cmd)); + cmd.op_to_vfn = cpu_to_be32(V_FW_CMD_OP(FW_ACL_MAC_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_READ); + cmd.en_to_len16 = cpu_to_be32((unsigned int)FW_LEN16(cmd)); + ret = t4vf_wr_mbox(adapter, , sizeof(cmd), ); + if (ret) + return ret; + + if (cmd.nmac < *naddr) + *naddr = cmd.nmac; + + switch (port) { + case 3: + memcpy(addr, cmd.macaddr3, sizeof(cmd.macaddr3)); + break; + case 2: + memcpy(addr, cmd.macaddr2, sizeof(cmd.macaddr2)); + break; + case 1: + memcpy(addr, cmd.macaddr1, sizeof(cmd.macaddr1)); + break; + case 0: + memcpy(addr, cmd.macaddr0, sizeof(cmd.macaddr0)); + break; + } + + return ret; +} Modified: stable/12/sys/dev/cxgbe/t4_vf.c == --- stable/12/sys/dev/cxgbe/t4_vf.c Tue Nov 24 00:22:33 2020 (r367971) +++ stable/12/sys/dev/cxgbe/t4_vf.c Tue Nov 24 00:25:03 2020 (r367972) @@ -481,7 +481,7 @@ static int t4vf_attach(device_t dev) { struct adapter *sc; - int rc = 0, i, j, rqidx, tqidx; + int rc = 0, i, j, rqidx, tqidx, n, p, pmask; struct make_dev_args mda; struct intrs_and_queues iaq; struct sge *s; @@ -618,8 +618,10 @@ t4vf_attach(device_t dev) * First pass over all the ports - allocate VIs and initialize some * basic parameters like mac address, port type, etc. */ + pmask = sc->params.vfres.pmask; for_each_port(sc, i) { struct port_info *pi; + uint8_t mac[ETHER_ADDR_LEN]; pi = malloc(sizeof(*pi), M_CXGBE, M_ZERO | M_WAITOK); sc->port[i] = pi; @@ -644,6 +646,15 @@ t4vf_attach(device_t dev) sc->port[i] = NULL; goto done; } + + /* Prefer the MAC address set by the PF, if there is one. */ + n = 1; + p = ffs(pmask) - 1; + MPASS(p >= 0); + rc = t4vf_get_vf_mac(sc, p, , mac); + if (rc == 0 && n == 1) + t4_os_set_hw_addr(pi, mac); + pmask &= ~(1 << p); /* No t4_link_start. */ ___ svn-src-all@freebsd.org mailing list
svn commit: r367971 - in stable/12/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware
Author: np Date: Tue Nov 24 00:22:33 2020 New Revision: 367971 URL: https://svnweb.freebsd.org/changeset/base/367971 Log: MFC r367428 and r367495. r367428: cxgbe(4): Update firmwares to 1.25.0.40. This fixes a potential crash in firmware 1.25.0.0 on the passive open side during TOE operation. r367495: cxgbe(4): Add the firmware binaries missing in r367428. Obtained from:Chelsio Communications Sponsored by: Chelsio Communications Added: stable/12/sys/dev/cxgbe/firmware/t4fw-1.25.0.40.bin (contents, props changed) - copied, changed from r367428, head/sys/dev/cxgbe/firmware/t4fw-1.25.0.40.bin stable/12/sys/dev/cxgbe/firmware/t5fw-1.25.0.40.bin (contents, props changed) - copied, changed from r367428, head/sys/dev/cxgbe/firmware/t5fw-1.25.0.40.bin stable/12/sys/dev/cxgbe/firmware/t6fw-1.25.0.40.bin (contents, props changed) - copied, changed from r367428, head/sys/dev/cxgbe/firmware/t6fw-1.25.0.40.bin Deleted: stable/12/sys/dev/cxgbe/firmware/t4fw-1.25.0.0.bin stable/12/sys/dev/cxgbe/firmware/t5fw-1.25.0.0.bin stable/12/sys/dev/cxgbe/firmware/t6fw-1.25.0.0.bin Modified: stable/12/sys/conf/files stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h stable/12/sys/modules/cxgbe/t4_firmware/Makefile stable/12/sys/modules/cxgbe/t5_firmware/Makefile stable/12/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files == --- stable/12/sys/conf/filesTue Nov 24 00:17:05 2020(r367970) +++ stable/12/sys/conf/filesTue Nov 24 00:22:33 2020(r367971) @@ -1476,7 +1476,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule\ clean "t4fw.fwo" t4fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.25.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.25.0.40.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1510,7 +1510,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule\ clean "t5fw.fwo" t5fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.25.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.25.0.40.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1544,7 +1544,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule\ clean "t6fw.fwo" t6fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.25.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.25.0.40.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Copied and modified: stable/12/sys/dev/cxgbe/firmware/t4fw-1.25.0.40.bin (from r367428, head/sys/dev/cxgbe/firmware/t4fw-1.25.0.40.bin) == Binary file (source and/or target). No diff available. Modified: stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h == --- stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Tue Nov 24 00:17:05 2020(r367970) +++ stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Tue Nov 24 00:22:33 2020(r367971) @@ -9985,17 +9985,17 @@ enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 25, T4FW_VERSION_MICRO = 0, - T4FW_VERSION_BUILD = 0, + T4FW_VERSION_BUILD = 40, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 25, T5FW_VERSION_MICRO = 0, - T5FW_VERSION_BUILD = 0, + T5FW_VERSION_BUILD = 40, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 25, T6FW_VERSION_MICRO = 0, - T6FW_VERSION_BUILD = 0, + T6FW_VERSION_BUILD = 40, }; enum { Copied and modified: stable/12/sys/dev/cxgbe/firmware/t5fw-1.25.0.40.bin (from r367428, head/sys/dev/cxgbe/firmware/t5fw-1.25.0.40.bin) == Binary file
svn commit: r367970 - stable/12/sys/dev/cxgbe
Author: np Date: Tue Nov 24 00:17:05 2020 New Revision: 367970 URL: https://svnweb.freebsd.org/changeset/base/367970 Log: MFC r366929 and r367608. r366929: cxgbe(4): fix the size of the iq/eq maps. The firmware can allocate ingress and egress context ids anywhere from its configured range. Size the iq/eq maps to match the entire range instead of assuming that the firmware always allocates the first available context id. Reported by: Baptiste Wicht @ Verisign r367608: cxgbev(4): Make sure that the iq/eq map sizes are correct for VFs. This should have been part of r366929. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/sys/dev/cxgbe/t4_sge.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h == --- stable/12/sys/dev/cxgbe/adapter.h Tue Nov 24 00:12:42 2020 (r367969) +++ stable/12/sys/dev/cxgbe/adapter.h Tue Nov 24 00:17:05 2020 (r367970) @@ -785,6 +785,8 @@ struct sge { uint16_t iq_base; /* first abs_id */ int eq_start; /* first cntxt_id */ int eq_base;/* first abs_id */ + int iqmap_sz; + int eqmap_sz; struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ Modified: stable/12/sys/dev/cxgbe/t4_main.c == --- stable/12/sys/dev/cxgbe/t4_main.c Tue Nov 24 00:12:42 2020 (r367969) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Nov 24 00:17:05 2020 (r367970) @@ -1311,6 +1311,8 @@ t4_attach(device_t dev) s->nm_txq = malloc(s->nnmtxq * sizeof(struct sge_nm_txq), M_CXGBE, M_ZERO | M_WAITOK); #endif + MPASS(s->niq <= s->iqmap_sz); + MPASS(s->neq <= s->eqmap_sz); s->ctrlq = malloc(nports * sizeof(struct sge_wrq), M_CXGBE, M_ZERO | M_WAITOK); @@ -1318,9 +1320,9 @@ t4_attach(device_t dev) M_ZERO | M_WAITOK); s->txq = malloc(s->ntxq * sizeof(struct sge_txq), M_CXGBE, M_ZERO | M_WAITOK); - s->iqmap = malloc(s->niq * sizeof(struct sge_iq *), M_CXGBE, + s->iqmap = malloc(s->iqmap_sz * sizeof(struct sge_iq *), M_CXGBE, M_ZERO | M_WAITOK); - s->eqmap = malloc(s->neq * sizeof(struct sge_eq *), M_CXGBE, + s->eqmap = malloc(s->eqmap_sz * sizeof(struct sge_eq *), M_CXGBE, M_ZERO | M_WAITOK); sc->irq = malloc(sc->intr_count * sizeof(struct irq), M_CXGBE, @@ -4298,6 +4300,19 @@ get_params__post_init(struct adapter *sc) ("%s: L2 table size (%u) larger than expected (%u)", __func__, sc->vres.l2t.size, L2T_SIZE)); sc->params.core_vdd = val[6]; + + param[0] = FW_PARAM_PFVF(IQFLINT_END); + param[1] = FW_PARAM_PFVF(EQ_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query parameters (post_init2): %d.\n", rc); + return (rc); + } + MPASS((int)val[0] >= sc->sge.iq_start); + sc->sge.iqmap_sz = val[0] - sc->sge.iq_start + 1; + MPASS((int)val[1] >= sc->sge.eq_start); + sc->sge.eqmap_sz = val[1] - sc->sge.eq_start + 1; if (chip_id(sc) >= CHELSIO_T6) { Modified: stable/12/sys/dev/cxgbe/t4_netmap.c == --- stable/12/sys/dev/cxgbe/t4_netmap.c Tue Nov 24 00:12:42 2020 (r367969) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Tue Nov 24 00:17:05 2020 (r367970) @@ -188,9 +188,9 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq nm_rxq->iq_cntxt_id = be16toh(c.iqid); nm_rxq->iq_abs_id = be16toh(c.physiqid); cntxt_id = nm_rxq->iq_cntxt_id - sc->sge.iq_start; - if (cntxt_id >= sc->sge.niq) { + if (cntxt_id >= sc->sge.iqmap_sz) { panic ("%s: nm_rxq->iq_cntxt_id (%d) more than the max (%d)", - __func__, cntxt_id, sc->sge.niq - 1); + __func__, cntxt_id, sc->sge.iqmap_sz - 1); } sc->sge.iqmap[cntxt_id] = (void *)nm_rxq; @@ -201,9 +201,9 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq nm_rxq->fl_db_threshold = chip_id(sc) <= CHELSIO_T5 ? 8 : 4; MPASS(nm_rxq->fl_sidx == na->num_rx_desc); cntxt_id = nm_rxq->fl_cntxt_id - sc->sge.eq_start; - if (cntxt_id >= sc->sge.neq) { + if (cntxt_id >= sc->sge.eqmap_sz) { panic("%s: nm_rxq->fl_cntxt_id (%d) more than the max (%d)", - __func__, cntxt_id, sc->sge.neq - 1); + __func__, cntxt_id, sc->sge.eqmap_sz -
svn commit: r367969 - stable/12/sys/dev/cxgbe
Author: np Date: Tue Nov 24 00:12:42 2020 New Revision: 367969 URL: https://svnweb.freebsd.org/changeset/base/367969 Log: MFC r366916: cxgbe(4): display correct tid range for T6 based -SO cards. Reported by: Chelsio QA Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c == --- stable/12/sys/dev/cxgbe/t4_main.c Tue Nov 24 00:07:22 2020 (r367968) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Nov 24 00:12:42 2020 (r367969) @@ -9020,8 +9020,10 @@ sysctl_tids(SYSCTL_HANDLER_ARGS) if (b) sbuf_printf(sb, "%u-%u, ", t->tid_base, b - 1); sbuf_printf(sb, "%u-%u", hb, t->ntids - 1); - } else - sbuf_printf(sb, "%u-%u", t->tid_base, t->ntids - 1); + } else { + sbuf_printf(sb, "%u-%u", t->tid_base, t->tid_base + + t->ntids - 1); + } sbuf_printf(sb, ", in use: %u\n", atomic_load_acq_int(>tids_in_use)); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367968 - stable/12/sys/dev/cxgbe/common
Author: np Date: Tue Nov 24 00:07:22 2020 New Revision: 367968 URL: https://svnweb.freebsd.org/changeset/base/367968 Log: MFC r366853: cxgbe(4): Fix page fault in t4_get_lb_stats with 2 port T5 cards. PR: 250449 Reported by: freqlabs@ Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c == --- stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Nov 24 00:02:14 2020 (r367967) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Nov 24 00:07:22 2020 (r367968) @@ -6957,7 +6957,6 @@ void t4_get_port_stats(struct adapter *adap, int idx, */ void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p) { - u32 bgmap = adap2pinfo(adap, idx)->mps_bg_map; #define GET_STAT(name) \ t4_read_reg64(adap, \ @@ -6982,14 +6981,18 @@ void t4_get_lb_stats(struct adapter *adap, int idx, st p->frames_1519_max = GET_STAT(1519B_MAX); p->drop = GET_STAT(DROP_FRAMES); - p->ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_LB_DROP_FRAME) : 0; - p->ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_LB_DROP_FRAME) : 0; - p->ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_LB_DROP_FRAME) : 0; - p->ovflow3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_LB_DROP_FRAME) : 0; - p->trunc0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_LB_TRUNC_FRAME) : 0; - p->trunc1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_LB_TRUNC_FRAME) : 0; - p->trunc2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_LB_TRUNC_FRAME) : 0; - p->trunc3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_LB_TRUNC_FRAME) : 0; + if (idx < adap->params.nports) { + u32 bg = adap2pinfo(adap, idx)->mps_bg_map; + + p->ovflow0 = (bg & 1) ? GET_STAT_COM(RX_BG_0_LB_DROP_FRAME) : 0; + p->ovflow1 = (bg & 2) ? GET_STAT_COM(RX_BG_1_LB_DROP_FRAME) : 0; + p->ovflow2 = (bg & 4) ? GET_STAT_COM(RX_BG_2_LB_DROP_FRAME) : 0; + p->ovflow3 = (bg & 8) ? GET_STAT_COM(RX_BG_3_LB_DROP_FRAME) : 0; + p->trunc0 = (bg & 1) ? GET_STAT_COM(RX_BG_0_LB_TRUNC_FRAME) : 0; + p->trunc1 = (bg & 2) ? GET_STAT_COM(RX_BG_1_LB_TRUNC_FRAME) : 0; + p->trunc2 = (bg & 4) ? GET_STAT_COM(RX_BG_2_LB_TRUNC_FRAME) : 0; + p->trunc3 = (bg & 8) ? GET_STAT_COM(RX_BG_3_LB_TRUNC_FRAME) : 0; + } #undef GET_STAT #undef GET_STAT_COM ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367967 - stable/12/sys/dev/cxgbe/common
Author: np Date: Tue Nov 24 00:02:14 2020 New Revision: 367967 URL: https://svnweb.freebsd.org/changeset/base/367967 Log: MFC r366696: cxgbe(4): Do not request FEC when requesting speeds that don't have FEC. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c == --- stable/12/sys/dev/cxgbe/common/t4_hw.c Mon Nov 23 23:58:14 2020 (r367966) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Nov 24 00:02:14 2020 (r367967) @@ -3915,7 +3915,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m speed = fwcap_top_speed(lc->pcaps); fec = 0; - if (fec_supported(lc->pcaps)) { + if (fec_supported(speed)) { if (lc->requested_fec == FEC_AUTO) { if (lc->pcaps & FW_PORT_CAP32_FORCE_FEC) { if (speed & FW_PORT_CAP32_SPEED_100G) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367966 - stable/12/sys/dev/cxgbe/cudbg
Author: np Date: Mon Nov 23 23:58:14 2020 New Revision: 367966 URL: https://svnweb.freebsd.org/changeset/base/367966 Log: MFC r366694: cxgbe(4): unimplemented cudbg routines should return the correct internal error code and not an errno. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c == --- stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Mon Nov 23 23:53:21 2020 (r367965) +++ stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Mon Nov 23 23:58:14 2020 (r367966) @@ -2027,7 +2027,7 @@ err1: err: return rc; #endif - return (EDOOFUS); + return (CUDBG_STATUS_NOT_IMPLEMENTED); } /* CIM OBQ */ @@ -2664,7 +2664,7 @@ err1: err: return rc; #endif - return (EDOOFUS); + return (CUDBG_STATUS_NOT_IMPLEMENTED); } static void collect_mem_info(struct cudbg_init *pdbg_init, @@ -3130,7 +3130,7 @@ err1: err: return rc; #endif - return (EDOOFUS); + return (CUDBG_STATUS_NOT_IMPLEMENTED); } static int collect_pbt_tables(struct cudbg_init *pdbg_init, @@ -4450,5 +4450,5 @@ err1: err: return rc; #endif - return (EDOOFUS); + return (CUDBG_STATUS_NOT_IMPLEMENTED); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367965 - in stable/12: share/man/man4 sys/dev/cxgbe
Author: np Date: Mon Nov 23 23:53:21 2020 New Revision: 367965 URL: https://svnweb.freebsd.org/changeset/base/367965 Log: MFC r366532 and r366862. r366532: cxgbe(4): knobs to drop various kinds of undesirable frames on ingress. These kind of drops come for free in the sense that they do not use the filter TCAM or any other resource that wouldn't normally be used during rx. Frames dropped by the hardware get counted in the MAC's rx stats but are not delivered to the driver. hw.cxgbe.attack_filter Set to 1 to enable the "attack filter". Default is 0. The attack filter will drop an incoming frame if any of these conditions is true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128) or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8). hw.cxgbe.drop_ip_fragments Set to 1 to drop all incoming IP fragments. Default is 0. Note that this drops valid frames. hw.cxgbe.drop_pkts_with_l2_errors Set to 1 to drop incoming frames with Layer 2 length or checksum errors. Default is 1. hw.cxgbe.drop_pkts_with_l3_errors Set to 1 to drop incoming frames with IP version, length, or checksum errors. Default is 0. hw.cxgbe.drop_pkts_with_l4_errors Set to 1 to drop incoming frames with Layer 4 length, checksum, or other errors. Default is 0. r366862: cxgbe(4): Updates to the drop features from r366532. Sponsored by: Chelsio Communications Modified: stable/12/share/man/man4/cxgbe.4 stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/cxgbe.4 == --- stable/12/share/man/man4/cxgbe.4Mon Nov 23 23:46:07 2020 (r367964) +++ stable/12/share/man/man4/cxgbe.4Mon Nov 23 23:53:21 2020 (r367965) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2020 +.Dd October 19, 2020 .Dt CXGBE 4 .Os .Sh NAME @@ -362,6 +362,29 @@ The default value is 0 and should be changed only if P to communicate with each other. Different interfaces can be assigned different values using the dev..X.tx_vm_wr sysctl when the interface is administratively down. +.It Va hw.cxgbe.attack_filter +Set to 1 to enable the "attack filter". +Default is 0. +The attack filter will drop an incoming frame if any of these conditions is +true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is +loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128) +or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8). +This facility is available on T4 and T5 based cards only. +.It Va hw.cxgbe.drop_ip_fragments +Set to 1 to drop all incoming IP fragments. +Default is 0. +Note that this drops valid frames. +.It Va hw.cxgbe.drop_pkts_with_l2_errors +Set to 1 to drop incoming frames with Layer 2 length or checksum errors. +Default is 1. +.It Va hw.cxgbe.drop_pkts_with_l3_errors +Set to 1 to drop incoming frames with IP version, length, or checksum errors. +The IP checksum is validated for TCP or UDP packets only. +Default is 0. +.It Va hw.cxgbe.drop_pkts_with_l4_errors +Set to 1 to drop incoming frames with Layer 4 (TCP or UDP) length, +checksum, or other errors. +Default is 0. .El .Sh SUPPORT For general information and support, Modified: stable/12/sys/dev/cxgbe/t4_main.c == --- stable/12/sys/dev/cxgbe/t4_main.c Mon Nov 23 23:46:07 2020 (r367964) +++ stable/12/sys/dev/cxgbe/t4_main.c Mon Nov 23 23:53:21 2020 (r367965) @@ -579,6 +579,46 @@ static int t4_tx_vm_wr = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_vm_wr, CTLFLAG_RWTUN, _tx_vm_wr, 0, "Use VM work requests to transmit packets."); +/* + * Set to non-zero to enable the attack filter. A packet that matches any of + * these conditions will get dropped on ingress: + * 1) IP && source address == destination address. + * 2) TCP/IP && source address is not a unicast address. + * 3) TCP/IP && destination address is not a unicast address. + * 4) IP && source address is loopback (127.x.y.z). + * 5) IP && destination address is loopback (127.x.y.z). + * 6) IPv6 && source address == destination address. + * 7) IPv6 && source address is not a unicast address. + * 8) IPv6 && source address is loopback (::1/128). + * 9) IPv6 && destination address is loopback (::1/128). + * 10) IPv6 && source address is unspecified (::/128). + * 11) IPv6 && destination address is unspecified (::/128). + * 12) TCP/IPv6 && source address is multicast (ff00::/8). + * 13) TCP/IPv6 && destination address is multicast (ff00::/8). + */ +static int t4_attack_filter = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, attack_filter, CTLFLAG_RDTUN, +_attack_filter, 0, "Drop suspicious traffic"); + +static int t4_drop_ip_fragments = 0;
svn commit: r367964 - in stable/12/sys/dev/cxgbe: . common
Author: np Date: Mon Nov 23 23:46:07 2020 New Revision: 367964 URL: https://svnweb.freebsd.org/changeset/base/367964 Log: MFC r365732 and r366589. r365732: cxgbe(4): Get the count of FCS errors from the MAC and not MPS for T6 ports. The MPS register on the T6 counts something other than FCS errors despite its name. r366589: cxgbe(4): More fixes for the T6 FCS error counter. r365732 was the first attempt to get an accurate count but it was writing to some read-only registers to clear them and that obviously didn't work. Instead, note the counter's value when it is supposed to be cleared and subtract it from future readings. dev..stats.rx_fcs_error should not be serviced from the MPS register for T6. The stats.* sysctls should all use T5_PORT_REG for T5 and above. This must have been missed in the initial T5 support years ago. Fix it while here. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h == --- stable/12/sys/dev/cxgbe/adapter.h Mon Nov 23 18:37:19 2020 (r367963) +++ stable/12/sys/dev/cxgbe/adapter.h Mon Nov 23 23:46:07 2020 (r367964) @@ -314,6 +314,8 @@ struct port_info { struct port_stats stats; u_int tnl_cong_drops; u_int tx_parse_error; + int fcs_reg; + uint64_t fcs_base; u_long tx_toe_tls_records; u_long tx_toe_tls_octets; u_long rx_toe_tls_records; Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c == --- stable/12/sys/dev/cxgbe/common/t4_hw.c Mon Nov 23 18:37:19 2020 (r367963) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Mon Nov 23 23:46:07 2020 (r367964) @@ -6852,7 +6852,8 @@ void t4_get_port_stats_offset(struct adapter *adap, in */ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p) { - u32 bgmap = adap2pinfo(adap, idx)->mps_bg_map; + struct port_info *pi = adap->port[idx]; + u32 bgmap = pi->mps_bg_map; u32 stat_ctl = t4_read_reg(adap, A_MPS_STAT_CTL); #define GET_STAT(name) \ @@ -6902,7 +6903,6 @@ void t4_get_port_stats(struct adapter *adap, int idx, p->rx_ucast_frames = GET_STAT(RX_PORT_UCAST); p->rx_too_long = GET_STAT(RX_PORT_MTU_ERROR); p->rx_jabber= GET_STAT(RX_PORT_MTU_CRC_ERROR); - p->rx_fcs_err = GET_STAT(RX_PORT_CRC_ERROR); p->rx_len_err = GET_STAT(RX_PORT_LEN_ERROR); p->rx_symbol_err= GET_STAT(RX_PORT_SYM_ERROR); p->rx_runt = GET_STAT(RX_PORT_LESS_64B); @@ -6921,6 +6921,9 @@ void t4_get_port_stats(struct adapter *adap, int idx, p->rx_ppp5 = GET_STAT(RX_PORT_PPP5); p->rx_ppp6 = GET_STAT(RX_PORT_PPP6); p->rx_ppp7 = GET_STAT(RX_PORT_PPP7); + + if (pi->fcs_reg != -1) + p->rx_fcs_err = t4_read_reg64(adap, pi->fcs_reg) - pi->fcs_base; if (chip_id(adap) >= CHELSIO_T5) { if (stat_ctl & F_COUNTPAUSESTATRX) { Modified: stable/12/sys/dev/cxgbe/t4_main.c == --- stable/12/sys/dev/cxgbe/t4_main.c Mon Nov 23 18:37:19 2020 (r367963) +++ stable/12/sys/dev/cxgbe/t4_main.c Mon Nov 23 23:46:07 2020 (r367964) @@ -1166,6 +1166,23 @@ t4_attach(device_t dev) mtx_init(>pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; + /* +* The MPS counter for FCS errors doesn't work correctly on the +* T6 so we use the MAC counter here. Which MAC is in use +* depends on the link settings which will be known when the +* link comes up. +*/ + if (is_t6(sc)) { + pi->fcs_reg = -1; + } else if (is_t4(sc)) { + pi->fcs_reg = PORT_REG(pi->tx_chan, + A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L); + } else { + pi->fcs_reg = T5_PORT_REG(pi->tx_chan, + A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L); + } + pi->fcs_base = 0; + /* All VIs on this port share this media. */ ifmedia_init(>media, IFM_IMASK, cxgbe_media_change, cxgbe_media_status); @@ -6677,155 +6694,88 @@ cxgbe_sysctls(struct port_info *pi) >tx_parse_error, 0, "# of tx packets with invalid length or # of segments"); -#define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ -
svn commit: r367963 - head/sbin/devd
Author: imp Date: Mon Nov 23 18:37:19 2020 New Revision: 367963 URL: https://svnweb.freebsd.org/changeset/base/367963 Log: Prefer Em to Ar for emphasis Em is better than Ar if all we want to do is underline the text. Submitted by: yuripv@ Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Mon Nov 23 18:27:21 2020(r367962) +++ head/sbin/devd/devd.conf.5 Mon Nov 23 18:37:19 2020(r367963) @@ -416,7 +416,7 @@ node is destroyed. .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li ETHERNET Ta Ar inet Ta IFATTACH Ta Notification when the default VNET instance of the -.Ar inet +.Em inet interface is attached. .El .Pp @@ -454,18 +454,18 @@ provider size has changed. .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li IFNET -.It Li IFNET Ta Ar inet Ta Ta +.It Li IFNET Ta Em inet Ta Ta The .Dq subsystem is the actual name of the network interface on which the event took place. -.It Li IFNET Ta Ar inet Ta Li LINK_UP Ta +.It Li IFNET Ta Em inet Ta Li LINK_UP Ta Carrier status changed to UP. -.It Li IFNET Ta Ar inet Ta Li LINK_DOWN Ta +.It Li IFNET Ta Em inet Ta Li LINK_DOWN Ta Carrier status changed to DOWN. -.It Li IFNET Ta Ar inet Ta Li ATTACH Ta +.It Li IFNET Ta Em inet Ta Li ATTACH Ta The network interface is attached to the system. -.It Li IFNET Ta Ar inet Ta Li DETACH Ta +.It Li IFNET Ta Em inet Ta Li DETACH Ta The network interface is detached from the system. .El .Pp ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367962 - in head/sys: kern sys
Author: mjg Date: Mon Nov 23 18:27:21 2020 New Revision: 367962 URL: https://svnweb.freebsd.org/changeset/base/367962 Log: dtrace: stop using eventhandlers for the part compiled into the kernel Reviewed by: kib, markj Differential Revision:https://reviews.freebsd.org/D27311 Modified: head/sys/kern/init_main.c head/sys/kern/kern_dtrace.c head/sys/kern/kern_proc.c head/sys/kern/kern_thread.c head/sys/sys/dtrace_bsd.h Modified: head/sys/kern/init_main.c == --- head/sys/kern/init_main.c Mon Nov 23 18:26:47 2020(r367961) +++ head/sys/kern/init_main.c Mon Nov 23 18:27:21 2020(r367962) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -607,6 +608,10 @@ proc0_init(void *dummy __unused) */ EVENTHANDLER_DIRECT_INVOKE(process_init, p); EVENTHANDLER_DIRECT_INVOKE(thread_init, td); +#ifdef KDTRACE_HOOKS + kdtrace_proc_ctor(p); + kdtrace_thread_ctor(td); +#endif EVENTHANDLER_DIRECT_INVOKE(process_ctor, p); EVENTHANDLER_DIRECT_INVOKE(thread_ctor, td); Modified: head/sys/kern/kern_dtrace.c == --- head/sys/kern/kern_dtrace.c Mon Nov 23 18:26:47 2020(r367961) +++ head/sys/kern/kern_dtrace.c Mon Nov 23 18:27:21 2020(r367962) @@ -67,21 +67,19 @@ kdtrace_proc_size() return (KDTRACE_PROC_SIZE); } -static void -kdtrace_proc_ctor(void *arg __unused, struct proc *p) +void +kdtrace_proc_ctor(struct proc *p) { p->p_dtrace = malloc(KDTRACE_PROC_SIZE, M_KDTRACE, M_WAITOK|M_ZERO); } -static void -kdtrace_proc_dtor(void *arg __unused, struct proc *p) +void +kdtrace_proc_dtor(struct proc *p) { - if (p->p_dtrace != NULL) { - free(p->p_dtrace, M_KDTRACE); - p->p_dtrace = NULL; - } + free(p->p_dtrace, M_KDTRACE); + p->p_dtrace = NULL; } /* Return the DTrace thread data size compiled in the kernel hooks. */ @@ -92,38 +90,17 @@ kdtrace_thread_size() return (KDTRACE_THREAD_SIZE); } -static void -kdtrace_thread_ctor(void *arg __unused, struct thread *td) +void +kdtrace_thread_ctor(struct thread *td) { td->td_dtrace = malloc(KDTRACE_THREAD_SIZE, M_KDTRACE, M_WAITOK|M_ZERO); } -static void -kdtrace_thread_dtor(void *arg __unused, struct thread *td) +void +kdtrace_thread_dtor(struct thread *td) { - if (td->td_dtrace != NULL) { - free(td->td_dtrace, M_KDTRACE); - td->td_dtrace = NULL; - } + free(td->td_dtrace, M_KDTRACE); + td->td_dtrace = NULL; } - -/* - * Initialise the kernel DTrace hooks. - */ -static void -init_dtrace(void *dummy __unused) -{ - - EVENTHANDLER_REGISTER(process_ctor, kdtrace_proc_ctor, NULL, - EVENTHANDLER_PRI_ANY); - EVENTHANDLER_REGISTER(process_dtor, kdtrace_proc_dtor, NULL, - EVENTHANDLER_PRI_ANY); - EVENTHANDLER_REGISTER(thread_ctor, kdtrace_thread_ctor, NULL, - EVENTHANDLER_PRI_ANY); - EVENTHANDLER_REGISTER(thread_dtor, kdtrace_thread_dtor, NULL, - EVENTHANDLER_PRI_ANY); -} - -SYSINIT(kdtrace, SI_SUB_KDTRACE, SI_ORDER_FIRST, init_dtrace, NULL); Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Mon Nov 23 18:26:47 2020(r367961) +++ head/sys/kern/kern_proc.c Mon Nov 23 18:27:21 2020(r367962) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -207,6 +208,9 @@ proc_ctor(void *mem, int size, void *arg, int flags) struct thread *td; p = (struct proc *)mem; +#ifdef KDTRACE_HOOKS + kdtrace_proc_ctor(p); +#endif EVENTHANDLER_DIRECT_INVOKE(process_ctor, p); td = FIRST_THREAD_IN_PROC(p); if (td != NULL) { @@ -243,6 +247,9 @@ proc_dtor(void *mem, int size, void *arg) EVENTHANDLER_DIRECT_INVOKE(thread_dtor, td); } EVENTHANDLER_DIRECT_INVOKE(process_dtor, p); +#ifdef KDTRACE_HOOKS + kdtrace_proc_dtor(p); +#endif if (p->p_ksi != NULL) KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue")); } Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Mon Nov 23 18:26:47 2020(r367961) +++ head/sys/kern/kern_thread.c Mon Nov 23 18:27:21 2020(r367962) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -358,6 +359,9 @@ thread_ctor(void *mem, int size, void *arg, int flags) #ifdef AUDIT audit_thread_alloc(td); #endif +#ifdef KDTRACE_HOOKS + kdtrace_thread_ctor(td); +#endif umtx_thread_alloc(td);
svn commit: r367961 - in head/sys: kern sys
Author: mjg Date: Mon Nov 23 18:26:47 2020 New Revision: 367961 URL: https://svnweb.freebsd.org/changeset/base/367961 Log: thread: stash domain id to work around vtophys problems on ppc64 Adding to zombie list can be perfomed by idle threads, which on ppc64 leads to panics as it requires a sleepable lock. Reported by: alfredo Reviewed by: kib, markj Fixes:r367842 ("thread: numa-aware zombie reaping") Differential Revision:https://reviews.freebsd.org/D27288 Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Mon Nov 23 18:18:16 2020(r367960) +++ head/sys/kern/kern_thread.c Mon Nov 23 18:26:47 2020(r367961) @@ -346,6 +346,7 @@ thread_ctor(void *mem, int size, void *arg, int flags) td = (struct thread *)mem; td->td_state = TDS_INACTIVE; td->td_lastcpu = td->td_oncpu = NOCPU; + td->td_allocdomain = vm_phys_domain(vtophys(td)); /* * Note that td_critnest begins life as 1 because the thread is not @@ -544,7 +545,7 @@ thread_zombie(struct thread *td) struct thread_domain_data *tdd; struct thread *ztd; - tdd = _domain_data[vm_phys_domain(vtophys(td))]; + tdd = _domain_data[td->td_allocdomain]; ztd = atomic_load_ptr(>tdd_zombies); for (;;) { td->td_zombie = ztd; Modified: head/sys/sys/proc.h == --- head/sys/sys/proc.h Mon Nov 23 18:18:16 2020(r367960) +++ head/sys/sys/proc.h Mon Nov 23 18:26:47 2020(r367961) @@ -246,6 +246,7 @@ struct thread { sigqueue_t td_sigqueue;/* (c) Sigs arrived, not delivered. */ #definetd_siglist td_sigqueue.sq_signals u_char td_lend_user_pri; /* (t) Lend user pri. */ + u_char td_allocdomain; /* (b) NUMA domain backing this struct thread. */ /* Cleared during fork1() */ #definetd_startzero td_flags ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367960 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux
Author: kib Date: Mon Nov 23 18:18:16 2020 New Revision: 367960 URL: https://svnweb.freebsd.org/changeset/base/367960 Log: Linuxolator: Replace use of eventhandlers by sysent hooks. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D27309 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/arm64/linux/linux_sysvec.c head/sys/compat/linux/linux_common.c head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_emul.h head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Mon Nov 23 17:29:25 2020 (r367959) +++ head/sys/amd64/linux/linux_sysvec.c Mon Nov 23 18:18:16 2020 (r367960) @@ -780,6 +780,9 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap= linux_vsyscall, + .sv_onexec = linux_on_exec, + .sv_onexit = linux_on_exit, + .sv_ontdexit= linux_thread_dtor, }; static void Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Mon Nov 23 17:29:25 2020 (r367959) +++ head/sys/amd64/linux32/linux32_sysvec.c Mon Nov 23 18:18:16 2020 (r367960) @@ -925,6 +925,9 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap= NULL, + .sv_onexec = linux_on_exec, + .sv_onexit = linux_on_exit, + .sv_ontdexit= linux_thread_dtor, }; static void Modified: head/sys/arm64/linux/linux_sysvec.c == --- head/sys/arm64/linux/linux_sysvec.c Mon Nov 23 17:29:25 2020 (r367959) +++ head/sys/arm64/linux/linux_sysvec.c Mon Nov 23 18:18:16 2020 (r367960) @@ -419,6 +419,9 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap= linux_vsyscall, + .sv_onexec = linux_on_exec, + .sv_onexit = linux_on_exit, + .sv_ontdexit= linux_thread_dtor, }; static void Modified: head/sys/compat/linux/linux_common.c == --- head/sys/compat/linux/linux_common.cMon Nov 23 17:29:25 2020 (r367959) +++ head/sys/compat/linux/linux_common.cMon Nov 23 18:18:16 2020 (r367960) @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -71,10 +71,6 @@ TAILQ_HEAD(, linux_ioctl_handler_element) linux_ioctl_ struct sx linux_ioctl_sx; SX_SYSINIT(linux_ioctl, _ioctl_sx, "Linux ioctl handlers"); -static eventhandler_tag linux_exec_tag; -static eventhandler_tag linux_thread_dtor_tag; -static eventhandler_taglinux_exit_tag; - static int linux_common_modevent(module_t mod, int type, void *data) { @@ -87,12 +83,6 @@ linux_common_modevent(module_t mod, int type, void *da #endif linux_dev_shm_create(); linux_osd_jail_register(); - linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, - linux_proc_exit, NULL, 1000); - linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, - linux_proc_exec, NULL, 1000); - linux_thread_dtor_tag = EVENTHANDLER_REGISTER(thread_dtor, - linux_thread_dtor, NULL, EVENTHANDLER_PRI_ANY); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); LIST_INIT(_list); @@ -104,9 +94,6 @@ linux_common_modevent(module_t mod, int type, void *da SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); mtx_destroy(_mtx); - EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); - EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); - EVENTHANDLER_DEREGISTER(thread_dtor, linux_thread_dtor_tag); break; default: return (EOPNOTSUPP); Modified: head/sys/compat/linux/linux_emul.c == --- head/sys/compat/linux/linux_emul.c Mon Nov 23 17:29:25 2020 (r367959) +++ head/sys/compat/linux/linux_emul.c Mon Nov 23 18:18:16 2020 (r367960) @@ -199,14 +199,13 @@ linux_proc_init(struct thread *td, struct thread *newt } void -linux_proc_exit(void *arg __unused, struct proc *p) +linux_on_exit(struct proc *p) {
svn commit: r367959 - in head/sys: kern sys
Author: kib Date: Mon Nov 23 17:29:25 2020 New Revision: 367959 URL: https://svnweb.freebsd.org/changeset/base/367959 Log: Provide ABI modules hooks for process exec/exit and thread exit. Exec and exit are same as corresponding eventhandler hooks. Thread exit hook is called somewhat earlier, while thread is still owned by the process and enough context is available. Note that the process lock is owned when the hook is called. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D27309 Modified: head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_kthread.c head/sys/kern/kern_thr.c head/sys/sys/sysent.h Modified: head/sys/kern/kern_exec.c == --- head/sys/kern/kern_exec.c Mon Nov 23 17:00:06 2020(r367958) +++ head/sys/kern/kern_exec.c Mon Nov 23 17:29:25 2020(r367959) @@ -1051,6 +1051,8 @@ exec_new_vmspace(struct image_params *imgp, struct sys sigfastblock_clear(td); umtx_exec(p); itimers_exec(p); + if (sv->sv_onexec != NULL) + sv->sv_onexec(p, imgp); EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Mon Nov 23 17:00:06 2020(r367958) +++ head/sys/kern/kern_exit.c Mon Nov 23 17:29:25 2020(r367959) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #ifdef KTRACE @@ -327,6 +328,9 @@ exit1(struct thread *td, int rval, int signo) itimers_exit(p); + if (p->p_sysent->sv_onexit != NULL) + p->p_sysent->sv_onexit(p); + /* * Check if any loadable modules need anything done at process exit. * E.g. SYSV IPC stuff. @@ -560,6 +564,9 @@ exit1(struct thread *td, int rval, int signo) /* Save exit status. */ PROC_LOCK(p); p->p_xthread = td; + + if (p->p_sysent->sv_ontdexit != NULL) + p->p_sysent->sv_ontdexit(td); #ifdef KDTRACE_HOOKS /* Modified: head/sys/kern/kern_kthread.c == --- head/sys/kern/kern_kthread.cMon Nov 23 17:00:06 2020 (r367958) +++ head/sys/kern/kern_kthread.cMon Nov 23 17:29:25 2020 (r367959) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -355,6 +356,10 @@ kthread_exit(void) PROC_UNLOCK(p); kproc_exit(0); } + + if (p->p_sysent->sv_ontdexit != NULL) + p->p_sysent->sv_ontdexit(td); + tidhash_remove(td); umtx_thread_exit(td); tdsigcleanup(td); Modified: head/sys/kern/kern_thr.c == --- head/sys/kern/kern_thr.cMon Nov 23 17:00:06 2020(r367958) +++ head/sys/kern/kern_thr.cMon Nov 23 17:29:25 2020(r367959) @@ -353,6 +353,9 @@ kern_thr_exit(struct thread *td) return (0); } + if (p->p_sysent->sv_ontdexit != NULL) + p->p_sysent->sv_ontdexit(td); + td->td_dbgflags |= TDB_EXIT; if (p->p_ptevents & PTRACE_LWP) { p->p_pendingexits++; Modified: head/sys/sys/sysent.h == --- head/sys/sys/sysent.h Mon Nov 23 17:00:06 2020(r367958) +++ head/sys/sys/sysent.h Mon Nov 23 17:29:25 2020(r367959) @@ -145,6 +145,9 @@ struct sysentvec { u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */ const char *(*sv_machine_arch)(struct proc *); vm_offset_t sv_fxrng_gen_base; + void(*sv_onexec)(struct proc *, struct image_params *); + void(*sv_onexit)(struct proc *); + void(*sv_ontdexit)(struct thread *td); }; #defineSV_ILP320x000100/* 32-bit executable. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367958 - head/bin/getfacl
Author: arrowd (ports committer) Date: Mon Nov 23 17:00:06 2020 New Revision: 367958 URL: https://svnweb.freebsd.org/changeset/base/367958 Log: bin/setfacl: Little refactoring, no functional change. The acl_from_stat function accepts a stat_t * argument, but only uses its st_mode field. There is no reason to pass the whole struct, so make it accept a mode_t and rename the function to acl_from_mode. Linux has non-standard acl_from_mode function in its libacl, so naming the function this way may help discovering it during porting efforts. Reviewed by: tsoome, markj Approved by: markj Differential Revision:https://reviews.freebsd.org/D27292 Modified: head/bin/getfacl/getfacl.c Modified: head/bin/getfacl/getfacl.c == --- head/bin/getfacl/getfacl.c Mon Nov 23 16:26:49 2020(r367957) +++ head/bin/getfacl/getfacl.c Mon Nov 23 17:00:06 2020(r367958) @@ -85,10 +85,10 @@ getgname(gid_t gid) /* * return an ACL corresponding to the permissions - * contained in struct stat + * contained in mode_t */ static acl_t -acl_from_stat(const struct stat *sb) +acl_from_mode(const mode_t mode) { acl_t acl; acl_entry_t entry; @@ -111,13 +111,13 @@ acl_from_stat(const struct stat *sb) return NULL; /* calculate user mode */ - if (sb->st_mode & S_IRUSR) + if (mode & S_IRUSR) if (acl_add_perm(perms, ACL_READ) == -1) return NULL; - if (sb->st_mode & S_IWUSR) + if (mode & S_IWUSR) if (acl_add_perm(perms, ACL_WRITE) == -1) return NULL; - if (sb->st_mode & S_IXUSR) + if (mode & S_IXUSR) if (acl_add_perm(perms, ACL_EXECUTE) == -1) return NULL; if (acl_set_permset(entry, perms) == -1) @@ -135,13 +135,13 @@ acl_from_stat(const struct stat *sb) return NULL; /* calculate group mode */ - if (sb->st_mode & S_IRGRP) + if (mode & S_IRGRP) if (acl_add_perm(perms, ACL_READ) == -1) return NULL; - if (sb->st_mode & S_IWGRP) + if (mode & S_IWGRP) if (acl_add_perm(perms, ACL_WRITE) == -1) return NULL; - if (sb->st_mode & S_IXGRP) + if (mode & S_IXGRP) if (acl_add_perm(perms, ACL_EXECUTE) == -1) return NULL; if (acl_set_permset(entry, perms) == -1) @@ -159,13 +159,13 @@ acl_from_stat(const struct stat *sb) return NULL; /* calculate other mode */ - if (sb->st_mode & S_IROTH) + if (mode & S_IROTH) if (acl_add_perm(perms, ACL_READ) == -1) return NULL; - if (sb->st_mode & S_IWOTH) + if (mode & S_IWOTH) if (acl_add_perm(perms, ACL_WRITE) == -1) return NULL; - if (sb->st_mode & S_IXOTH) + if (mode & S_IXOTH) if (acl_add_perm(perms, ACL_EXECUTE) == -1) return NULL; if (acl_set_permset(entry, perms) == -1) @@ -229,9 +229,9 @@ print_acl(char *path, acl_type_t type, int hflag, int errno = 0; if (type == ACL_TYPE_DEFAULT) return(0); - acl = acl_from_stat(); + acl = acl_from_mode(sb.st_mode); if (!acl) { - warn("%s: acl_from_stat() failed", path); + warn("%s: acl_from_mode() failed", path); return(-1); } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367957 - stable/12/sys/mips/cavium
Author: jhibbits Date: Mon Nov 23 16:26:49 2020 New Revision: 367957 URL: https://svnweb.freebsd.org/changeset/base/367957 Log: MFC r367807 Fix octeon_pmc post-r334827 Sponsored by: Juniper Networks, Inc Modified: stable/12/sys/mips/cavium/octeon_pmc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/cavium/octeon_pmc.c == --- stable/12/sys/mips/cavium/octeon_pmc.c Mon Nov 23 14:30:27 2020 (r367956) +++ stable/12/sys/mips/cavium/octeon_pmc.c Mon Nov 23 16:26:49 2020 (r367957) @@ -111,7 +111,7 @@ octeon_pmc_intr(void *arg) struct trapframe *tf = PCPU_GET(curthread)->td_intr_frame; if (pmc_intr) - (*pmc_intr)(PCPU_GET(tf); + (*pmc_intr)(tf); return (FILTER_HANDLED); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367955 - head/sys/dev/nvme
Author: mmel Date: Mon Nov 23 14:30:22 2020 New Revision: 367955 URL: https://svnweb.freebsd.org/changeset/base/367955 Log: Ensure that the buffer is in nvme_single_map() mapped to single segment. Not a functional change. MFC after:1 week Modified: head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_private.h == --- head/sys/dev/nvme/nvme_private.hMon Nov 23 14:26:59 2020 (r367954) +++ head/sys/dev/nvme/nvme_private.hMon Nov 23 14:30:22 2020 (r367955) @@ -478,6 +478,7 @@ nvme_single_map(void *arg, bus_dma_segment_t *seg, int { uint64_t *bus_addr = (uint64_t *)arg; + KASSERT(nseg == 1, ("number of segments (%d) is not 1", nseg)); if (error != 0) printf("nvme_single_map err %d\n", error); *bus_addr = seg[0].ds_addr; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367956 - head/usr.sbin/ctladm
Author: trasz Date: Mon Nov 23 14:30:27 2020 New Revision: 367956 URL: https://svnweb.freebsd.org/changeset/base/367956 Log: Replace paths in ctladm(8) examples with something sensible. PR: 251181 Reviewed by: 0mp, rm, ygy MFC after:2 weeks Sponsored by: EPSRC Differential Revision:https://reviews.freebsd.org/D27249 Modified: head/usr.sbin/ctladm/ctladm.8 Modified: head/usr.sbin/ctladm/ctladm.8 == --- head/usr.sbin/ctladm/ctladm.8 Mon Nov 23 14:30:22 2020 (r367955) +++ head/usr.sbin/ctladm/ctladm.8 Mon Nov 23 14:30:27 2020 (r367956) @@ -36,7 +36,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd August 6, 2020 +.Dd November 23, 2020 .Dt CTLADM 8 .Os .Sh NAME @@ -1029,23 +1029,17 @@ while reporting size of 10 terabytes, .Pp .Dl ctladm create -b ramdisk -s 10T -o capacity=10G .Pp -Create a LUN using the block backend, and specify the file -.Pa src/usr.sbin/ctladm/ctladm.8 -as the backing store. -The size of the LUN will be derived from the size of the file. -.Pp -.Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 -.Pp -Create a LUN using the block backend, specify the file -.Pa src/usr.sbin/ctladm/ctladm.8 +Create a LUN using the block backend, specify the ZFS volume +.Pa tank/example as the backing store, and specify the .Tn SCSI VPD page 0x80 and 0x83 serial number .Fl ( S ) and device ID .Fl ( d ) . +The size of the LUN will be derived from the size of the ZVOL. .Pp -.Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 -S MYSERIAL321 -d MYDEVID123 +.Dl ctladm create -b block -o file=/dev/zvol/tank/example -S MYSERIAL321 -d MYDEVID123 .Pp Use to specify generic options on ioctl frontend port, now it is only possible to set pp and/or vp port number. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367954 - head/share/man/man7
Author: trasz Date: Mon Nov 23 14:26:59 2020 New Revision: 367954 URL: https://svnweb.freebsd.org/changeset/base/367954 Log: Assorted tweaks to hier(7): punctuation, some .Xr's, clarify wording. Reviewed by: 0mp, bcr, imp MFC after:2 weeks Sponsored by: EPSRC Differential Revision:https://reviews.freebsd.org/D27248 Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 == --- head/share/man/man7/hier.7 Mon Nov 23 13:05:11 2020(r367953) +++ head/share/man/man7/hier.7 Mon Nov 23 14:26:59 2020(r367954) @@ -28,7 +28,7 @@ .\"@(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 20, 2020 +.Dd November 23, 2020 .Dt HIER 7 .Os .Sh NAME @@ -54,7 +54,7 @@ Compiled flattened device tree (FDT) files; see and .Xr dtc 1 .It Pa efi/ -Mount point for EFI System Partition (ESP) on UEFI systems. +Mount point for EFI System Partition (ESP) on UEFI systems .It Pa firmware/ loadable kernel modules containing binary firmware for hardware that needs firmware downloaded to it to function @@ -62,9 +62,8 @@ firmware downloaded to it to function pure kernel executable (the operating system loaded into memory at boot time) and kernel modules .It Pa modules/ -third-party loadable kernel modules; -see -.Xr kldstat 8 +third-party loadable kernel modules, such as the ones installed from +.Xr ports 7 .It Pa overlays/ Compiled flattened device tree (FDT) overlays; see .Xr fdt 4 @@ -197,8 +196,9 @@ contains the majority of user utilities and applicatio .It Pa bin/ common utilities, programming tools, and applications .It Pa compat/ -files needed to support binary compatibility with other operating systems, -such as Linux +files needed to support binary compatibility with other operating systems; +see +.Xr linux 4 .It Pa include/ standard C include files .Pp @@ -435,7 +435,7 @@ tree .Xr ports 7 , the .Fx -ports collection. +ports collection .It Pa sbin/ system daemons & system utilities (executed by users) .It Pa share/ @@ -604,8 +604,8 @@ see .El .Pp .It Pa src/ -.Bx , -third-party, and/or local source files +.Fx +source code .Pp .Bl -tag -width "kerberos5/" -compact .It Pa bin/ @@ -734,10 +734,8 @@ source code for files in .It Pa tests/ The .Fx -test suite. -See +test suite; see .Xr tests 7 -for more details. .El .It Pa /var/ multi-purpose log, temporary, transient, and spool files ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367953 - head/sys/dev/firewire
Author: trasz Date: Mon Nov 23 13:05:11 2020 New Revision: 367953 URL: https://svnweb.freebsd.org/changeset/base/367953 Log: Make sbp(4) use xpt_alloc_ccb/xpt_free_ccb instead of malloc/free. Reviewed by: imp, mav MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26843 Modified: head/sys/dev/firewire/sbp.c Modified: head/sys/dev/firewire/sbp.c == --- head/sys/dev/firewire/sbp.c Mon Nov 23 13:02:23 2020(r367952) +++ head/sys/dev/firewire/sbp.c Mon Nov 23 13:05:11 2020(r367953) @@ -987,7 +987,7 @@ END_DEBUG sdev = sbp_next_dev(target, sdev->lun_id + 1); if (sdev == NULL) { SBP_UNLOCK(sbp); - free(ccb, M_SBP); + xpt_free_ccb(ccb); return; } /* reuse ccb */ @@ -1019,9 +1019,9 @@ SBP_DEBUG(0) device_printf(sdev->target->sbp->fd.dev, "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG - ccb = malloc(sizeof(union ccb), M_SBP, M_NOWAIT | M_ZERO); + ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - printf("sbp_cam_scan_target: malloc failed\n"); + printf("sbp_cam_scan_target: xpt_alloc_ccb_nowait() failed\n"); return; } SBP_UNLOCK(target->sbp); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367952 - head/sys/dev/tws
Author: trasz Date: Mon Nov 23 13:02:23 2020 New Revision: 367952 URL: https://svnweb.freebsd.org/changeset/base/367952 Log: Make tws(4) use xpt_alloc_ccb()/xpt_free_ccb() instead of malloc/free. Reviewed by: imp MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26841 Modified: head/sys/dev/tws/tws.c Modified: head/sys/dev/tws/tws.c == --- head/sys/dev/tws/tws.c Mon Nov 23 12:59:56 2020(r367951) +++ head/sys/dev/tws/tws.c Mon Nov 23 13:02:23 2020(r367952) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include MALLOC_DEFINE(M_TWS, "twsbuf", "buffers used by tws driver"); int tws_queue_depth = TWS_MAX_REQS; @@ -412,7 +413,7 @@ tws_detach(device_t dev) callout_drain(>stats_timer); free(sc->reqs, M_TWS); free(sc->sense_bufs, M_TWS); -free(sc->scan_ccb, M_TWS); +xpt_free_ccb(sc->scan_ccb); if (sc->ioctl_data_mem) bus_dmamem_free(sc->data_tag, sc->ioctl_data_mem, sc->ioctl_data_map); if (sc->data_tag) @@ -597,7 +598,7 @@ tws_init(struct tws_softc *sc) M_WAITOK | M_ZERO); sc->sense_bufs = malloc(sizeof(struct tws_sense) * tws_queue_depth, M_TWS, M_WAITOK | M_ZERO); -sc->scan_ccb = malloc(sizeof(union ccb), M_TWS, M_WAITOK | M_ZERO); +sc->scan_ccb = xpt_alloc_ccb(); if (bus_dmamem_alloc(sc->data_tag, (void **)>ioctl_data_mem, (BUS_DMA_NOWAIT | BUS_DMA_ZERO), >ioctl_data_map)) { device_printf(sc->tws_dev, "Cannot allocate ioctl data mem\n"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367951 - head/sys/dev/hptmv
Author: trasz Date: Mon Nov 23 12:59:56 2020 New Revision: 367951 URL: https://svnweb.freebsd.org/changeset/base/367951 Log: Don't check return from xpt_alloc_ccb() for being NULL; since it's not the _nowait wariant, it cannot fail. Suggested by: mav MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Modified: head/sys/dev/hptmv/entry.c Modified: head/sys/dev/hptmv/entry.c == --- head/sys/dev/hptmv/entry.c Mon Nov 23 12:57:24 2020(r367950) +++ head/sys/dev/hptmv/entry.c Mon Nov 23 12:59:56 2020(r367951) @@ -2008,15 +2008,10 @@ hpt_attach(device_t dev) } - if ((ccb = xpt_alloc_ccb()) != NULL) - { - ccb->ccb_h.pinfo.priority = 1; - ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; - } - else - { - return ENOMEM; - } + ccb = xpt_alloc_ccb(); + ccb->ccb_h.pinfo.priority = 1; + ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; + /* * Create the device queue for our SIM(s). */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367950 - head/sys/dev/hptmv
Author: trasz Date: Mon Nov 23 12:57:24 2020 New Revision: 367950 URL: https://svnweb.freebsd.org/changeset/base/367950 Log: Make hptmv(4) use xpt_alloc_ccb/xpt_free_ccb instead of malloc/free. Reviewed by: imp, mav MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26842 Modified: head/sys/dev/hptmv/entry.c Modified: head/sys/dev/hptmv/entry.c == --- head/sys/dev/hptmv/entry.c Mon Nov 23 12:54:19 2020(r367949) +++ head/sys/dev/hptmv/entry.c Mon Nov 23 12:57:24 2020(r367950) @@ -2008,9 +2008,8 @@ hpt_attach(device_t dev) } - if((ccb = (union ccb *)malloc(sizeof(*ccb), M_DEVBUF, M_WAITOK)) != (union ccb*)NULL) + if ((ccb = xpt_alloc_ccb()) != NULL) { - bzero(ccb, sizeof(*ccb)); ccb->ccb_h.pinfo.priority = 1; ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; } @@ -2065,7 +2064,7 @@ hpt_attach(device_t dev) ccb->csa.callback = hpt_async; ccb->csa.callback_arg = hpt_vsim; xpt_action((union ccb *)ccb); - free(ccb, M_DEVBUF); + xpt_free_ccb(ccb); if (device_get_unit(dev) == 0) { /* Start the work thread. XXX */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367949 - head/sys/dev/smartpqi
Author: trasz Date: Mon Nov 23 12:54:19 2020 New Revision: 367949 URL: https://svnweb.freebsd.org/changeset/base/367949 Log: smartpqi: don't bzero the new ccb; xpt_alloc_ccb_nowait() already does that. Reviewed by: imp MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26838 Modified: head/sys/dev/smartpqi/smartpqi_cam.c Modified: head/sys/dev/smartpqi/smartpqi_cam.c == --- head/sys/dev/smartpqi/smartpqi_cam.cMon Nov 23 12:50:38 2020 (r367948) +++ head/sys/dev/smartpqi/smartpqi_cam.cMon Nov 23 12:54:19 2020 (r367949) @@ -623,7 +623,6 @@ static void smartpqi_lun_rescan(struct pqisrc_softstat return; } - bzero(ccb, sizeof(union ccb)); xpt_setup_ccb(>ccb_h, path, 5); ccb->ccb_h.func_code = XPT_SCAN_LUN; ccb->ccb_h.cbfcnp = smartpqi_lunrescan_cb; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367948 - head/sys/dev/arcmsr
Author: trasz Date: Mon Nov 23 12:50:38 2020 New Revision: 367948 URL: https://svnweb.freebsd.org/changeset/base/367948 Log: arcmsr(4): don't bzero newly allocated ccb; xpt_alloc_ccb() already does that. Reviewed by: delphij, imp, ching2...@areca.com.tw Tested by:ching2...@areca.com.tw MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26840 Modified: head/sys/dev/arcmsr/arcmsr.c Modified: head/sys/dev/arcmsr/arcmsr.c == --- head/sys/dev/arcmsr/arcmsr.cMon Nov 23 12:47:23 2020 (r367947) +++ head/sys/dev/arcmsr/arcmsr.cMon Nov 23 12:50:38 2020 (r367948) @@ -1707,7 +1707,6 @@ static void arcmsr_rescan_lun(struct AdapterControlBlo return; } /* printf("arcmsr_rescan_lun: Rescan Target=%x, Lun=%x\n", target, lun); */ - bzero(ccb, sizeof(union ccb)); xpt_setup_ccb(>ccb_h, path, 5); ccb->ccb_h.func_code = XPT_SCAN_LUN; ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367947 - head/sys/kern
Author: trasz Date: Mon Nov 23 12:47:23 2020 New Revision: 367947 URL: https://svnweb.freebsd.org/changeset/base/367947 Log: Remove the 'wantparent' variable, unused since r145004. Reviewed by: kib MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D27193 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Mon Nov 23 10:13:56 2020(r367946) +++ head/sys/kern/vfs_lookup.c Mon Nov 23 12:47:23 2020(r367947) @@ -1305,7 +1305,6 @@ int relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { struct vnode *dp = NULL;/* the directory we are searching */ - int wantparent; /* 1 => wantparent or lockparent flag */ int rdonly; /* lookup read-only flag bit */ int error = 0; @@ -1314,8 +1313,8 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct /* * Setup: break out flag bits into variables. */ - wantparent = cnp->cn_flags & (LOCKPARENT|WANTPARENT); - KASSERT(wantparent, ("relookup: parent not wanted.")); + KASSERT((cnp->cn_flags & (LOCKPARENT | WANTPARENT)) != 0, + ("relookup: parent not wanted")); rdonly = cnp->cn_flags & RDONLY; cnp->cn_flags &= ~ISSYMLINK; dp = dvp; @@ -1406,13 +1405,8 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct /* * Set the parent lock/ref state to the requested state. */ - if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp) { - if (wantparent) - VOP_UNLOCK(dvp); - else - vput(dvp); - } else if (!wantparent) - vrele(dvp); + if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp) + VOP_UNLOCK(dvp); /* * Check for symbolic link */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r367946 - head/sys/netinet
Author: tuexen Date: Mon Nov 23 10:13:56 2020 New Revision: 367946 URL: https://svnweb.freebsd.org/changeset/base/367946 Log: Fix two occurences of a typo in a comment introduced in r367530. Reported by: lstewart@ MFC after:1 week Differential Revision:https://reviews.freebsd.org/D27148 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cMon Nov 23 04:39:29 2020 (r367945) +++ head/sys/netinet/tcp_input.cMon Nov 23 10:13:56 2020 (r367946) @@ -1695,7 +1695,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru } /* * If timestamps were not negotiated during SYN/ACK and a -* segment without a timestamp is received, ignore the +* segment with a timestamp is received, ignore the * timestamp and process the packet normally. * See section 3.2 of RFC 7323. */ Modified: head/sys/netinet/tcp_syncache.c == --- head/sys/netinet/tcp_syncache.c Mon Nov 23 04:39:29 2020 (r367945) +++ head/sys/netinet/tcp_syncache.c Mon Nov 23 10:13:56 2020 (r367946) @@ -1213,7 +1213,7 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt /* * If timestamps were not negotiated during SYN/ACK and a -* segment without a timestamp is received, ignore the +* segment with a timestamp is received, ignore the * timestamp and process the packet normally. * See section 3.2 of RFC 7323. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"