Project

General

Profile

Actions

Bug #14597

closed

i40e debug code prints MAC addresses oddly

Added by Dan McDonald 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

I saw an error of this form in my messages:

2022-03-27T18:43:40.089098+00:00 shemp i40e: [ID 517869 kern.warning] WARNING: i40e1: failed to remove mac address  1: 0:5e: 0: 0: 1 from multicast filter: 0

It really should've read as "01:00:5e:00:00:01". It's because the format strings there use "%2x" instead of "%02x".

kebe(io/i40e)[0]% git grep %2x
i40e_gld.c:                 "%2x:%2x:%2x:%2x:%2x:%2x from unicast filter: %d",
i40e_gld.c:                 "%2x:%2x:%2x:%2x:%2x:%2x to unicast filter: %d",
i40e_gld.c:                 "%2x:%2x:%2x:%2x:%2x:%2x to multicast filter: %d",
i40e_gld.c:                         "%2x:%2x:%2x:%2x:%2x:%2x from multicast " 
kebe(io/i40e)[0]% 

It's a simple enough fix: replace the "%2x" with "%02x".

Actions

Also available in: Atom PDF