On Tue, Jul 5, 2016 at 4:04 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: > Second arguement usability, from: > > sudo $TC filter add dev $ETH parent ffff: pref 11 protocol ip u32 \ > match ip protocol 1 0xff flowid 1:2 \ > action pedit munge offset -14 u8 set 0x02 \ > munge offset -13 u8 set 0x15 \ > munge offset -12 u8 set 0x15 \ > munge offset -11 u8 set 0x15 \ > munge offset -10 u16 set 0x1515 \ > pipe \ > action mirred egress redirect dev $SPANPORT > > to: > $TC filter add dev $ETH parent 1: protocol ip prio 10 \ > u32 match ip protocol 1 0xff flowid 1:2 \ > action mirred egress redirect dev $SPANPORT dst 02:15:15:15:15:15 > > given that I have to do this many many times in scripts and the > second policy is better eye candy.
How about adding a "wrapper" in iproute2 pedit action to make it accept "dst mac xx:xx:xx:xx:xx:xx"? Like what we did for u32 filters.