On 12/6/2023 7:22 PM, Andrew Lunn wrote: > On Wed, Dec 06, 2023 at 05:17:25PM +0530, Sneh Shah wrote: >> >> >> On 12/5/2023 8:38 PM, Andrew Lunn wrote: >>> On Mon, Dec 04, 2023 at 02:18:54PM +0530, Sneh Shah wrote: >>>> Add sysfs nodes to conifigure routing of specific vlan id to GVM queue. >>>> GVM queue is not exposed to PVM stmmac, so TC ops can't configure routing. >>> >>> Adding files in /sysfs has ~0 chance of being accepted. >>> >>> As requested, please explain what all these different hardware blocks >>> are, and what you are trying to achieve. We can then recommend the >>> correct interface. >>> >>> Andrew >>> >>> --- >>> pw-bot: cr >> > >> We have multiVM Architecture here. PVM will have stmmac running with >> 4 Rx Tx queues. stmmac in PVM is responsible to configure whole >> ethernet HW MAC/DMA/MTL ( including clocks, regulators and other >> core bsp elements). > > Please remember that stmmac is mostly used in embedded systems. People > used to embedded systems generally don't know virtual machine > terminology. So please spell out what PBM, GVM, etc mean. > >> In GVM we have thin Ethernet driver, which is responsible to >> configure and manage only 1 Rx/TX queue, i.e 5th Rx/Tx ethernet >> queue. GVM can't access any other resisters apart from this 5th >> queue specific MTL and DMA registers. > >> We need to route vlan traffic of a specific Priority to GVM Queue >> (Ethernet queue 5) via programming a MAC register. The MAC register >> is not accessible in GVM and has to be programmed from PVM. stmmac >> already has TC OPS to program this routing via vlan >> priority. However, as PVM has only 4 queues enabled, TC tool will >> not take 5th queue as input. Hence, these nodes were added to >> conifure the MAC register to route specific vlan packets to 5th >> queue in GVM. > >> Note: The queues mentioned above are HW MTL Queues and DMA >> Channels. The routing can be done in the HW itself based on vlan pcp >> before the packets reach to driver. > > Is the normal way you would do this is like this: > > tc qdisc add dev eth1 parent root handle 100 \ > mqprio num_tc 4 \ > map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 \ > queues 1@0 1@1 1@2 1@3 \ > hw 1 > > But you are saying that you cannot extend this to 5 queues? > > Andrew Yes this can't extend to 5 queues. Because, stmmac in primary virtual machine will only have 4 netdev queues. So TC won't take input for 5th queue.