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.

Mellanox is working on a fix.

--HPS
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to