svn commit: r337943 - head/sys/net

Navdeep Parhar np at FreeBSD.org
Mon Aug 27 15:31:38 UTC 2018


On Mon, Aug 27, 2018 at 12:18:02PM +0200, Hans Petter Selasky wrote:
> On 8/17/18 3:03 AM, Navdeep Parhar wrote:
> > Author: np
> > Date: Fri Aug 17 01:03:23 2018
> > New Revision: 337943
> > URL: https://svnweb.freebsd.org/changeset/base/337943
> > 
> > Log:
> >    if_vlan(4): A VLAN always has a PCP and its ifnet's if_pcp should be set
> >    to the PCP value in use instead of IFNET_PCP_NONE.
> >    MFC after:	1 week
> >    Sponsored by:	Chelsio Communications
> > 
> > Modified:
> >    head/sys/net/if_vlan.c
> > 
> > Modified: head/sys/net/if_vlan.c
> > ==============================================================================
> > --- head/sys/net/if_vlan.c	Fri Aug 17 00:49:35 2018	(r337942)
> > +++ head/sys/net/if_vlan.c	Fri Aug 17 01:03:23 2018	(r337943)
> > @@ -1435,6 +1435,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1
> >   	ifp->if_resolvemulti = p->if_resolvemulti;
> >   	ifp->if_addrlen = p->if_addrlen;
> >   	ifp->if_broadcastaddr = p->if_broadcastaddr;
> > +	ifp->if_pcp = ifv->ifv_pcp;
> >   	/*
> >   	 * Copy only a selected subset of flags from the parent.
> > @@ -1959,6 +1960,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data
> >   			break;
> >   		}
> >   		ifv->ifv_pcp = ifr->ifr_vlan_pcp;
> > +		ifp->if_pcp = ifv->ifv_pcp;
> >   		vlan_tag_recalculate(ifv);
> >   		/* broadcast event about PCP change */
> >   		EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP);
> 
> Hi Navdeep,
> 
> FYI: This patch currently breaks OFED, because OFED doesn't expect
> if_pcp to be different from the NONE value with VLAN interfaces.

It turns out that the patch broke VLANs without OFED too, but that part
was fixed in r338305.

> 
> Mellanox is working on a fix.

Ok, thanks.  Looks like rdma_vlan_dev_vlan_id might need to check for
if_type == IFT_L2VLAN rather than the if_pcp.  Let me know in case you
need any help.

Regards,
Navdeep


More information about the svn-src-head mailing list