- /*
- * If the new filter requires loopback Destination MAC and/or VLAN
- * rewriting then we need to allocate a Layer 2 Table (L2T) entry for
- * the filter.
- */
- if (f->fs.newvlan || f->fs.newdmac) {
- /* allocate L2T entry for new filter */
- f->l2t = cxgbe_l2t_alloc_switching(f->dev, f->fs.vlan,
- f->fs.eport, f->fs.dmac);
-
- if (!f->l2t)
- return -ENOMEM;
- }
-
- /* If the new filter requires Source MAC rewriting then we need to
- * allocate a SMT entry for the filter
- */
- if (f->fs.newsmac) {
- f->smt = cxgbe_smt_alloc_switching(f->dev, f->fs.smac);
- if (!f->smt) {
- if (f->l2t) {
- cxgbe_l2t_release(f->l2t);
- f->l2t = NULL;
- }
- return -ENOMEM;
- }
- }
-