From owner-freebsd-net@freebsd.org Wed Mar 22 14:20:10 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6336D17EA6 for ; Wed, 22 Mar 2017 14:20:10 +0000 (UTC) (envelope-from deborah.perry@datadynamicsit.biz) Received: from mail-pf0-x246.google.com (mail-pf0-x246.google.com [IPv6:2607:f8b0:400e:c00::246]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84F6718DA for ; Wed, 22 Mar 2017 14:20:10 +0000 (UTC) (envelope-from deborah.perry@datadynamicsit.biz) Received: by mail-pf0-x246.google.com with SMTP id c23so356879161pfj.0 for ; Wed, 22 Mar 2017 07:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadynamicsit-biz.20150623.gappssmtp.com; s=20150623; h=mime-version:message-id:date:subject:from:to; bh=7V0TkySiNsloszm+OW8D3ZYKTecgDWfDFLKYseq2kgQ=; b=dvKZj8MPaNAVQhlwUkYqHU7DIHwAC02BNYMxR2a5Jk00nWpdSbNeAzt+bRMnzQNoV6 +k3WEmIL6OeM7NXTDjL9nz50qmbkY8tw7G7XxLEnL+l0ZGls/YUJOTwtaXfh4aJS4D6p VR8RmRHQi6yNQw1IlTBx/0zGHbz306w4UeWJtPEJmRPnN6uDap6nRWN6vFEbnpJ7IRdF IoPgyfdjnzttTcMHcBLkrv6vIr9VTG/KsarK6mwO4w3k4uzgSwJTmnUKZ+YJgXsnhxl/ Uu83e+ZbXD0lRguFjkYYsRDvsWqKxiQNfZch8EkKfzuD6sTZz9hwiNNG6qBLFfdrKht5 cYWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:message-id:date:subject:from:to; bh=7V0TkySiNsloszm+OW8D3ZYKTecgDWfDFLKYseq2kgQ=; b=i4HI6LHmTMTgUemZRoP7YktxWhpgdZN6e2PUa4O+EUcqncg61/R+C1etkuCxO4SK5U Y81m+OVllTKBkXDtIKzJJKku9colGK1yTnsTglD9SIbca0ffsKSKWsfETqzxqe5Oa0NB 8TXjby9WZcnzHXDdfL46n5Q/eQCIvEa+q+amTw2hzM7PaNegaAvFnlAyNYpv3E0JOe0+ EQHenUts8gQVg/2h31KSG4tNuFQ5vExZbTDYGGFAdfFEl1CBh276ovaRsRLtc03zwZP0 Ahn6z0rd8UqC7lppL6WY/8E8/14J7kunRXWHgi4JPKI4IFyc4TLzgNTBMVNC6VRy0gdK ybNA== X-Gm-Message-State: AFeK/H2lZcYRNh/KIpsaG7HMgDXopRnBqkEwlDz7OweAhwbFWc5I7zhih12DDCE0TeEC21RxSygZOhLuROdIHQ== MIME-Version: 1.0 X-Received: by 10.99.142.74 with SMTP id k71mr6974859pge.76.1490192409784; Wed, 22 Mar 2017 07:20:09 -0700 (PDT) Message-ID: <94eb2c03334e3b79ab054b527547@google.com> Date: Wed, 22 Mar 2017 14:20:09 +0000 Subject: Re:Embedded Systems Users List From: deborah.perry@datadynamicsit.biz To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 14:20:10 -0000 DQoNCkhpLA0KDQpBIHF1aWNrIGZvbGxvdyB1cCB0byBrbm93IGlmIHlvdSB3b3VsZCBiZSBpbnRl cmVzdGVkIGluICpFbWJlZGRlZCBTeXN0ZW1zKg0KVXNlcnMgbGlzdCBmb3IgeW91ciBtYXJrZXRp bmcgY2FtcGFpZ24/DQoNCipMaXN0IENvbnRhaW5zOiogTmFtZSwgQ29tcGFueSdzIE5hbWUsIFBo b25lIE51bWJlciwgRmF4IE51bWJlciwgSm9iIFRpdGxlLA0KRW1haWwgYWRkcmVzcywgQ29tcGxl dGUgTWFpbGluZyBBZGRyZXNzLCBTSUMgY29kZSwgQ29tcGFueSByZXZlbnVlLCBzaXplLA0KV2Vi IGFkZHJlc3MgZXRjLg0KDQpTcGVjaWFsdGllczogVkxTSSwgTWljcm8gQ29udHJvbGxlciwgR2Vu ZXJhbCBjb21wdXRpbmcgc3lzdGVtcywgTmV0d29ya2luZywNClBMQywgV2ViIERldmVsb3BtZW50 DQoNCg0KDQpMZXQgbWUga25vdyB5b3VyIHRob3VnaHRzIG9yIHBhc3Mgb24gdGhlIG1lc3NhZ2Ug dG8gdGhlIHJpZ2h0IHBlcnNvbiBpbg0KeW91ciBjb21wYW55Lg0KDQoNCklmIHlvdSBhcmUgbG9v a2luZyBmb3IgYW55IG90aGVyIHRlY2hub2xvZ2llcyBwbGVhc2UgbGV0IG1lIGtub3cgeW91cg0K Y3JpdGVyaWEgSSB3aWxsIGdldCBiYWNrIHRvIHlvdSB3aXRoIHRoZSBzYW1lIHRhcmdldC4NCg0K VGhhbmtzICYgcmVnYXJkcywNCkRlYm9yYWggUGVycnkNCk1hcmtldGluZyBBbmFseXN0DQoNCklm IHlvdSBkb27igJl0IHdhbnQgdG8gcmVjZWl2ZSBhbnkgbWVzc2FnZSBmcm9tIHVzIHRoZW4gcGxl YXNlIHR5cGUg4oCcT1BUIE9VVOKAnQ0KaW4gdGhlIFN1YmplY3QgTGluZS4NCg== From owner-freebsd-net@freebsd.org Wed Mar 22 17:18:50 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CED5D1856C for ; Wed, 22 Mar 2017 17:18:50 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 351BC1175; Wed, 22 Mar 2017 17:18:50 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-qk0-x231.google.com with SMTP id p22so22008418qka.3; Wed, 22 Mar 2017 10:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xEjOUJ2Uul4pLhxWeF8A35j67wwiZ0j5aj9LaSh0g0s=; b=bdj9BjoIxJ64yN34ipwdb0i3ye3Os92BeSsElV/BZnwoJp9EyhHk5aaL41ie3FI1mF a3KkhJv8tgkZt0KQAmgryD/o/gqZP8/YBvLJ6nL1K3dafCAHDC1aUfSJt/biHHL6xjgi iAwpiQ0IkcYVY2OafAeoP7oGgZq/byUZ60+el5FTKsoTvfU2EMBccLuoLrCfYrhYPNCt zfXiLVArhhs7FLwTr8qzAe7vjntMdzswmaIr6FR4JCxQD0o/LLfKMuygObA2XT5wq5CF 7Sv5lsp4PAwN5k19isYs74JU91dzije8GDkmK2aVMssMy80JH9SrYVa1lkiPqnlaVi6y 9L9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xEjOUJ2Uul4pLhxWeF8A35j67wwiZ0j5aj9LaSh0g0s=; b=FCqEygt9d/bOFSpzZOz8mJYJp0itIjsQsWV/ZYaWcgdSTSYH0URwkF3QFEnAYBalj4 8Uuy5v3zeLyoO1rtMhoa5XK7U/bZN1BspgnZgPFUEAa98lr6mKeTM8ZSkn39OvzCjujY 5RN0ldtAVDISvLUtTb0HsXXtwdcbYj7taAw8btMH07IqN7cS+QIRlcNT9EDRXY0Lvtmt +VP2FvprkVxGmV1UQlGQOoV+DKbSJKaFjztLCQb1TUcOsjttozz5gkdBwazPupK9+RZM 75M5NRruGRSpzRKLb7dLs99z3tP+JClFm0iAlkpTReBAXFXV2Ap9/UBIttvmiBC+h0Mk 6kzg== X-Gm-Message-State: AFeK/H3/OjbIrY6JAZBLN+IlBIXfzy+EH6DCyCY0THtzEUS3aMa8vaJ0lVpgLCJiXPfKqrhx2GTWWnVgLhdU5Q== X-Received: by 10.55.131.68 with SMTP id f65mr36471345qkd.1.1490203129064; Wed, 22 Mar 2017 10:18:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.179.135 with HTTP; Wed, 22 Mar 2017 10:18:48 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Wed, 22 Mar 2017 20:18:48 +0300 Message-ID: Subject: Re: if_epair altq support problem To: =?UTF-8?Q?Ermal_Lu=C3=A7i?= Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 17:18:50 -0000 Thank You Ermal ! It works perfectly, can you commit this patch to 11.0 RELENG and MFC to 10.3 RELENG ? Regards On Wed, Mar 22, 2017 at 6:59 AM, Ermal Lu=C3=A7i wrote: > > > On Tue, Mar 21, 2017 at 5:26 AM, =C3=96zkan KIRIK > wrote: > >> Hello, >> >> I sent this email also to freebsd-pf list. But I think that the main >> problem is belongs to sys/net/if_epair.c. >> >> I'm using FreeBSD 10.3-p17 amd64. epair pseudo device is listed as >> supperted deviced at the Man page of altq(4). >> From man page of altq : >> >> *SUPPORTED DEVICES * >> >> The driver modifications described in altq(9) >> > ropos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports> >> are required to use a cer- >> tain network card with *ALTQ*. They have been applied to the >> following >> hardware drivers: ae(4) >> > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> age(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> alc(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> ale(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> an(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> ath(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> aue(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> axe(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> bce(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> bfe(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> bge(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> bxe(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> cas(4) > opos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> cxgbe(4) > propos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> dc(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> de(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> ed(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> em(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> ep(4) > pos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> epair(4) > propos=3D0&manpath=3DFreeBSD+11.0-RELEASE+and+Ports>, >> >> .... >> >> But while trying to use it the system says that it's not suppoerted. I >> tried on FreeBSD 11 also. The output is below: >> >> pf.conf : >> altq on epair0b hfsc bandwidth 1Mb queue { ftp, ssh, icmp, other } >> queue ftp bandwidth 30% priority 0 hfsc (upperlimit 99%) >> queue ssh bandwidth 30% priority 2 hfsc (upperlimit 99%) >> queue icmp bandwidth 10% priority 2 hfsc (upperlimit 99%) >> queue other bandwidth 30% priority 1 hfsc (default upperlimit 99%) >> >> >> # ifconfig epair0 create >> # ifconfig epair0a up >> # ifconfig epair0b up >> # pfctl -f pf.conf >> pfctl: epair0b: driver does not support altq >> >> # sysctl -a | grep ALTQ >> options ALTQ_NOPCC >> options ALTQ_PRIQ >> options ALTQ_CDNR >> options ALTQ_HFSC >> options ALTQ_RIO >> options ALTQ_RED >> options ALTQ_CBQ >> options ALTQ >> >> >> I have a look on /usr/src/sys/net/if_epair.c, and found the ALTQ section= : >> >> 514 #ifdef ALTQ >> 515 /* Support ALTQ via the clasic if_start() path. */ >> 516 IF_LOCK(&ifp->if_snd); >> 517 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { >> 518 ALTQ_ENQUEUE(&ifp->if_snd, m, NULL, error); >> 519 if (error) >> 520 ifp->if_snd.ifq_drops++; >> 521 IF_UNLOCK(&ifp->if_snd); >> 522 if (!error) { >> 523 ifp->if_obytes +=3D len; >> 524 if (mflags & (M_BCAST|M_MCAST)) >> 525 ifp->if_omcasts++; >> 526 >> 527 if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) = =3D=3D >> 0) >> 528 epair_start_locked(ifp); >> 529 else >> 530 (void)epair_add_ifp_for_drain >> ing(ifp); >> 531 } >> 532 return (error); >> 533 } >> 534 IF_UNLOCK(&ifp->if_snd); >> 535 #endif >> >> > > Just apply manually this patch to make it work. > > diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c > index 540f06c..04733a5 100644 > --- a/sys/net/if_epair.c > +++ b/sys/net/if_epair.c > @@ -827,9 +827,11 @@ epair_clone_create(struct if_clone *ifc, char *name, > size_t len, caddr_t params) > ifp->if_capabilities =3D IFCAP_VLAN_MTU; > ifp->if_capenable =3D IFCAP_VLAN_MTU; > ifp->if_start =3D epair_start; > + if_setstartfn(ifp, epair_start); > + if_setsendqlen(ifp, ifqmaxlen); > + if_setsendqready(ifp); > ifp->if_ioctl =3D epair_ioctl; > ifp->if_init =3D epair_init; > - ifp->if_snd.ifq_maxlen =3D ifqmaxlen; > /* Assign a hopefully unique, locally administered etheraddr. */ > eaddr[0] =3D 0x02; > eaddr[3] =3D (ifp->if_index >> 8) & 0xff; > @@ -852,10 +854,11 @@ epair_clone_create(struct if_clone *ifc, char *name= , > size_t len, caddr_t params) > ifp->if_flags =3D IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_capabilities =3D IFCAP_VLAN_MTU; > ifp->if_capenable =3D IFCAP_VLAN_MTU; > - ifp->if_start =3D epair_start; > + if_setstartfn(ifp, epair_start); > + if_setsendqlen(ifp, ifqmaxlen); > + if_setsendqready(ifp); > ifp->if_ioctl =3D epair_ioctl; > ifp->if_init =3D epair_init; > - ifp->if_snd.ifq_maxlen =3D ifqmaxlen; > /* We need to play some tricks here for the second interface. */ > strlcpy(name, epairname, len); > error =3D if_clone_create(name, len, (caddr_t)scb); > > > > > >> I have no idea that why it says that it doesn't support altq altough the >> source code contains ALTQ section. >> >> >> Regards >> =C3=96zkan KIRIK >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > > -- > Ermal >